From 635fac9af10092b0d5780a7d1b422b3044f9abd9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Fri, 27 May 2011 22:38:36 +0300 Subject: [PATCH] rtpenc: Declare the rtp flags private AVOptions in rtpenc.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This allows other muxers that chain a RTP muxer to declare the same options easily. Signed-off-by: Martin Storsjö --- libavformat/rtpenc.c | 3 +-- libavformat/rtpenc.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index c264b30..3da6dfb 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -30,8 +30,7 @@ //#define DEBUG static const AVOption options[] = { - { "rtpflags", "RTP muxer flags", offsetof(RTPMuxContext, flags), FF_OPT_TYPE_FLAGS, {.dbl = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, - { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, FF_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, + FF_RTP_FLAG_OPTS(RTPMuxContext, flags), { NULL }, }; diff --git a/libavformat/rtpenc.h b/libavformat/rtpenc.h index ac5a622..3a9e19b 100644 --- a/libavformat/rtpenc.h +++ b/libavformat/rtpenc.h @@ -65,6 +65,10 @@ typedef struct RTPMuxContext RTPMuxContext; #define FF_RTP_FLAG_MP4A_LATM 1 +#define FF_RTP_FLAG_OPTS(ctx, fieldname) \ + { "rtpflags", "RTP muxer flags", offsetof(ctx, fieldname), FF_OPT_TYPE_FLAGS, {.dbl = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \ + { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, FF_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \ + void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m); void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size); -- 2.7.4