History

lavc: add sample rate and channel layout to AVFrame.

Rationale is the same as for video width/height etc.

Anton Khirnov committed 14 years ago

Commit 828bd081 parent 37f4a974 files · +24 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavcodec/avcodec.h +16 −0
  3. libavcodec/utils.c +4 −0
  4. libavcodec/version.h +1 −1
doc/APIchanges+3−0
@@ -13,6 +13,9 @@ libavutil: 2011-04-18 · 12 unmodified lines
13 13
14API changes, most recent first:14API changes, most recent first:
15 15
162012-xx-xx - xxxxxxx - lavc 54.13.0 - avcodec.h
17 Add sample_rate and channel_layout fields to AVFrame.
18
162012-xx-xx - xxxxxxx - lavr 0.0.1192012-xx-xx - xxxxxxx - lavr 0.0.1
17 Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8.20 Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8.
18 21
libavcodec/avcodec.h+16−0
@@ -1207,6 +1207,22 @@ typedef struct AVFrame { · 1206 unmodified lines
1207 * - decoding: Set by libavcodec.1207 * - decoding: Set by libavcodec.
1208 */1208 */
1209 uint8_t motion_subsample_log2;1209 uint8_t motion_subsample_log2;
1210
1211 /**
1212 * Sample rate of the audio data.
1213 *
1214 * - encoding: unused
1215 * - decoding: set by get_buffer()
1216 */
1217 int sample_rate;
1218
1219 /**
1220 * Channel layout of the audio data.
1221 *
1222 * - encoding: unused
1223 * - decoding: set by get_buffer()
1224 */
1225 uint64_t channel_layout;
1210} AVFrame;1226} AVFrame;
1211 1227
1212struct AVCodecInternal;1228struct AVCodecInternal;
libavcodec/utils.c+4−0
@@ -356,6 +356,10 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame) · 355 unmodified lines
356 else frame->pkt_pts = AV_NOPTS_VALUE;356 else frame->pkt_pts = AV_NOPTS_VALUE;
357 frame->reordered_opaque = avctx->reordered_opaque;357 frame->reordered_opaque = avctx->reordered_opaque;
358 358
359 frame->sample_rate = avctx->sample_rate;
360 frame->format = avctx->sample_fmt;
361 frame->channel_layout = avctx->channel_layout;
362
359 if (avctx->debug & FF_DEBUG_BUFFERS)363 if (avctx->debug & FF_DEBUG_BUFFERS)
360 av_log(avctx, AV_LOG_DEBUG, "default_get_buffer called on frame %p, "364 av_log(avctx, AV_LOG_DEBUG, "default_get_buffer called on frame %p, "
361 "internal audio buffer used\n", frame);365 "internal audio buffer used\n", frame);
libavcodec/version.h+1−1
@@ -27,7 +27,7 @@ · 26 unmodified lines
27 */27 */
28 28
29#define LIBAVCODEC_VERSION_MAJOR 5429#define LIBAVCODEC_VERSION_MAJOR 54
30#define LIBAVCODEC_VERSION_MINOR 1230#define LIBAVCODEC_VERSION_MINOR 13
31#define LIBAVCODEC_VERSION_MICRO 031#define LIBAVCODEC_VERSION_MICRO 0
32 32
33#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \33#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