[Live-devel] Obtaining frames
Leopold Palomo Avellaneda
leo at alaxarxa.net
Wed Sep 3 13:26:58 PDT 2008
A Dimecres 03 Setembre 2008, Ross Finlayson va escriure:
> >I'm trying to develop a rtsp client. I have looked the openRTSP example
> > and the mplayer part (as you have said in the web).
> >
> >My doubt is about :
> >env->taskScheduler().doEventLoop();
> >
> >So, if I would like to obtain a frame from another thread using the
> > subsession should I to stop the event loop or can I obtain the frame
> > calling the
> >
> >Subsession->readSource()->getNextFrame(...)
>
> Before entering the event loop, you call "startPlaying()" on each
> 'sink' object. This starts things running.
ok.
> You then call "doEventLoop()" to enter the event loop. You do *not*
> return from this function (except to exit the application). I.e.,
> all processing of incoming data happens within the event loop.
I know it ... but I can create and call this function in one thread, that will
be blocked and do calls in from another thread.
> Each sink object processes incoming data in the function that it
> passed as a parameter to "getNextFrame()". (This al happens within
> the event loop.)
I think that the question is the classical question. I would like to develop a
gui using the lib. The typical rtsp gui client. I can encapsulate all the
live555 code in one class, where some the init parameters define the env, as
the openrtsp example. So, I create one thread with this class (where I run
the doEventLoop, that doesn't return) and from the others threads I'm
obtaining frames periodically.
The main doubt about it is if I can do it and call the
Subsession->readSource()->getNextFrame(...),
without problems, or should I stop the event loop, and after call the
getnextframe and after reengage the loop? or,
should I to derive the taskScheduler class and re implement the doEventLoop,
and extract the data from the internal structures and put it in some
global/accessible vars in the class?
Regards,
Leo
--
--
Linux User 152692
PGP: 0xF944807E
Catalonia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20080903/4bcb9b4d/attachment.bin>
More information about the live-devel
mailing list