[Live-devel] h264 streaming using rtp/rtsp

Ross Finlayson finlayson at live.com
Tue Dec 21 10:23:40 PST 2004


>However the stream I am getting has fragmented NAL units, and I need
>to store them, and append them to form a complete NAL unit type before
>I pass it on to the VLC decoder,  so that ffmpeg can decode it.

In your "H264VideoRTPSource", you should be setting 
"fCurrentPacketCompletesFrame" based upon the value of the RTP "M" 
bit.  See the various "*VideoRTPSource.cpp" implementations for examples of 
this.

>Also in the H263plusVideoRTPSource.cpp code, does it discard the
>header, and just pass on the payload to the decoder

Yes.

>I ask this because from what I understand from the H.264 specs, its
>seems that the NAL header also acts as the RTP header, and so should
>not be discarded.

OK, so your "processSpecialHeader()" virtual function implementation should 
set "resultSpecialHeaderSize" to 0 before it returns.  (Actually, if 
there's no special RTP header in the data, you need not reimplement this 
virtual function at all.)


>Also in the H263plusVideoRTPSource.cpp, I have been unable to figure
>out how the user can extract the data saved below. To be quite honest
>I don't fully understand the code segment below.

You needn't worry about that code.  You won't be duplicating that in your 
"H264VideoRTPSource" implementation.



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



More information about the live-devel mailing list