> I looked at the code openRTSP. > I changed the code of testRTSPClient adding QuickTimeFileSink :: createnew. > But the video does not play generated. > > Code > > //scs.subsession->sink = DummySink::createNew(env, *scs.subsession, > rtspClient->url()); > qtOut = QuickTimeFileSink::createNew(env, *scs.session, "video.mp4", > fileSinkBufferSize, 1280, 720, 25, false, true, true, true); > qtOut->startPlaying(subsessionAfterPlaying, NULL); > > env << *rtspClient << "Created a data sink for the \"" << > *scs.subsession << "\" subsession\n"; > > /*scs.subsession->miscPtr = rtspClient; > scs.subsession->sink->startPlaying(*(scs.subsession->readSource()), > subsessionAfterPlaying, scs.subsession);*/ > > if (scs.subsession->rtcpInstance() != NULL) { > > scs.subsession->rtcpInstance()->setByeHandler(subsessionByeHandler, > scs.subsession); > } > > > What am I doing wrong?
First, because you have already called "qtOut<-startPlaying(...);", you must not also call "scs.subsession->sink->startPlaying(...);". Also, one important thing to understand about the "QuickTimeFileSink" class is that - to properly write the output file (including data 'trailers') - your application *must* close it properly - by calling "Medium::close(qtOut);" - when you're done. You cannot just '<control>-c' your application. See the "Important note" here: http://www.live555.com/openRTSP/#quicktime If the sender sends RTCP "BYE" packets (for each subsession) when the stream ends, then your application's 'bye handler' should do this automatically. Otherwise, you have to set up a signal handler in your application (as "openRTSP" does), or set up a timer, to close "qtOut" after a certain period of time has elapsed. I suggest that you first figure out how to get the "openRTSP" application to read your stream - so it will write a proper MP4-format file - and then (and only then) start writing your own application that does the same. Ross Finlayson Live Networks, Inc. http://www.live555.com/
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel