lavfi: add layout negotiation fields and helper functions.

This commit is contained in:
Mina Nagy Zaki
2011-06-19 20:31:24 +02:00
committed by Stefano Sabatini
parent 527ca3985c
commit fd2c0a5db2
29 changed files with 128 additions and 66 deletions

View File

@ -20,6 +20,7 @@
*/
#include "libavutil/pixdesc.h"
#include "libavutil/audioconvert.h"
#include "avfilter.h"
/**
@ -139,6 +140,27 @@ AVFilterFormats *avfilter_all_formats(enum AVMediaType type)
return ret;
}
AVFilterFormats *avfilter_all_channel_layouts(void)
{
static int64_t chlayouts[] = {
AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO,
AV_CH_LAYOUT_4POINT0,
AV_CH_LAYOUT_QUAD,
AV_CH_LAYOUT_5POINT0,
AV_CH_LAYOUT_5POINT0_BACK,
AV_CH_LAYOUT_5POINT1,
AV_CH_LAYOUT_5POINT1_BACK,
AV_CH_LAYOUT_5POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX,
AV_CH_LAYOUT_7POINT1,
AV_CH_LAYOUT_7POINT1_WIDE,
AV_CH_LAYOUT_7POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX,
-1,
};
return avfilter_make_format64_list(chlayouts);
}
void avfilter_formats_ref(AVFilterFormats *f, AVFilterFormats **ref)
{
*ref = f;