This has a different name ("rtphinting" vs "rtphint"), since
the same name can't be used, even though it formerly was used
as a flag (-fflags rtphint) vs straight AVOption now
(-rtphinting 1).
---
libavformat/avformat.h | 2 +-
libavformat/movenc.c | 8 +++++++-
libavformat/movenc.h | 1 +
libavformat/options.c | 2 +-
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index aca246d..f05bab3 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -719,7 +719,7 @@ typedef struct AVFormatContext {
#define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain
both DTS & PTS
#define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other
values, just return what is stored in the container
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also
must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing
-> no frames. Also seeking to frames can not work if parsing to find frame
boundaries has been disabled
-#define AVFMT_FLAG_RTP_HINT 0x0040 ///< Add RTP hinting to the output file
+#define AVFMT_FLAG_RTP_HINT 0x0040 ///< Deprecated, use the rtphinting
muxer specific AVOption instead
int loop_input;
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 0b78744..a1de7a6 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -38,6 +38,7 @@
#include <assert.h>
static const AVOption options[] = {
+ { "rtphinting", "Add RTP hinting", offsetof(MOVMuxContext, rtp_hinting),
FF_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
{ "latm", "Use MP4A-LATM RTP packetization instead of MPEG4-GENERIC for
AAC", offsetof(MOVMuxContext, rtp_mp4a_latm), FF_OPT_TYPE_INT, {.dbl = 0}, 0,
1, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
};
@@ -2144,6 +2145,11 @@ static int mov_write_header(AVFormatContext *s)
mov->chapter_track = mov->nb_streams++;
if (s->flags & AVFMT_FLAG_RTP_HINT) {
+ av_log(s, AV_LOG_WARNING, "The RTP_HINT flag is deprecated, enable it "
+ "via the -rtphinting 1 muxer option
instead.\n");
+ mov->rtp_hinting = 1;
+ }
+ if (mov->rtp_hinting) {
/* Add hint tracks for each audio and video stream */
hint_track = mov->nb_streams;
for (i = 0; i < s->nb_streams; i++) {
@@ -2239,7 +2245,7 @@ static int mov_write_header(AVFormatContext *s)
if (mov->chapter_track)
mov_create_chapter_track(s, mov->chapter_track);
- if (s->flags & AVFMT_FLAG_RTP_HINT) {
+ if (mov->rtp_hinting) {
/* Initialize the hint tracks for each audio and video stream */
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index a861324..68fe98c 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -110,6 +110,7 @@ typedef struct MOVMuxContext {
uint64_t mdat_size;
MOVTrack *tracks;
+ int rtp_hinting;
int rtp_mp4a_latm;
} MOVMuxContext;
diff --git a/libavformat/options.c b/libavformat/options.c
index 22807c3..4c3b8a5 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -49,7 +49,7 @@ static const AVOption options[]={
{"nofillin", "do not fill in missing values that can be exactly calculated",
0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_NOFILLIN }, INT_MIN, INT_MAX, D,
"fflags"},
{"noparse", "disable AVParsers, this needs nofillin too", 0,
FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_NOPARSE }, INT_MIN, INT_MAX, D, "fflags"},
{"igndts", "ignore dts", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_IGNDTS },
INT_MIN, INT_MAX, D, "fflags"},
-{"rtphint", "add rtp hinting", 0, FF_OPT_TYPE_CONST, {.dbl =
AVFMT_FLAG_RTP_HINT }, INT_MIN, INT_MAX, E, "fflags"},
+{"rtphint", "add rtp hinting (deprecated, use the -rtphinting 1 option to the
mov/3gp/mp4 muxer)", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_RTP_HINT },
INT_MIN, INT_MAX, E, "fflags"},
{"analyzeduration", "how many microseconds are analyzed to estimate duration",
OFFSET(max_analyze_duration), FF_OPT_TYPE_INT, {.dbl = 5*AV_TIME_BASE }, 0,
INT_MAX, D},
{"cryptokey", "decryption key", OFFSET(key), FF_OPT_TYPE_BINARY, {.dbl = 0},
0, 0, D},
{"indexmem", "max memory used for timestamp index (per stream)",
OFFSET(max_index_size), FF_OPT_TYPE_INT, {.dbl = 1<<20 }, 0, INT_MAX, D},
--
1.7.3.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel