mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
1cbf7fb434
* qatar/master: (26 commits) fate: use diff -b in oneline comparison Add missing version bumps and APIchanges/Changelog entries. lavfi: move buffer management function to a separate file. lavfi: move formats-related functions from default.c to formats.c lavfi: move video-related functions to a separate file. fate: make smjpeg a demux test fate: separate sierra-vmd audio and video tests fate: separate smacker audio and video tests libmp3lame: set supported channel layouts. avconv: automatically insert asyncts when -async is used. avconv: add support for audio filters. lavfi: add asyncts filter. lavfi: add aformat filter lavfi: add an audio buffer sink. lavfi: add an audio buffer source. buffersrc: add av_buffersrc_write_frame(). buffersrc: fix invalid read in uninit if the fifo hasn't been allocated lavfi: rename vsrc_buffer.c to buffersrc.c avfiltergraph: reindent lavfi: add channel layout/sample rate negotiation. ... Conflicts: Changelog doc/APIchanges doc/filters.texi ffmpeg.c ffprobe.c libavcodec/libmp3lame.c libavfilter/Makefile libavfilter/af_aformat.c libavfilter/allfilters.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/avfiltergraph.c libavfilter/buffersrc.c libavfilter/defaults.c libavfilter/formats.c libavfilter/src_buffer.c libavfilter/version.h libavfilter/vf_yadif.c libavfilter/vsrc_buffer.c libavfilter/vsrc_buffer.h libavutil/avutil.h tests/fate/audio.mak tests/fate/demux.mak tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
82 lines
3.0 KiB
C
82 lines
3.0 KiB
C
/*
|
|
* This file is part of FFMpeg.
|
|
*
|
|
* FFmpeg 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.
|
|
*
|
|
* FFmpeg 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 FFmpeg; 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);
|
|
|
|
AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts);
|
|
|
|
|
|
/**
|
|
* 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
|