[Live-devel] How to control receiving audio/video stream?

=?big5?B?sEu358XvIFJpY2hhcmQgWXVhbg==?= richardy at kinposh.com.cn
Fri Jun 11 18:09:55 PDT 2004


I use testOnDemandRTSPServer program as server, which can stream test.mpg or test.vob by unicast. It stream file in 2 subsession, audio and video,
I write a program to receive audio/video stream.My program can play test.mp3 from rtsp server. In my program file there is a buffer for receiving stream.Mp3 stream is only audio stream. Mpeg stream is composed of audio and video stream.I need to setup and play 2 subsession to receive them. I write program flow chart as follow:
While (1)
{
	Get stream to buffer;
	Decode data in buffer
} 
There is 2 subsession. They also can receive stream data by FramedSource->getNextFrame(). Which subsession should I call? Do they call one by one? It is impossible, because video data must much more than audio data.
How can I call them in certain order? Then I can play mpeg stream correctly.
Mr Ross, I need your help, thank you.



More information about the live-devel mailing list