[FFmpeg-devel] [PATCH] RTSP-MS 14/15: ASF packet parsing
Tue Mar 24 14:06:59 CET 2009
Ronald S. Bultje wrote:
>> I should not comment before reading the actual patch, but...
>> Judging from the comments above, I suspect this increases again the
>> confusion in the rtp demuxer: currently, the rtp demuxer is not supposed
>> to return a full frame, but uses a "parser" provided by libavcodec to
>> split the stream in frames. If I understand correctly what you wrote
>> above, your patch is changing this behaviour, but only for some payloads...
> I'm not sure if that would work here, the RTP/ASF documents on MSDN
> and X-QT documents on the Apple website are very clear that splitting
> / merging is a payload feature.
This is true for all the RTP payloads, not only for ASF. But the RTP
demuxer contained in libavformat currently works in a different way: it
does not split the payload in frames, but passes the "non-framed" stream
to the parser. And the parser will take care of extracting frames out
of it. In this case, the payload will be passed to an ASF demuxer instead
of the framer, and the ASF demuxer surely knows how to split an ASF stream
I am not saying that this is the best way to go: I am saying that this is
what the current RTP demuxer is designed to do. Changing this behaviour
only for some payload types (and leaving it unchanged for the other ones)
will only increase the confusion...
> I always thought that was what the marker bit was for.
AFAIK the marker bit is needed for tolerating packet loss, or to split
a stream in frames without having to parse it.
Regarding the patch: even if we decide to go for splitting the stream in
frames inside the payload parser, I am not sure if ff_rtp_merge_data_packet()
is the best solution. This functionality (storing data in a buffer until
a frame is complete) is needed by all the demuxers, so I am pretty sure
libavformat already provides better support for it.
Moreover: are we _really_ sure that it is not possible to implement
something similar to mpegts_parse_packet()?
More information about the ffmpeg-devel