[FFmpeg-soc] RTP (de)packetizer registration [was: Re: G723.1 Frame Parser]

Ronald S. Bultje rsbultje at gmail.com
Mon Apr 5 19:24:56 CEST 2010


On Mon, Apr 5, 2010 at 8:55 AM, Mohamed Naufal <naufal11 at gmail.com> wrote:
> --- a/libavformat/rtpdec.c
> +++ b/libavformat/rtpdec.c
> @@ -32,6 +32,7 @@
>  #include "rtpdec.h"
>  #include "rtpdec_amr.h"
>  #include "rtpdec_asf.h"
> +#include "rtpdec_g723_1.c"
>  #include "rtpdec_h263.h"
>  #include "rtpdec_h264.h"
>  #include "rtpdec_vorbis.h"
> @@ -66,6 +67,7 @@ void av_register_rtp_dynamic_payload_handlers(void)
>      ff_register_dynamic_payload_handler(&mpeg4_generic_handler);
>      ff_register_dynamic_payload_handler(&ff_amr_nb_dynamic_handler);
>      ff_register_dynamic_payload_handler(&ff_amr_wb_dynamic_handler);
> +    ff_register_dynamic_payload_handler(&ff_g723_1_handler);
>      ff_register_dynamic_payload_handler(&ff_h263_1998_dynamic_handler);
>      ff_register_dynamic_payload_handler(&ff_h263_2000_dynamic_handler);
>      ff_register_dynamic_payload_handler(&ff_h264_dynamic_handler);
[..]
> --- /dev/null
> +++ b/libavformat/rtpdec_g723_1.h
> @@ -0,0 +1,8 @@
> +#ifndef AVFORMAT_RTPDEC_G723_1_H
> +#define AVFORMAT_RTPDEC_G723_1_H
> +
> +#include "rtpdec.h"
> +
> +extern RTPDynamicProtocolHandler ff_g723_1_handler;
> +
> +#endif /* AVFORMAT_RTPDEC_G723_1_H */

Can we please fix this awful way of having to explicitely declare each
RTP payload in a header and move to a system similar to codec/mux
registration, and then get rid of this exponential increase in rtp*.h
header files that do nothing more than declaring a dynamic protocol
handler? If people are OK I'll cook up a patch (basically make a macro
that does "extern ...; register();").

(Mohamed, please disregard this, not related to the rest of your patch
and your fault, so IMO you don't have to fix this particular one.)

Ronald


More information about the FFmpeg-soc mailing list