Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
18f61d19
Commit
18f61d19
authored
Jan 29, 2020
by
Anton Khirnov
Committed by
James Almer
Mar 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aptx: convert to new channel layout API
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
a4a73c6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
aptx.c
libavcodec/aptx.c
+1
-1
aptxdec.c
libavcodec/aptxdec.c
+7
-1
aptxenc.c
libavcodec/aptxenc.c
+6
-0
No files found.
libavcodec/aptx.c
View file @
18f61d19
...
...
@@ -509,7 +509,7 @@ av_cold int ff_aptx_init(AVCodecContext *avctx)
AptXContext
*
s
=
avctx
->
priv_data
;
int
chan
,
subband
;
if
(
avctx
->
channels
!=
2
)
if
(
avctx
->
ch
_layout
.
nb_ch
annels
!=
2
)
return
AVERROR_INVALIDDATA
;
s
->
hd
=
avctx
->
codec
->
id
==
AV_CODEC_ID_APTX_HD
;
...
...
libavcodec/aptxdec.c
View file @
18f61d19
...
...
@@ -146,7 +146,7 @@ static int aptx_decode_frame(AVCodecContext *avctx, void *data,
}
/* get output buffer */
frame
->
channels
=
NB_CHANNELS
;
frame
->
ch
_layout
.
nb_ch
annels
=
NB_CHANNELS
;
frame
->
format
=
AV_SAMPLE_FMT_S32P
;
frame
->
nb_samples
=
4
*
avpkt
->
size
/
s
->
block_size
;
if
((
ret
=
ff_get_buffer
(
avctx
,
frame
,
0
))
<
0
)
...
...
@@ -181,7 +181,10 @@ const AVCodec ff_aptx_decoder = {
.
decode
=
aptx_decode_frame
,
.
capabilities
=
AV_CODEC_CAP_DR1
,
.
caps_internal
=
FF_CODEC_CAP_INIT_THREADSAFE
,
#if FF_API_OLD_CHANNEL_LAYOUT
.
channel_layouts
=
(
const
uint64_t
[])
{
AV_CH_LAYOUT_STEREO
,
0
},
#endif
.
ch_layouts
=
(
const
AVChannelLayout
[])
{
AV_CHANNEL_LAYOUT_STEREO
,
{
0
}
},
.
sample_fmts
=
(
const
enum
AVSampleFormat
[])
{
AV_SAMPLE_FMT_S32P
,
AV_SAMPLE_FMT_NONE
},
};
...
...
@@ -198,7 +201,10 @@ const AVCodec ff_aptx_hd_decoder = {
.
decode
=
aptx_decode_frame
,
.
capabilities
=
AV_CODEC_CAP_DR1
,
.
caps_internal
=
FF_CODEC_CAP_INIT_THREADSAFE
,
#if FF_API_OLD_CHANNEL_LAYOUT
.
channel_layouts
=
(
const
uint64_t
[])
{
AV_CH_LAYOUT_STEREO
,
0
},
#endif
.
ch_layouts
=
(
const
AVChannelLayout
[])
{
AV_CHANNEL_LAYOUT_STEREO
,
{
0
}
},
.
sample_fmts
=
(
const
enum
AVSampleFormat
[])
{
AV_SAMPLE_FMT_S32P
,
AV_SAMPLE_FMT_NONE
},
};
...
...
libavcodec/aptxenc.c
View file @
18f61d19
...
...
@@ -253,7 +253,10 @@ const AVCodec ff_aptx_encoder = {
.
encode2
=
aptx_encode_frame
,
.
close
=
aptx_close
,
.
caps_internal
=
FF_CODEC_CAP_INIT_THREADSAFE
,
#if FF_API_OLD_CHANNEL_LAYOUT
.
channel_layouts
=
(
const
uint64_t
[])
{
AV_CH_LAYOUT_STEREO
,
0
},
#endif
.
ch_layouts
=
(
const
AVChannelLayout
[])
{
AV_CHANNEL_LAYOUT_STEREO
,
{
0
}
},
.
sample_fmts
=
(
const
enum
AVSampleFormat
[])
{
AV_SAMPLE_FMT_S32P
,
AV_SAMPLE_FMT_NONE
},
.
supported_samplerates
=
(
const
int
[])
{
8000
,
16000
,
24000
,
32000
,
44100
,
48000
,
0
},
...
...
@@ -272,7 +275,10 @@ const AVCodec ff_aptx_hd_encoder = {
.
encode2
=
aptx_encode_frame
,
.
close
=
aptx_close
,
.
caps_internal
=
FF_CODEC_CAP_INIT_THREADSAFE
,
#if FF_API_OLD_CHANNEL_LAYOUT
.
channel_layouts
=
(
const
uint64_t
[])
{
AV_CH_LAYOUT_STEREO
,
0
},
#endif
.
ch_layouts
=
(
const
AVChannelLayout
[])
{
AV_CHANNEL_LAYOUT_STEREO
,
{
0
}
},
.
sample_fmts
=
(
const
enum
AVSampleFormat
[])
{
AV_SAMPLE_FMT_S32P
,
AV_SAMPLE_FMT_NONE
},
.
supported_samplerates
=
(
const
int
[])
{
8000
,
16000
,
24000
,
32000
,
44100
,
48000
,
0
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment