History

avcodec: add an AVCodecContext flag to export PRFT side data on demand

James Almer committed 6 years ago

Commit d005a7c1 parent c6666895 files · +15 −2Browse files

Unified · Split

5 files
  1. doc/APIchanges +3 −0
  2. doc/codecs.texi +3 −0
  3. libavcodec/avcodec.h +7 −1
  4. libavcodec/options_table.h +1 −0
  5. libavcodec/version.h +1 −1
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2017-10-21 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2020-02-21 - xxxxxxxxxx - lavc 58.73.101 - avcodec.h
19+ Add AV_CODEC_EXPORT_DATA_PRFT.
20+
1821 2020-02-21 - xxxxxxxxxx - lavc 58.73.100 - avcodec.h
1922 Add AVCodecContext.export_side_data and AV_CODEC_EXPORT_DATA_MVS.
2023
doc/codecs.texi+3−0
@@ -795,6 +795,9 @@ Possible values: · 794 unmodified lines
795795 @item mvs
796796 Export motion vectors into frame side-data (see @code{AV_FRAME_DATA_MOTION_VECTORS})
797797 for codecs that support it. See also @file{doc/examples/export_mvs.c}.
798+@item prft
799+Export encoder Producer Reference Time into packet side-data (see @code{AV_PKT_DATA_PRFT})
800+for codecs that support it.
798801 @end table
799802
800803 @item error @var{integer} (@emph{encoding,video})
libavcodec/avcodec.h+7−1
@@ -1110,6 +1110,10 @@ typedef struct RcOverride{ · 1109 unmodified lines
11101110 * Export motion vectors through frame side data
11111111 */
11121112 #define AV_CODEC_EXPORT_DATA_MVS (1 << 0)
1113+/**
1114+ * Export encoder Producer Reference Time through packet side data
1115+ */
1116+#define AV_CODEC_EXPORT_DATA_PRFT (1 << 1)
11131117
11141118 /**
11151119 * Pan Scan area.
@@ -1430,7 +1434,9 @@ enum AVPacketSideDataType { · 314 unmodified lines
14301434 AV_PKT_DATA_AFD,
14311435
14321436 /**
1433− * Producer Reference Time data corresponding to the AVProducerReferenceTime struct.
1437+ * Producer Reference Time data corresponding to the AVProducerReferenceTime struct,
1438+ * usually exported by some encoders (on demand through the prft flag set in the
1439+ * AVCodecContext export_side_data field).
14341440 */
14351441 AV_PKT_DATA_PRFT,
14361442
libavcodec/options_table.h+1−0
@@ -80,6 +80,7 @@ static const AVOption avcodec_options[] = { · 79 unmodified lines
8080 {"ass_ro_flush_noop", "do not reset ASS ReadOrder field on flush", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_RO_FLUSH_NOOP}, INT_MIN, INT_MAX, S|D, "flags2"},
8181 {"export_side_data", "Export metadata as side data", OFFSET(export_side_data), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, A|V|S|D|E, "export_side_data"},
8282 {"mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_MVS}, INT_MIN, INT_MAX, V|D, "export_side_data"},
83+{"prft", "export Producer Reference Time through packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_PRFT}, INT_MIN, INT_MAX, A|V|S|E, "export_side_data"},
8384 {"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX},
8485 {"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E},
8586 {"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E},
libavcodec/version.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929
3030 #define LIBAVCODEC_VERSION_MAJOR 58
3131 #define LIBAVCODEC_VERSION_MINOR 73
32−#define LIBAVCODEC_VERSION_MICRO 100
32+#define LIBAVCODEC_VERSION_MICRO 101
3333
3434 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
3535 LIBAVCODEC_VERSION_MINOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t