summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-05 22:43:44 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-06 01:08:33 +0200
commitad60b3b1811f6fce23baf8cf081f469244004aae (patch)
tree940b8fe92e81801860c5d010d3031e51cd02511a /libavfilter/avfilter.h
parent647e2e070f0dbb7055c3a1443de0f5ed3292e0cc (diff)
parentecf79c4d3e8baaf2f303278ef81db6f8407656bc (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: vorbis: Validate that the floor 1 X values contain no duplicates. avprobe: Identify codec probe failures rather than calling them unsupported codecs. avformat: Probe codecs at score 0 on buffer exhaustion conditions. avformat: Factorize codec probing. Indeo Audio decoder imc: make IMDCT support stereo output imc: move channel-specific data into separate context lavfi: remove request/poll and drawing functions from public API on next bump lavfi: make avfilter_insert_pad and pals private on next bump. lavfi: make formats API private on next bump. avplay: use buffersrc instead of custom input filter. avtools: move buffer management code from avconv to cmdutils. avconv: don't use InputStream in the buffer management code. avconv: fix exiting when max frames is reached. mpc8: fix maximum bands handling aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono. Conflicts: Changelog cmdutils.h ffmpeg.c ffplay.c ffprobe.c libavcodec/avcodec.h libavcodec/mpc8.c libavcodec/v210dec.h libavcodec/version.h libavcodec/vorbisdec.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/formats.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_boxblur.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fifo.c libavfilter/vf_format.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hflip.c libavfilter/vf_hqdn3d.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_select.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_yadif.c libavfilter/vsrc_color.c libavfilter/vsrc_testsrc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h160
1 files changed, 51 insertions, 109 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 10803c54fa..334a1c104f 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -60,6 +60,7 @@ const char *avfilter_license(void);
typedef struct AVFilterContext AVFilterContext;
typedef struct AVFilterLink AVFilterLink;
typedef struct AVFilterPad AVFilterPad;
+typedef struct AVFilterFormats AVFilterFormats;
/**
* A reference-counted buffer data type used by the filter system. Filters
@@ -210,6 +211,7 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask);
*/
void avfilter_unref_buffer(AVFilterBufferRef *ref);
+#if FF_API_FILTERS_PUBLIC
/**
* Remove a reference to a buffer and set the pointer to NULL.
* If this is the last reference to the buffer, the buffer itself
@@ -258,14 +260,18 @@ void avfilter_unref_bufferp(AVFilterBufferRef **ref);
* we must ensure that all links which reference either pre-merge format list
* get updated as well. Therefore, we have the format list structure store a
* pointer to each of the pointers to itself.
+ * @addtogroup lavfi_deprecated
+ * @deprecated Those functions are only useful inside filters and
+ * user filters are not supported at this point.
+ * @{
*/
-typedef struct AVFilterFormats {
+struct AVFilterFormats {
unsigned format_count; ///< number of formats
int *formats; ///< list of media formats
unsigned refcount; ///< number of references to this list
struct AVFilterFormats ***refs; ///< references to this list
-} AVFilterFormats;
+};
/**
* Create a list of supported formats. This is intended for use in
@@ -275,6 +281,7 @@ typedef struct AVFilterFormats {
* empty list is created.
* @return the format list, with no existing references
*/
+attribute_deprecated
AVFilterFormats *avfilter_make_format_list(const int *fmts);
/**
@@ -284,16 +291,12 @@ AVFilterFormats *avfilter_make_format_list(const int *fmts);
*
* @return a non negative value in case of success, or a negative
* value corresponding to an AVERROR code in case of error
- */
-int avfilter_add_format(AVFilterFormats **avff, int64_t fmt);
-
-#if FF_API_OLD_ALL_FORMATS_API
-/**
* @deprecated Use avfilter_make_all_formats() instead.
*/
attribute_deprecated
+int avfilter_add_format(AVFilterFormats **avff, int64_t fmt);
+attribute_deprecated
AVFilterFormats *avfilter_all_formats(enum AVMediaType type);
-#endif
/**
* Return a list of all formats supported by FFmpeg for the given media type.
@@ -320,6 +323,7 @@ AVFilterFormats *avfilter_make_all_packing_formats(void);
* If a and b do not share any common formats, neither is modified, and NULL
* is returned.
*/
+attribute_deprecated
AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b);
/**
@@ -334,40 +338,36 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b);
* | |____| | | |____|
* |________| |________________________
*/
+attribute_deprecated
void avfilter_formats_ref(AVFilterFormats *formats, AVFilterFormats **ref);
-
+attribute_deprecated
+void avfilter_formats_unref(AVFilterFormats **ref);
+attribute_deprecated
+void avfilter_formats_changeref(AVFilterFormats **oldref,
+ AVFilterFormats **newref);
/**
- * If *ref is non-NULL, remove *ref as a reference to the format list
- * it currently points to, deallocates that list if this was the last
- * reference, and sets *ref to NULL.
- *
- * Before After
- * ________ ________ NULL
- * |formats |<--------. |formats | ^
- * | ____ | ____|________________ | ____ | ____|________________
- * | |refs| | | __|_ | |refs| | | __|_
- * | |* * | | | | | | AVFilterLink | |* * | | | | | | AVFilterLink
- * | |* *--------->|*ref| | |* | | | |*ref|
- * | |____| | | |____| | |____| | | |____|
- * |________| |_____________________ |________| |_____________________
+ * Helpers for query_formats() which set all links to the same list of
+ * formats/layouts. If there are no links hooked to this filter, the list
+ * of formats is freed.
*/
-void avfilter_formats_unref(AVFilterFormats **ref);
+attribute_deprecated
+void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats);
+
+attribute_deprecated
+void avfilter_set_common_pixel_formats(AVFilterContext *ctx, AVFilterFormats *formats);
+attribute_deprecated
+void avfilter_set_common_sample_formats(AVFilterContext *ctx, AVFilterFormats *formats);
+attribute_deprecated
+void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *formats);
+#if FF_API_PACKING
+attribute_deprecated
+void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats);
+#endif
/**
- *
- * Before After
- * ________ ________
- * |formats |<---------. |formats |<---------.
- * | ____ | ___|___ | ____ | ___|___
- * | |refs| | | | | | |refs| | | | | NULL
- * | |* *--------->|*oldref| | |* *--------->|*newref| ^
- * | |* * | | |_______| | |* * | | |_______| ___|___
- * | |____| | | |____| | | | |
- * |________| |________| |*oldref|
- * |_______|
+ * @}
*/
-void avfilter_formats_changeref(AVFilterFormats **oldref,
- AVFilterFormats **newref);
+#endif
/**
* A filter pad used for either input or output.
@@ -523,19 +523,6 @@ attribute_deprecated
int avfilter_default_query_formats(AVFilterContext *ctx);
#endif
-/**
- * Helpers for query_formats() which set all links to the same list of
- * formats/layouts. If there are no links hooked to this filter, the list
- * of formats is freed.
- */
-void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats);
-void avfilter_set_common_pixel_formats(AVFilterContext *ctx, AVFilterFormats *formats);
-void avfilter_set_common_sample_formats(AVFilterContext *ctx, AVFilterFormats *formats);
-void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *formats);
-#if FF_API_PACKING
-void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats);
-#endif
-
#if FF_API_FILTERS_PUBLIC
/** start_frame() handler for filters which simply pass video along */
attribute_deprecated
@@ -831,6 +818,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data,
enum AVSampleFormat sample_fmt,
uint64_t channel_layout);
+#if FF_API_FILTERS_PUBLIC
/**
* Request an input frame from the filter at the other end of the link.
*
@@ -842,24 +830,10 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data,
*/
int avfilter_request_frame(AVFilterLink *link);
-/**
- * Poll a frame from the filter chain.
- *
- * @param link the input link
- * @return the number of immediately available frames, a negative
- * number in case of error
- */
+attribute_deprecated
int avfilter_poll_frame(AVFilterLink *link);
-/**
- * Notify the next filter of the start of a frame.
- *
- * @param link the output link the frame will be sent over
- * @param picref A reference to the frame about to be sent. The data for this
- * frame need only be valid once draw_slice() is called for that
- * portion. The receiving filter will free this reference when
- * it no longer needs it.
- */
+attribute_deprecated
void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
/**
@@ -867,24 +841,11 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref);
*
* @param link the output link the frame was sent over
*/
+attribute_deprecated
void avfilter_end_frame(AVFilterLink *link);
-
-/**
- * Send a slice to the next filter.
- *
- * Slices have to be provided in sequential order, either in
- * top-bottom or bottom-top order. If slices are provided in
- * non-sequential order the behavior of the function is undefined.
- *
- * @param link the output link over which the frame is being sent
- * @param y offset in pixels from the top of the image for this slice
- * @param h height of this slice in pixels
- * @param slice_dir the assumed direction for sending slices,
- * from the top slice to the bottom slice if the value is 1,
- * from the bottom slice to the top slice if the value is -1,
- * for other values the behavior of the function is undefined.
- */
+attribute_deprecated
void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
+#endif
#define AVFILTER_CMD_FLAG_ONE 1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically
#define AVFILTER_CMD_FLAG_FAST 2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw)
@@ -972,37 +933,18 @@ void avfilter_free(AVFilterContext *filter);
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
unsigned filt_srcpad_idx, unsigned filt_dstpad_idx);
-/**
- * Insert a new pad.
- *
- * @param idx Insertion point. Pad is inserted at the end if this point
- * is beyond the end of the list of pads.
- * @param count Pointer to the number of pads in the list
- * @param padidx_off Offset within an AVFilterLink structure to the element
- * to increment when inserting a new pad causes link
- * numbering to change
- * @param pads Pointer to the pointer to the beginning of the list of pads
- * @param links Pointer to the pointer to the beginning of the list of links
- * @param newpad The new pad to add. A copy is made when adding.
- */
+#if FF_API_FILTERS_PUBLIC
+attribute_deprecated
void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
AVFilterPad **pads, AVFilterLink ***links,
AVFilterPad *newpad);
-/** Insert a new input pad for the filter. */
-static inline void avfilter_insert_inpad(AVFilterContext *f, unsigned index,
- AVFilterPad *p)
-{
- avfilter_insert_pad(index, &f->input_count, offsetof(AVFilterLink, dstpad),
- &f->input_pads, &f->inputs, p);
-}
-
-/** Insert a new output pad for the filter. */
-static inline void avfilter_insert_outpad(AVFilterContext *f, unsigned index,
- AVFilterPad *p)
-{
- avfilter_insert_pad(index, &f->output_count, offsetof(AVFilterLink, srcpad),
- &f->output_pads, &f->outputs, p);
-}
+attribute_deprecated
+void avfilter_insert_inpad(AVFilterContext *f, unsigned index,
+ AVFilterPad *p);
+attribute_deprecated
+void avfilter_insert_outpad(AVFilterContext *f, unsigned index,
+ AVFilterPad *p);
+#endif
#endif /* AVFILTER_AVFILTER_H */