Hello,

I am streaming the test.264 file from live555 using the testOnDemandRTSPServer.
I am receiving it using testRTSPClient. This part works fine.

I have modified testRTSPClient with a custom Sink such that the 
'afterGettingFrame' virtual function passes the contents of each fReceiveBuffer 
to libav/ffmpeg's av_parser_parse2() to parse the incoming data into packets, 
later to be submitted to avcodec_send_packet() and avcodec_receive_frame() pair 
to decode it. I can use this same 
av_parser_parse2()/avcodec_send_packet()/avcodec_receive_frame() to properly 
decode frames by supplying bytes to the parser directly from the test.264 file 
(using fopen()/fread()), so I know that part of the pipeline works if the 
incoming data is correct.

However, when supplying the fReceiveBuffer data from 'afterGettingFrame()', the 
av_parser_parse2() never finds a packet, because the testRTSPClient has 
consumed the 0x0001 header at the start of the h.264 packet. I have several 
questions, all of which center around how to properly decode data arriving 
through afterGettingFrame().


1.       Is there a way to prevent the testRTSPClient infrastructure from 
consuming that header byte so that I can supply it to the parser?

2.       If I should not use the av_parser_parse2() function to find packets, 
then how do I properly segment the data coming in via afterGettingFrame() into 
packets that I can supply to the avcodec_send_packet()/avcodec_receive_frame()?

3.       The sizes of the data received in fReceiveBuffer are clearly not 
entire frames...in fact the first few times the function is called the data 
sizes are 22, 4, 3017, 3081...   Why the small size callbacks every so often?

Any help you can provide generally on how to supply data being received by 
testRTSPClient to libav/ffmpeg decoder would be very much appreciated.

Thanks,
-Eric.

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to