summaryrefslogtreecommitdiff
path: root/libavcodec/codec_par.h
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-03-31 19:07:54 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:29 -0300
commit276c06726fbd2f784d51189870bd834e9284812f (patch)
tree31dafced275e0a85c33bc4b79ef08b2dfab3d7e8 /libavcodec/codec_par.h
parentdb6efa1815e217ed76f39aee8b15ee5c64698537 (diff)
avcodecpar: switch to the new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/codec_par.h')
-rw-r--r--libavcodec/codec_par.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/codec_par.h b/libavcodec/codec_par.h
index 10cf79dff1..7660791a12 100644
--- a/libavcodec/codec_par.h
+++ b/libavcodec/codec_par.h
@@ -24,6 +24,7 @@
#include <stdint.h>
#include "libavutil/avutil.h"
+#include "libavutil/channel_layout.h"
#include "libavutil/rational.h"
#include "libavutil/pixfmt.h"
@@ -154,16 +155,22 @@ typedef struct AVCodecParameters {
*/
int video_delay;
+#if FF_API_OLD_CHANNEL_LAYOUT
/**
* Audio only. The channel layout bitmask. May be 0 if the channel layout is
* unknown or unspecified, otherwise the number of bits set must be equal to
* the channels field.
+ * @deprecated use ch_layout
*/
+ attribute_deprecated
uint64_t channel_layout;
/**
* Audio only. The number of audio channels.
+ * @deprecated use ch_layout.nb_channels
*/
+ attribute_deprecated
int channels;
+#endif
/**
* Audio only. The number of audio samples per second.
*/
@@ -198,6 +205,11 @@ typedef struct AVCodecParameters {
* Audio only. Number of samples to skip after a discontinuity.
*/
int seek_preroll;
+
+ /**
+ * Audio only. The channel layout and number of channels.
+ */
+ AVChannelLayout ch_layout;
} AVCodecParameters;
/**