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
5775a183
Commit
5775a183
authored
May 06, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add types and functions for channel layout/samplerate negotiation
parent
394a0267
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
300 additions
and
76 deletions
+300
-76
avfilter.h
libavfilter/avfilter.h
+16
-0
formats.c
libavfilter/formats.c
+206
-76
formats.h
libavfilter/formats.h
+78
-0
No files found.
libavfilter/avfilter.h
View file @
5775a183
...
...
@@ -618,6 +618,22 @@ struct AVFilterLink {
* input link is assumed to be an unchangeable property.
*/
AVRational
time_base
;
/*****************************************************************
* All fields below this line are not part of the public API. They
* may not be used outside of libavfilter and can be changed and
* removed at will.
* New public fields should be added right above.
*****************************************************************
*/
/**
* Lists of channel layouts and sample rates used for automatic
* negotiation.
*/
AVFilterFormats
*
in_samplerates
;
AVFilterFormats
*
out_samplerates
;
struct
AVFilterChannelLayouts
*
in_channel_layouts
;
struct
AVFilterChannelLayouts
*
out_channel_layouts
;
};
/**
...
...
libavfilter/formats.c
View file @
5775a183
This diff is collapsed.
Click to expand it.
libavfilter/formats.h
0 → 100644
View file @
5775a183
/*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVFILTER_FORMATS_H
#define AVFILTER_FORMATS_H
#include "avfilter.h"
typedef
struct
AVFilterChannelLayouts
{
uint64_t
*
channel_layouts
;
///< list of channel layouts
int
nb_channel_layouts
;
///< number of channel layouts
unsigned
refcount
;
///< number of references to this list
struct
AVFilterChannelLayouts
***
refs
;
///< references to this list
}
AVFilterChannelLayouts
;
/**
* Return a channel layouts/samplerates list which contains the intersection of
* the layouts/samplerates of a and b. Also, all the references of a, all the
* references of b, and a and b themselves will be deallocated.
*
* If a and b do not share any common elements, neither is modified, and NULL
* is returned.
*/
AVFilterChannelLayouts
*
ff_merge_channel_layouts
(
AVFilterChannelLayouts
*
a
,
AVFilterChannelLayouts
*
b
);
AVFilterFormats
*
ff_merge_samplerates
(
AVFilterFormats
*
a
,
AVFilterFormats
*
b
);
/**
* Construct an empty AVFilterChannelLayouts/AVFilterFormats struct --
* representing any channel layout/sample rate.
*/
AVFilterChannelLayouts
*
ff_all_channel_layouts
(
void
);
AVFilterFormats
*
ff_all_samplerates
(
void
);
/**
* A helper for query_formats() which sets all links to the same list of channel
* layouts/sample rates. If there are no links hooked to this filter, the list
* is freed.
*/
void
ff_set_common_channel_layouts
(
AVFilterContext
*
ctx
,
AVFilterChannelLayouts
*
layouts
);
void
ff_set_common_samplerates
(
AVFilterContext
*
ctx
,
AVFilterFormats
*
samplerates
);
int
ff_add_channel_layout
(
AVFilterChannelLayouts
**
l
,
uint64_t
channel_layout
);
/**
* Add *ref as a new reference to f.
*/
void
ff_channel_layouts_ref
(
AVFilterChannelLayouts
*
f
,
AVFilterChannelLayouts
**
ref
);
/**
* Remove a reference to a channel layouts list.
*/
void
ff_channel_layouts_unref
(
AVFilterChannelLayouts
**
ref
);
void
ff_channel_layouts_changeref
(
AVFilterChannelLayouts
**
oldref
,
AVFilterChannelLayouts
**
newref
);
#endif // AVFILTER_FORMATS_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