Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5df320e1
Commit
5df320e1
authored
May 28, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audioconvert: add a function for getting the name of a single channel.
parent
406b257d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
audioconvert.c
libavutil/audioconvert.c
+11
-0
audioconvert.h
libavutil/audioconvert.h
+7
-0
No files found.
libavutil/audioconvert.c
View file @
5df320e1
...
...
@@ -202,3 +202,14 @@ int av_get_channel_layout_channel_index(uint64_t channel_layout,
channel_layout
&=
channel
-
1
;
return
av_get_channel_layout_nb_channels
(
channel_layout
);
}
const
char
*
av_get_channel_name
(
uint64_t
channel
)
{
int
i
;
if
(
av_get_channel_layout_nb_channels
(
channel
)
!=
1
)
return
NULL
;
for
(
i
=
0
;
i
<
64
;
i
++
)
if
((
1ULL
<<
i
)
&
channel
)
return
get_channel_name
(
i
);
return
NULL
;
}
libavutil/audioconvert.h
View file @
5df320e1
...
...
@@ -155,6 +155,13 @@ uint64_t av_get_default_channel_layout(int nb_channels);
int
av_get_channel_layout_channel_index
(
uint64_t
channel_layout
,
uint64_t
channel
);
/**
* Get the name of a given channel.
*
* @return channel name on success, NULL on error.
*/
const
char
*
av_get_channel_name
(
uint64_t
channel
);
/**
* @}
*/
...
...
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