[Live-devel] Design Suggestion for Returning Frames To User

Constantin Savtchenko csavtche at gmail.com
Wed Jun 27 12:26:19 PDT 2012


Hi Ross,
   I was hoping to get your thoughts on how you envision client programs
should use the livemedia library.  I have set up my entire system so far
using your examples and an OO C++ approach.  My incoming stream is an h264
stream, so I've subclassed the MediaSink object, calling it H264PacketSink.
 My H264PacketSink employs the ffmpeg's libavcodec to decode the H264
frame.  So far everything works great, but now I'm stuck, and I didn't
realize I would be stuck until I got here.

  In my current system, the user makes a call similar to
my_rtsp.StartStreaming([rtsp url]).  This call hijacks the thread the user
is currently in and starts up your basic task scheduler, setting up
streaming and starting it.  As you're well aware the class relationship
structure is similar to RTSPConnection -> RTSPClient -> MediaSession ->
MediaSubsession -> MediaSink.  My difficulty lies in a smooth way to get
the decoded frame from MediaSink all the way back to the top by the user.
 My current approach has been to let the user pass a callback function with
a void * argument all the way down to MediaSink.  My subclassed MediaSink
(H264PacketSink) (which has started a seperated thread) dispatches all new
decoded frames to the user's callback.

  I figured I would see if you maybe had a better envisioned way of
returning a NAL unit from a MediaSink back to the the main calling class?
 Thank you.

Constantin Savtchenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120627/c7bc48ff/attachment.html>


More information about the live-devel mailing list