2010-07-18 22:37:39 +00:00
|
|
|
/*
|
|
|
|
|
* 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_INTERNAL_H
|
|
|
|
|
#define AVFILTER_INTERNAL_H
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @file
|
|
|
|
|
* internal API functions
|
|
|
|
|
*/
|
|
|
|
|
|
2013-03-27 18:36:51 +01:00
|
|
|
#include "libavutil/internal.h"
|
2010-07-18 22:37:39 +00:00
|
|
|
#include "avfilter.h"
|
2012-04-18 11:02:22 +02:00
|
|
|
|
2023-12-31 13:35:03 -08:00
|
|
|
/**
|
|
|
|
|
* Returns true if a pixel format is "regular YUV", which includes all pixel
|
|
|
|
|
* formats that are affected by YUV colorspace negotiation.
|
|
|
|
|
*/
|
|
|
|
|
int ff_fmt_is_regular_yuv(enum AVPixelFormat fmt);
|
|
|
|
|
|
2011-08-04 12:28:14 +03:00
|
|
|
/* Functions to parse audio format arguments */
|
|
|
|
|
|
2011-08-22 14:56:23 +02:00
|
|
|
/**
|
|
|
|
|
* Parse a pixel format.
|
|
|
|
|
*
|
|
|
|
|
* @param ret pixel format pointer to where the value should be written
|
|
|
|
|
* @param arg string to parse
|
|
|
|
|
* @param log_ctx log context
|
2013-09-15 15:25:09 +02:00
|
|
|
* @return >= 0 in case of success, a negative AVERROR code on error
|
2011-08-22 14:56:23 +02:00
|
|
|
*/
|
2015-10-14 23:00:02 -04:00
|
|
|
av_warn_unused_result
|
2012-10-08 20:54:00 +02:00
|
|
|
int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx);
|
2011-08-22 14:56:23 +02:00
|
|
|
|
2011-08-04 12:28:14 +03:00
|
|
|
/**
|
|
|
|
|
* Parse a sample rate.
|
|
|
|
|
*
|
|
|
|
|
* @param ret unsigned integer pointer to where the value should be written
|
|
|
|
|
* @param arg string to parse
|
|
|
|
|
* @param log_ctx log context
|
2013-09-15 15:25:09 +02:00
|
|
|
* @return >= 0 in case of success, a negative AVERROR code on error
|
2011-08-04 12:28:14 +03:00
|
|
|
*/
|
2015-10-14 23:00:02 -04:00
|
|
|
av_warn_unused_result
|
2011-08-21 19:17:24 +02:00
|
|
|
int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx);
|
2011-08-04 12:28:14 +03:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Parse a channel layout or a corresponding integer representation.
|
|
|
|
|
*
|
|
|
|
|
* @param ret 64bit integer pointer to where the value should be written.
|
2013-10-25 15:07:40 +02:00
|
|
|
* @param nret integer pointer to the number of channels;
|
|
|
|
|
* if not NULL, then unknown channel layouts are accepted
|
2011-08-04 12:28:14 +03:00
|
|
|
* @param arg string to parse
|
|
|
|
|
* @param log_ctx log context
|
2013-09-15 15:25:09 +02:00
|
|
|
* @return >= 0 in case of success, a negative AVERROR code on error
|
2011-08-04 12:28:14 +03:00
|
|
|
*/
|
2015-10-14 23:00:02 -04:00
|
|
|
av_warn_unused_result
|
2021-08-31 11:03:14 -03:00
|
|
|
int ff_parse_channel_layout(AVChannelLayout *ret, int *nret, const char *arg,
|
2013-10-25 15:07:40 +02:00
|
|
|
void *log_ctx);
|
2011-08-04 12:28:14 +03:00
|
|
|
|
2024-03-04 16:23:31 +01:00
|
|
|
/**
|
|
|
|
|
* Negotiate the media format, dimensions, etc of all inputs to a filter.
|
|
|
|
|
*
|
|
|
|
|
* @param filter the filter to negotiate the properties for its inputs
|
|
|
|
|
* @return zero on successful negotiation
|
|
|
|
|
*/
|
|
|
|
|
int ff_filter_config_links(AVFilterContext *filter);
|
|
|
|
|
|
2012-06-05 11:24:07 +02:00
|
|
|
/* misc trace functions */
|
2012-06-01 23:05:13 +02:00
|
|
|
|
2012-06-05 11:24:07 +02:00
|
|
|
#define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func)
|
2012-05-07 11:21:38 +02:00
|
|
|
|
2022-09-12 17:52:18 +02:00
|
|
|
#ifdef TRACE
|
2012-06-05 11:24:07 +02:00
|
|
|
void ff_tlog_link(void *ctx, AVFilterLink *link, int end);
|
2022-09-12 17:52:18 +02:00
|
|
|
#else
|
|
|
|
|
#define ff_tlog_link(ctx, link, end) do { } while(0)
|
|
|
|
|
#endif
|
2012-05-07 11:21:38 +02:00
|
|
|
|
2015-09-30 16:11:57 +02:00
|
|
|
/**
|
|
|
|
|
* Run one round of processing on a filter graph.
|
|
|
|
|
*/
|
|
|
|
|
int ff_filter_graph_run_once(AVFilterGraph *graph);
|
|
|
|
|
|
2011-05-17 16:58:04 +02:00
|
|
|
#endif /* AVFILTER_INTERNAL_H */
|