Commit 635fac9a authored by Martin Storsjö's avatar Martin Storsjö

rtpenc: Declare the rtp flags private AVOptions in rtpenc.h

This allows other muxers that chain a RTP muxer to declare
the same options easily.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 9c434ce8
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
//#define DEBUG //#define DEBUG
static const AVOption options[] = { 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" }, FF_RTP_FLAG_OPTS(RTPMuxContext, flags),
{ "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" },
{ NULL }, { NULL },
}; };
......
...@@ -65,6 +65,10 @@ typedef struct RTPMuxContext RTPMuxContext; ...@@ -65,6 +65,10 @@ typedef struct RTPMuxContext RTPMuxContext;
#define FF_RTP_FLAG_MP4A_LATM 1 #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_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size); void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment