[Live-devel] fCurrentPacketCompletesFrame

Ross Finlayson finlayson at live.com
Mon Apr 11 03:12:35 PDT 2005


>I have a question about the fCurrentPacketCompletesFrame variable. Is this 
>variable used such that all packets are buffered until this variable gets 
>true, and then the buffer can be sent to the decoder?

That's correct (FYI, see how this variable is used in 
"MultiFramedRTPSource.cpp").

>I need to make sure that the packets are not buffered, because I need to 
>add some startcodes before the payload (when each packet contains an 
>entire NALU)
>
>But unfortunately sometimes I need to to concatenate some packets..
>
>So, can I set fCurrentPacketCompletesFrame to true if i want to just pass 
>the payload to the decoder, and otherwise set it to false until I have 
>concatenated all the packets I need and then set it to true?

Yes.

>And BTW, is there any way I can append or add three bytes to the payload? 
>It would problably be better to add the startcodes in my 
>H264VideoRTPSource than the mediaplayer.

Do you want to *prepend* these three bytes to the payload, or *append* 
them?  If you want to prepend these three bytes to the payload, and the 
payload format also has a special RTP header that's >= 3 bytes in size, 
then you can use the same hack that I use in "H263plusVideoRTPSource.cpp" 
to (sometimes) prepend two zero bytes to the payload.  (Search for the word 
"Hack" :-)

If, however, you want to *append* these three bytes to the payload, then I 
don't think there's currently a way to do this, within the current code.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list