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
60aaf044
Commit
60aaf044
authored
Oct 02, 2011
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audioconvert: add av_get_default_channel_layout public function
parent
2446a8cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
audioconvert.c
libavutil/audioconvert.c
+8
-0
audioconvert.h
libavutil/audioconvert.h
+5
-0
No files found.
libavutil/audioconvert.c
View file @
60aaf044
...
...
@@ -131,3 +131,11 @@ int av_get_channel_layout_nb_channels(int64_t channel_layout)
x
&=
x
-
1
;
// unset lowest set bit
return
count
;
}
int
av_get_default_channel_layout
(
int
nb_channels
)
{
int
i
;
for
(
i
=
0
;
channel_layout_map
[
i
].
name
;
i
++
)
if
(
nb_channels
==
channel_layout_map
[
i
].
nb_channels
)
return
channel_layout_map
[
i
].
layout
;
return
0
;
}
libavutil/audioconvert.h
View file @
60aaf044
...
...
@@ -92,4 +92,9 @@ void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int6
*/
int
av_get_channel_layout_nb_channels
(
int64_t
channel_layout
);
/**
* Return default channel layout for a given number of channels.
*/
int
av_get_default_channel_layout
(
int
nb_channels
);
#endif
/* AVUTIL_AUDIOCONVERT_H */
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