Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b6b2f343
Commit
b6b2f343
authored
Dec 26, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: implement ff_query_formats_all().
parent
7bb98b75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
formats.c
libavfilter/formats.c
+13
-2
formats.h
libavfilter/formats.h
+8
-0
No files found.
libavfilter/formats.c
View file @
b6b2f343
...
...
@@ -516,7 +516,8 @@ void ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
ff_formats_ref
,
formats
);
}
int
ff_default_query_formats
(
AVFilterContext
*
ctx
)
static
int
default_query_formats_common
(
AVFilterContext
*
ctx
,
AVFilterChannelLayouts
*
(
layouts
)(
void
))
{
enum
AVMediaType
type
=
ctx
->
inputs
&&
ctx
->
inputs
[
0
]
?
ctx
->
inputs
[
0
]
->
type
:
ctx
->
outputs
&&
ctx
->
outputs
[
0
]
?
ctx
->
outputs
[
0
]
->
type
:
...
...
@@ -524,13 +525,23 @@ int ff_default_query_formats(AVFilterContext *ctx)
ff_set_common_formats
(
ctx
,
ff_all_formats
(
type
));
if
(
type
==
AVMEDIA_TYPE_AUDIO
)
{
ff_set_common_channel_layouts
(
ctx
,
ff_all_channel_
layouts
());
ff_set_common_channel_layouts
(
ctx
,
layouts
());
ff_set_common_samplerates
(
ctx
,
ff_all_samplerates
());
}
return
0
;
}
int
ff_default_query_formats
(
AVFilterContext
*
ctx
)
{
return
default_query_formats_common
(
ctx
,
ff_all_channel_layouts
);
}
int
ff_query_formats_all
(
AVFilterContext
*
ctx
)
{
return
default_query_formats_common
(
ctx
,
ff_all_channel_counts
);
}
/* internal functions for parsing audio format arguments */
int
ff_parse_pixel_format
(
enum
AVPixelFormat
*
ret
,
const
char
*
arg
,
void
*
log_ctx
)
...
...
libavfilter/formats.h
View file @
b6b2f343
...
...
@@ -172,6 +172,14 @@ void ff_channel_layouts_changeref(AVFilterChannelLayouts **oldref,
int
ff_default_query_formats
(
AVFilterContext
*
ctx
);
/**
* Set the formats list to all existing formats.
* This function behaves like ff_default_query_formats(), except it also
* accepts channel layouts with unknown disposition. It should only be used
* with audio filters.
*/
int
ff_query_formats_all
(
AVFilterContext
*
ctx
);
/**
* Create a list of supported formats. This is intended for use in
...
...
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