[FFmpeg-devel] Realmedia patch
Luca Abeni
lucabe72
Thu Sep 4 23:21:41 CEST 2008
Hi Ronald,
Ronald S. Bultje wrote:
[...]
>> I do not know if the
>> +extern RTPDynamicProtocolHandler ff_rdt_video_handler, ff_rdt_audio_handler,
>> + ff_rdt_live_video_handler, ff_rdt_live_audio_handler;
>> lines in rtpdec.c are a good idea, but I do not know how to fix this...
>> Maybe register_dynamic_payload_handler() should be exported, and we can have
>> an rtd_init() function calling it to register ff_rdt_video_handler & friends?
>
> How about $attached?
[...]
> +void av_register_rdt_dynamic_payload_handlers(void)
> +{
> + register_dynamic_payload_handler(&ff_rdt_video_handler);
> + register_dynamic_payload_handler(&ff_rdt_audio_handler);
> + register_dynamic_payload_handler(&ff_rdt_live_video_handler);
> + register_dynamic_payload_handler(&ff_rdt_live_audio_handler);
> +}
> Index: ffmpeg-svn/libavformat/rmdec.c
> ===================================================================
> --- ffmpeg-svn.orig/libavformat/rmdec.c 2008-09-03 08:00:22.000000000 -0400
> +++ ffmpeg-svn/libavformat/rmdec.c 2008-09-03 08:00:49.000000000 -0400
> @@ -836,3 +836,10 @@
> NULL,
> rm_read_dts,
> };
> +
> +AVInputFormat rdt_demuxer = {
> + "rdt",
> + NULL_IF_CONFIG_SMALL("RDT demuxer"),
> + sizeof(RMContext),
> + NULL, NULL, NULL, rm_read_close, NULL, NULL
> +};
> Index: ffmpeg-svn/libavformat/rtpdec.c
> ===================================================================
> --- ffmpeg-svn.orig/libavformat/rtpdec.c 2008-09-03 00:36:39.000000000 -0400
> +++ ffmpeg-svn/libavformat/rtpdec.c 2008-09-03 21:34:52.000000000 -0400
> @@ -49,7 +49,7 @@
> static RTPDynamicProtocolHandler mp4v_es_handler= {"MP4V-ES", CODEC_TYPE_VIDEO, CODEC_ID_MPEG4};
> static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", CODEC_TYPE_AUDIO, CODEC_ID_AAC};
>
> -static void register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler)
> +void register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler)
I think this needs an ff_ prefix?
[...]
> @@ -126,6 +127,7 @@
> enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type);
>
> void av_register_rtp_dynamic_payload_handlers(void);
> +void av_register_rdt_dynamic_payload_handlers(void);
And maybe this should go in rdt.h.
Once fixed this, I think the patch looks ok (but I cannot comment about the
interaction with the RM demuxer); no need to re-post after these changes.
I'd say you can wait some days as usual, and then commit if noone objects.
Luca
More information about the ffmpeg-devel
mailing list