[Live-devel] Public vs Protected of StopPlaying()

Guy Bonneau gbonneau at matrox.com
Fri Nov 21 12:43:49 PST 2008


While writing code using the library I ran through a minor compilation
problem where the compiler would complain about member function
StopPlaying() being protected.
 
The issue I got was causing by the library having class MediaSink declares
virtual member function StopPlaying() as public member. However in derived
class MultiFramedRTPSink it is being declared as protected. Since the method
is virtual I would have expected the method being declared as public also in
class MultiFramedRTPSink. Otherwise the only way to call StopPlaying() from
an application is to cast the derived sink implementation to a MediaSink
object. Then the protected StopPlaying() of MultiFramedRTPSink can be called
thorough public StopPlaying() of MediaSink.
 
Regards
Guy Bonneau
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20081121/7bddfbd7/attachment.html>


More information about the live-devel mailing list