[Live-devel] stopPlaying()

barounis at ceid.upatras.gr barounis at ceid.upatras.gr
Wed May 31 14:17:41 PDT 2006


> 
> >I would like to have the ability to stop and then play another file 
> >during the
> >same session RTSPServer from the RTSP server side. This means that I have
> to
> >call the MediaSink::stopPlaying or the destructor ~Mediasink().
> 
> Just the former.  Because you want to keep the RTP session intact, 
> you should *not* close the (RTP)Sink object.
> 
> To change the input source for a running stream, you should do the 
> following, in order:
> 
>          sink->stopPlaying();
>          Medium::close(oldSource);
>          create newSource
>          sink->startPlaying(newSource, ...);

Hello, 

please forgive my lack of experience in C++ but it seems that I have some 
problem writing
the code. 
First of all, I am in the RTPSink.cpp file in the 
RTPTransmissionStats::noteIncomingRR 
function and I am trying to write the code which will call the stop() function 
in order 
to open and play another file. 

If the sink->stopPlaying() command is the command I should put in the code, how 
am I 
going to do that since I am in the RTPTransmissionStats object and I want to 
call another
object's method (MediaSink::stopPlaying()) ?

I have noticed that MediaSink class is an  "abstract base class" and that 
stopPlaying() is
a "virtual" function. Does this mean that there exists some other class which 
inherints 
MediaSink and implements the virtual stopPlaying()  ?


I have also noticed that in the OnDemandServerMediaSubsession.cpp, in the 
StreamState::pause() there is an fRTPSink pointer which calls an object's 
stopPlaying()
function. Does the fRTPSink->stopPlaying is the command I am looking for ?


Thanks for your time and for your help
Best regards
kostas


----------------------------------------------------
This mail was sent through http://my.ceid.upatras.gr 




More information about the live-devel mailing list