[FFmpeg-devel] Question about AVRtpPayloadTypes

Luca Abeni lucabe72
Fri Aug 10 17:02:05 CEST 2007


Hi Luca,

Luca Barbato wrote:
[...]
>> I have some doubts about the RTP/RTSP code in libavformat. I hope 
>> someone here can help me in understanding it...
>> While trying to implement proper support for mpeg1 and mpeg2 video in 
>> libavformat/rtp.c, I found some parts of the code that seem to be a 
>> little bit confusing.
> 
> please keep rtp.c as small as possible and move codec specifics
> somewhere else.

Ok. rtp.c already contains some broken support for mpeg1 and mpeg2 video 
(see rtp_send_mpegvideo()). I'll move it to a different file. Should I 
create a new rtp_mpegvideo.c file?


> For codecs with fixed pt, the first code is correct

You mean, the code in rtp_get_codec_info()? So, can I assume that 
AVRtpPayloadTypes[i].pt == i, or did I misunderstand your reply?
My current problem is that mpeg1video and mpeg2video have the same 
payload type (32), so adding an
{32, "MPV",        CODEC_TYPE_VIDEO,   CODEC_ID_MPEG2VIDEO, 90000, -1},
entry in AVRtpPayloadTypes would be useful... But this would break the 
assumption cited above.

[...]
> you may have dynamic pt for known enc_name (say 96 MPV) not sure who
> handles that correctly.

Ok. My problem is that sdp_parse_rtpmap() seems to search a codec based 
on enc_name even for fixed pt (< 96)... Am I missing something?


			Thanks,
				Luca




More information about the ffmpeg-devel mailing list