History

lavc: add metadata to AVFrame

See thread: Subject: [libav-devel] [PATCH 1/3] avcodec: add metadata to AVFrame Date: Tue, 4 Oct 2011 00:19:51 +0200

Thomas Kühnel committed 15 years ago

Commit f49ec1b1 parent 2090e404 files · +17 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavcodec/avcodec.h +11 −0
  3. libavcodec/utils.c +1 −0
  4. libavcodec/version.h +1 −1
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2011-04-18 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2012-07-14 - xxxxxxx - lavc 54.38.100 - avcodec.h
19+ Add metadata to AVFrame, and the accessor functions
20+ av_frame_get_metadata() and av_frame_set_metadata().
21+
1822 2012-07-10 - xxxxxxx - lavc 54.33.100
1923 Add av_fast_padded_mallocz().
2024
libavcodec/avcodec.h+11−0
@@ -1313,6 +1313,15 @@ typedef struct AVFrame { · 1312 unmodified lines
13131313 * - decoding: Read by user.
13141314 */
13151315 int64_t pkt_duration;
1316+
1317+ /**
1318+ * metadata.
1319+ * Code outside libavcodec should access this field using:
1320+ * av_frame_get_metadata(frame)
1321+ * - encoding: Set by user.
1322+ * - decoding: Set by libavcodec.
1323+ */
1324+ AVDictionary *metadata;
13161325 } AVFrame;
13171326
13181327 /**
@@ -1325,11 +1334,13 @@ int64_t av_frame_get_pkt_duration (const AVFrame *frame); · 6 unmodified lines
13251334 int64_t av_frame_get_pkt_pos (const AVFrame *frame);
13261335 int64_t av_frame_get_channel_layout (const AVFrame *frame);
13271336 int av_frame_get_sample_rate (const AVFrame *frame);
1337+AVDictionary *av_frame_get_metadata (const AVFrame *frame);
13281338 void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
13291339 void av_frame_set_pkt_duration (AVFrame *frame, int64_t val);
13301340 void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
13311341 void av_frame_set_channel_layout (AVFrame *frame, int64_t val);
13321342 void av_frame_set_sample_rate (AVFrame *frame, int val);
1343+void av_frame_set_metadata (AVFrame *frame, AVDictionary *val);
13331344
13341345 struct AVCodecInternal;
13351346
libavcodec/utils.c+1−0
@@ -725,6 +725,7 @@ MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_duration) · 724 unmodified lines
725725 MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_pos)
726726 MAKE_ACCESSORS(AVFrame, frame, int64_t, channel_layout)
727727 MAKE_ACCESSORS(AVFrame, frame, int, sample_rate)
728+MAKE_ACCESSORS(AVFrame, frame, AVDictionary *, metadata)
728729
729730 MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
730731
libavcodec/version.h+1−1
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 */
2828
2929 #define LIBAVCODEC_VERSION_MAJOR 54
30−#define LIBAVCODEC_VERSION_MINOR 37
30+#define LIBAVCODEC_VERSION_MINOR 38
3131 #define LIBAVCODEC_VERSION_MICRO 100
3232
3333 #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