diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-27 01:58:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-27 01:58:09 +0200 |
commit | b536e2facfa0872adeb6aaae4189f9b90d907e36 (patch) | |
tree | 3649d9dd83aa7e0ed617ce3de4a1b7020ef89251 /libavfilter/avfilter.h | |
parent | 5916bc46581230c68c946c0b4733cce381eddcbd (diff) | |
parent | c29c1a1b6bade2b9118c7fa01239c622c2238656 (diff) | |
download | ffmpeg-b536e2facfa0872adeb6aaae4189f9b90d907e36.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avconv: add an assert to silence an uninitialized variable warning.
avconv: shut up an uninitialized variable warning.
avfiltergraph: shut up uninitialized variable warning.
af_join: initialize a variable to shut up gcc warning.
amix: fix format specifier for AVFilterLink.sample_rate.
lavfi: make filters less verbose.
mpc8: read APE tags.
lavr: x86: fix ff_conv_fltp_to_flt_6ch function prototypes
libm: provide fallback definition for cbrtf() using powf()
network: Don't redefine error codes if they already exist in errno.h
configure: Check for sys/time.h
network: Include unistd.h from network.h
avconv: don't include vsrc_buffer.h, which doesn't exist anymore
lavfi: reorder AVFilterLink fields.
lavfi: reorder AVFilterContext fields.
lavfi: reorder AVFilter fields.
lavfi: reorder AVFilterBufferRef fields.
lavfi: reorder AVFilterBuffer fields.
Conflicts:
configure
libavcodec/v210dec.h
libavfilter/asrc_anullsrc.c
libavfilter/avfilter.h
libavfilter/buffersrc.c
libavfilter/src_movie.c
libavfilter/vf_aspect.c
libavfilter/vf_crop.c
libavfilter/vf_drawbox.c
libavfilter/vf_fade.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vsrc_color.c
libavformat/network.h
libavutil/libm.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r-- | libavfilter/avfilter.h | 163 |
1 files changed, 85 insertions, 78 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 14f51b92a3..b679635805 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -60,22 +60,6 @@ typedef struct AVFilterFormats AVFilterFormats; */ typedef struct AVFilterBuffer { uint8_t *data[8]; ///< buffer data for each plane/channel - int linesize[8]; ///< number of bytes per line - - unsigned refcount; ///< number of references to this buffer - - /** private data to be used by a custom free function */ - void *priv; - /** - * A pointer to the function to deallocate this buffer if the default - * function is not sufficient. This could, for example, add the memory - * back into a memory pool to be reused later without the overhead of - * reallocating it from scratch. - */ - void (*free)(struct AVFilterBuffer *buf); - - int format; ///< media format - int w, h; ///< width and height of the allocated buffer /** * pointers to the data planes/channels. @@ -92,6 +76,21 @@ typedef struct AVFilterBuffer { * in order to access all channels. */ uint8_t **extended_data; + int linesize[8]; ///< number of bytes per line + + /** private data to be used by a custom free function */ + void *priv; + /** + * A pointer to the function to deallocate this buffer if the default + * function is not sufficient. This could, for example, add the memory + * back into a memory pool to be reused later without the overhead of + * reallocating it from scratch. + */ + void (*free)(struct AVFilterBuffer *buf); + + int format; ///< media format + int w, h; ///< width and height of the allocated buffer + unsigned refcount; ///< number of references to this buffer } AVFilterBuffer; #define AV_PERM_READ 0x01 ///< can read from the buffer @@ -141,23 +140,6 @@ typedef struct AVFilterBufferRefVideoProps { typedef struct AVFilterBufferRef { AVFilterBuffer *buf; ///< the buffer that this is a reference to uint8_t *data[8]; ///< picture/audio data for each plane - int linesize[8]; ///< number of bytes per line - int format; ///< media format - - /** - * presentation timestamp. The time unit may change during - * filtering, as it is specified in the link and the filter code - * may need to rescale the PTS accordingly. - */ - int64_t pts; - int64_t pos; ///< byte position in stream, -1 if unknown - - int perms; ///< permissions, see the AV_PERM_* flags - - enum AVMediaType type; ///< media type of buffer data - AVFilterBufferRefVideoProps *video; ///< video buffer specific properties - AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties - /** * pointers to the data planes/channels. * @@ -173,6 +155,24 @@ typedef struct AVFilterBufferRef { * in order to access all channels. */ uint8_t **extended_data; + int linesize[8]; ///< number of bytes per line + + AVFilterBufferRefVideoProps *video; ///< video buffer specific properties + AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties + + /** + * presentation timestamp. The time unit may change during + * filtering, as it is specified in the link and the filter code + * may need to rescale the PTS accordingly. + */ + int64_t pts; + int64_t pos; ///< byte position in stream, -1 if unknown + + int format; ///< media format + + int perms; ///< permissions, see the AV_PERM_* flags + + enum AVMediaType type; ///< media type of buffer data } AVFilterBufferRef; /** @@ -388,7 +388,22 @@ void avfilter_default_end_frame(AVFilterLink *link); typedef struct AVFilter { const char *name; ///< filter name - int priv_size; ///< size of private data to allocate for the filter + /** + * A description for the filter. You should use the + * NULL_IF_CONFIG_SMALL() macro to define it. + */ + const char *description; + + const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none + const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none + + /***************************************************************** + * All fields below this line are not part of the public API. They + * may not be used outside of libavfilter and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ /** * Filter initialization function. Args contains the user-supplied @@ -413,14 +428,7 @@ typedef struct AVFilter { */ int (*query_formats)(AVFilterContext *); - const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none - const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none - - /** - * A description for the filter. You should use the - * NULL_IF_CONFIG_SMALL() macro to define it. - */ - const char *description; + int priv_size; ///< size of private data to allocate for the filter /** * Make the filter instance process a command. @@ -445,23 +453,22 @@ struct AVFilterContext { char *name; ///< name of this filter instance + AVFilterPad *input_pads; ///< array of input pads + AVFilterLink **inputs; ///< array of pointers to input links #if FF_API_FOO_COUNT unsigned input_count; ///< @deprecated use nb_inputs #endif - AVFilterPad *input_pads; ///< array of input pads - AVFilterLink **inputs; ///< array of pointers to input links + unsigned nb_inputs; ///< number of input pads + AVFilterPad *output_pads; ///< array of output pads + AVFilterLink **outputs; ///< array of pointers to output links #if FF_API_FOO_COUNT unsigned output_count; ///< @deprecated use nb_outputs #endif - AVFilterPad *output_pads; ///< array of output pads - AVFilterLink **outputs; ///< array of pointers to output links + unsigned nb_outputs; ///< number of output pads void *priv; ///< private data for use by the filter - unsigned nb_inputs; ///< number of input pads - unsigned nb_outputs; ///< number of output pads - struct AVFilterCommand *command_queue; }; @@ -479,13 +486,6 @@ struct AVFilterLink { AVFilterContext *dst; ///< dest filter AVFilterPad *dstpad; ///< input pad on the dest filter - /** stage of the initialization of the link properties (dimensions, etc) */ - enum { - AVLINK_UNINIT = 0, ///< not started - AVLINK_STARTINIT, ///< started, but incomplete - AVLINK_INIT ///< complete - } init_state; - enum AVMediaType type; ///< filter media type /* These parameters apply only to video */ @@ -499,28 +499,6 @@ struct AVFilterLink { int format; ///< agreed upon media format /** - * Lists of formats and channel layouts supported by the input and output - * filters respectively. These lists are used for negotiating the format - * to actually be used, which will be loaded into the format and - * channel_layout members, above, when chosen. - * - */ - AVFilterFormats *in_formats; - AVFilterFormats *out_formats; - - /** - * The buffer reference currently being sent across the link by the source - * filter. This is used internally by the filter system to allow - * automatic copying of buffers which do not have sufficient permissions - * for the destination. This should not be accessed directly by the - * filters. - */ - AVFilterBufferRef *src_buf; - - AVFilterBufferRef *cur_buf; - AVFilterBufferRef *out_buf; - - /** * Define the time base used by the PTS of the frames/samples * which will pass through this link. * During the configuration stage, each filter is supposed to @@ -537,6 +515,16 @@ struct AVFilterLink { ***************************************************************** */ /** + * Lists of formats and channel layouts supported by the input and output + * filters respectively. These lists are used for negotiating the format + * to actually be used, which will be loaded into the format and + * channel_layout members, above, when chosen. + * + */ + AVFilterFormats *in_formats; + AVFilterFormats *out_formats; + + /** * Lists of channel layouts and sample rates used for automatic * negotiation. */ @@ -554,6 +542,25 @@ struct AVFilterLink { */ int request_samples; + /** stage of the initialization of the link properties (dimensions, etc) */ + enum { + AVLINK_UNINIT = 0, ///< not started + AVLINK_STARTINIT, ///< started, but incomplete + AVLINK_INIT ///< complete + } init_state; + + /** + * The buffer reference currently being sent across the link by the source + * filter. This is used internally by the filter system to allow + * automatic copying of buffers which do not have sufficient permissions + * for the destination. This should not be accessed directly by the + * filters. + */ + AVFilterBufferRef *src_buf; + + AVFilterBufferRef *cur_buf; + AVFilterBufferRef *out_buf; + struct AVFilterPool *pool; /** |