History

lavc: add an option to enable side data-only packets during encoding

Some encoders (e.g. flac) need to send side data when there is no more data to be output. This enables them to output a packet with no data in it, only side data.

Anton Khirnov committed 12 years ago

Commit 0957b271 parent eb800f14 files · +22 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +5 −0
  2. libavcodec/avcodec.h +15 −0
  3. libavcodec/options_table.h +1 −0
  4. libavcodec/version.h +1 −1
doc/APIchanges+5−0
@@ -13,6 +13,11 @@ libavutil: 2013-12-xx · 12 unmodified lines
13 13
14API changes, most recent first:14API changes, most recent first:
15 15
162014-04-xx - xxxxxxx - lavc 55.54.0 - avcodec.h
17 Add AVCodecContext.side_data_only_packets to allow encoders to output packets
18 with only side data. This option may become mandatory in the future, so all
19 users are recommended to update their code and enable this option.
20
162014-xx-xx - xxxxxxx - lavu 53.16.0 - frame.h, pixfmt.h212014-xx-xx - xxxxxxx - lavu 53.16.0 - frame.h, pixfmt.h
17 Move all color-related enums (AVColorPrimaries, AVColorSpace, AVColorRange,22 Move all color-related enums (AVColorPrimaries, AVColorSpace, AVColorRange,
18 AVColorTransferCharacteristic, and AVChromaLocation) inside lavu.23 AVColorTransferCharacteristic, and AVChromaLocation) inside lavu.
libavcodec/avcodec.h+15−0
@@ -2730,6 +2730,21 @@ typedef struct AVCodecContext { · 2729 unmodified lines
2730 * - decoding: unused.2730 * - decoding: unused.
2731 */2731 */
2732 uint64_t vbv_delay;2732 uint64_t vbv_delay;
2733
2734 /**
2735 * Encoding only. Allow encoders to output packets that do not contain any
2736 * encoded data, only side data.
2737 *
2738 * Some encoders need to output such packets, e.g. to update some stream
2739 * parameters at the end of encoding.
2740 *
2741 * All callers are strongly recommended to set this option to 1 and update
2742 * their code to deal with such packets, since this behaviour may become
2743 * always enabled in the future (then this option will be deprecated and
2744 * later removed). To avoid ABI issues when this happens, the callers should
2745 * use AVOptions to set this field.
2746 */
2747 int side_data_only_packets;
2733} AVCodecContext;2748} AVCodecContext;
2734 2749
2735/**2750/**
libavcodec/options_table.h+1−0
@@ -399,6 +399,7 @@ static const AVOption avcodec_options[] = { · 398 unmodified lines
399{"fltp", "32-bit float planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_FLTP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"},399{"fltp", "32-bit float planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_FLTP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"},
400{"dblp", "64-bit double planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_DBLP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"},400{"dblp", "64-bit double planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_DBLP }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"},
401{"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, A|V|D },401{"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, A|V|D },
402{"side_data_only_packets", NULL, OFFSET(side_data_only_packets), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, A|V|E },
402{NULL},403{NULL},
403};404};
404 405
libavcodec/version.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
29#include "libavutil/version.h"29#include "libavutil/version.h"
30 30
31#define LIBAVCODEC_VERSION_MAJOR 5531#define LIBAVCODEC_VERSION_MAJOR 55
32#define LIBAVCODEC_VERSION_MINOR 5332#define LIBAVCODEC_VERSION_MINOR 54
33#define LIBAVCODEC_VERSION_MICRO 033#define LIBAVCODEC_VERSION_MICRO 0
34 34
35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

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