FFmpeg
libavfilter
formats.h
1
/*
2
* This file is part of FFmpeg.
3
*
4
* FFmpeg is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* FFmpeg is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with FFmpeg; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
#ifndef AVFILTER_FORMATS_H
20
#define AVFILTER_FORMATS_H
21
22
#include "
avfilter.h
"
23
64
struct
AVFilterFormats
{
65
unsigned
nb_formats
;
66
int
*
formats
;
67
68
unsigned
refcount
;
69
struct
AVFilterFormats
***
refs
;
70
};
71
85
typedef
struct
AVFilterChannelLayouts
{
86
uint64_t *
channel_layouts
;
87
int
nb_channel_layouts
;
88
char
all_layouts
;
89
char
all_counts
;
90
91
unsigned
refcount
;
92
struct
AVFilterChannelLayouts
***
refs
;
93
}
AVFilterChannelLayouts
;
94
102
#define FF_COUNT2LAYOUT(c) (0x8000000000000000ULL | (c))
103
108
#define FF_LAYOUT2COUNT(l) (((l) & 0x8000000000000000ULL) ? \
109
(int)((l) & 0x7FFFFFFF) : 0)
110
119
AVFilterChannelLayouts
*ff_merge_channel_layouts(
AVFilterChannelLayouts
*a,
120
AVFilterChannelLayouts
*b);
121
AVFilterFormats
*ff_merge_samplerates(
AVFilterFormats
*a,
122
AVFilterFormats
*b);
123
128
av_warn_unused_result
129
AVFilterChannelLayouts
*ff_all_channel_layouts(
void
);
130
131
av_warn_unused_result
132
AVFilterFormats
*ff_all_samplerates(
void
);
133
138
av_warn_unused_result
139
AVFilterChannelLayouts
*ff_all_channel_counts(
void
);
140
141
av_warn_unused_result
142
AVFilterChannelLayouts
*avfilter_make_format64_list(
const
int64_t *fmts);
143
144
av_warn_unused_result
145
AVFilterChannelLayouts
*ff_make_formatu64_list(
const
uint64_t *fmts);
146
147
153
av_warn_unused_result
154
int
ff_set_common_channel_layouts(
AVFilterContext
*ctx,
155
AVFilterChannelLayouts
*layouts);
156
av_warn_unused_result
157
int
ff_set_common_samplerates(
AVFilterContext
*ctx,
158
AVFilterFormats
*samplerates);
159
165
av_warn_unused_result
166
int
ff_set_common_formats(
AVFilterContext
*ctx,
AVFilterFormats
*formats);
167
168
av_warn_unused_result
169
int
ff_add_channel_layout(
AVFilterChannelLayouts
**l, uint64_t channel_layout);
170
174
av_warn_unused_result
175
int
ff_channel_layouts_ref(
AVFilterChannelLayouts
*f,
176
AVFilterChannelLayouts
**ref);
177
181
void
ff_channel_layouts_unref(
AVFilterChannelLayouts
**ref);
182
183
void
ff_channel_layouts_changeref(
AVFilterChannelLayouts
**oldref,
184
AVFilterChannelLayouts
**newref);
185
186
av_warn_unused_result
187
int
ff_default_query_formats(
AVFilterContext
*ctx);
188
194
av_warn_unused_result
195
int
ff_query_formats_all_layouts(
AVFilterContext
*ctx);
196
204
av_warn_unused_result
205
AVFilterFormats
*ff_make_format_list(
const
int
*fmts);
206
215
av_warn_unused_result
216
int
ff_add_format(
AVFilterFormats
**avff, int64_t fmt);
217
221
av_warn_unused_result
222
AVFilterFormats
*ff_all_formats(
enum
AVMediaType
type);
223
227
av_warn_unused_result
228
AVFilterFormats
*ff_planar_sample_fmts(
void
);
229
238
AVFilterFormats
*ff_merge_formats(
AVFilterFormats
*a,
AVFilterFormats
*b,
239
enum
AVMediaType
type);
240
253
av_warn_unused_result
254
int
ff_formats_ref(
AVFilterFormats
*formats,
AVFilterFormats
**ref);
255
271
void
ff_formats_unref(
AVFilterFormats
**ref);
272
285
void
ff_formats_changeref(
AVFilterFormats
**oldref,
AVFilterFormats
**newref);
286
287
#endif
/* AVFILTER_FORMATS_H */
avfilter.h
Main libavfilter public API header.
AVFilterChannelLayouts::refs
struct AVFilterChannelLayouts *** refs
references to this list
Definition:
formats.h:92
AVFilterFormats::refs
struct AVFilterFormats *** refs
references to this list
Definition:
formats.h:69
AVFilterFormats::refcount
unsigned refcount
number of references to this list
Definition:
formats.h:68
AVFilterChannelLayouts::channel_layouts
uint64_t * channel_layouts
list of channel layouts
Definition:
formats.h:86
AVFilterChannelLayouts::all_counts
char all_counts
accept any channel layout or count
Definition:
formats.h:89
AVFilterFormats::nb_formats
unsigned nb_formats
number of formats
Definition:
formats.h:65
AVFilterChannelLayouts
A list of supported channel layouts.
Definition:
formats.h:85
AVFilterChannelLayouts::all_layouts
char all_layouts
accept any known channel layout
Definition:
formats.h:88
AVMediaType
AVMediaType
Definition:
avutil.h:199
AVFilterChannelLayouts::nb_channel_layouts
int nb_channel_layouts
number of channel layouts
Definition:
formats.h:87
AVFilterChannelLayouts::refcount
unsigned refcount
number of references to this list
Definition:
formats.h:91
AVFilterFormats
A list of supported formats for one end of a filter link.
Definition:
formats.h:64
AVFilterContext
An instance of a filter.
Definition:
avfilter.h:338
AVFilterFormats::formats
int * formats
list of media formats
Definition:
formats.h:66
Generated by
1.8.12