[FFmpeg-devel] parse_packet

Panagiotis Issaris takis.issaris
Fri Jun 8 00:20:23 CEST 2007


Hi,

Op 7-jun-07, om 22:11 heeft Michael Niedermayer het volgende geschreven:

> On Thu, Jun 07, 2007 at 05:09:41PM +0200, Panagiotis Issaris wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi,
>>
>> I'm trying to figure out how h264_parse_packet() is supposed to work,
>> and so, I started looking at rtp_parse_packet().
>>
>> The question I have is whether h264_parse_packet() is supposed to  
>> return
>> only complete NAL units or if it is supposed to return AVPackets
>> containing parts of NAL units. Currently it seems to return AVPackets
>> containing parts of NAL units if NAL units had been split across RTP
>> packets.
>
> h264_parse_packet() ?
> my grep doesnt find such a function ...
>

Ouch, that should have been h264_handle_packet().

The reason I was confused though, was that the hook in  
RTPDynamicProtocolHandler is called parse_packet, so a functioned  
named h264_parse_packet() providing that functionality would have  
seemed logical to me.

>
>>
>> The documentation of rtp_parse_packet() says:
>> """@return 0 if a packet is returned, 1 if a packet is returned  
>> and more
>> can follow (use buf as NULL to read the next). -1 if no packet  
>> (error or
>> no more packet)."""
>>
>> Do I understand this correctly to mean that if 1 is returned the RTP
>> packet contained multiple parts which will result in multiple  
>> AVPackets?
>
> i think so, anyway RTFS, dont ask me, my knowledge is just based on  
> RTFS
> when it comes to RT*P

Ok. But probably others do know, like those who wrote it :)

Furthermore, I'd think a demultiplexer would behave somewhat  
similarly: Does a demultiplexer provide complete frames to the  
decoder? Or can it give the decoder little fragments of the frame?

With friendly regards,
Takis







More information about the ffmpeg-devel mailing list