History

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

Michael Niedermayer committed 14 years ago

Commit b536e2f2 parents 5916bc4 c29c1a139 files · +169 −135Browse files

Showing the changes to libavfilter/avfilter.h (1 of 39 files). Show all

Unified · Split

libavfilter/avfilter.h+85−78
@@ -60,22 +60,6 @@ typedef struct AVFilterFormats AVFilterFormats; · 59 unmodified lines
6060 */
6161 typedef struct AVFilterBuffer {
6262 uint8_t *data[8]; ///< buffer data for each plane/channel
63− int linesize[8]; ///< number of bytes per line
64−
65− unsigned refcount; ///< number of references to this buffer
66−
67− /** private data to be used by a custom free function */
68− void *priv;
69− /**
70− * A pointer to the function to deallocate this buffer if the default
71− * function is not sufficient. This could, for example, add the memory
72− * back into a memory pool to be reused later without the overhead of
73− * reallocating it from scratch.
74− */
75− void (*free)(struct AVFilterBuffer *buf);
76−
77− int format; ///< media format
78− int w, h; ///< width and height of the allocated buffer
7963
8064 /**
8165 * pointers to the data planes/channels.
@@ -92,6 +76,21 @@ typedef struct AVFilterBuffer { · 10 unmodified lines
9276 * in order to access all channels.
9377 */
9478 uint8_t **extended_data;
79+ int linesize[8]; ///< number of bytes per line
80+
81+ /** private data to be used by a custom free function */
82+ void *priv;
83+ /**
84+ * A pointer to the function to deallocate this buffer if the default
85+ * function is not sufficient. This could, for example, add the memory
86+ * back into a memory pool to be reused later without the overhead of
87+ * reallocating it from scratch.
88+ */
89+ void (*free)(struct AVFilterBuffer *buf);
90+
91+ int format; ///< media format
92+ int w, h; ///< width and height of the allocated buffer
93+ unsigned refcount; ///< number of references to this buffer
9594 } AVFilterBuffer;
9695
9796 #define AV_PERM_READ 0x01 ///< can read from the buffer
@@ -141,23 +140,6 @@ typedef struct AVFilterBufferRefVideoProps { · 43 unmodified lines
141140 typedef struct AVFilterBufferRef {
142141 AVFilterBuffer *buf; ///< the buffer that this is a reference to
143142 uint8_t *data[8]; ///< picture/audio data for each plane
144− int linesize[8]; ///< number of bytes per line
145− int format; ///< media format
146−
147− /**
148− * presentation timestamp. The time unit may change during
149− * filtering, as it is specified in the link and the filter code
150− * may need to rescale the PTS accordingly.
151− */
152− int64_t pts;
153− int64_t pos; ///< byte position in stream, -1 if unknown
154−
155− int perms; ///< permissions, see the AV_PERM_* flags
156−
157− enum AVMediaType type; ///< media type of buffer data
158− AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
159− AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
160−
161143 /**
162144 * pointers to the data planes/channels.
163145 *
@@ -173,6 +155,24 @@ typedef struct AVFilterBufferRef { · 9 unmodified lines
173155 * in order to access all channels.
174156 */
175157 uint8_t **extended_data;
158+ int linesize[8]; ///< number of bytes per line
159+
160+ AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
161+ AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
162+
163+ /**
164+ * presentation timestamp. The time unit may change during
165+ * filtering, as it is specified in the link and the filter code
166+ * may need to rescale the PTS accordingly.
167+ */
168+ int64_t pts;
169+ int64_t pos; ///< byte position in stream, -1 if unknown
170+
171+ int format; ///< media format
172+
173+ int perms; ///< permissions, see the AV_PERM_* flags
174+
175+ enum AVMediaType type; ///< media type of buffer data
176176 } AVFilterBufferRef;
177177
178178 /**
@@ -388,7 +388,22 @@ void avfilter_default_end_frame(AVFilterLink *link); · 209 unmodified lines
388388 typedef struct AVFilter {
389389 const char *name; ///< filter name
390390
391− int priv_size; ///< size of private data to allocate for the filter
391+ /**
392+ * A description for the filter. You should use the
393+ * NULL_IF_CONFIG_SMALL() macro to define it.
394+ */
395+ const char *description;
396+
397+ const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none
398+ const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none
399+
400+ /*****************************************************************
401+ * All fields below this line are not part of the public API. They
402+ * may not be used outside of libavfilter and can be changed and
403+ * removed at will.
404+ * New public fields should be added right above.
405+ *****************************************************************
406+ */
392407
393408 /**
394409 * Filter initialization function. Args contains the user-supplied
@@ -413,14 +428,7 @@ typedef struct AVFilter { · 18 unmodified lines
413428 */
414429 int (*query_formats)(AVFilterContext *);
415430
416− const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none
417− const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none
418−
419− /**
420− * A description for the filter. You should use the
421− * NULL_IF_CONFIG_SMALL() macro to define it.
422− */
423− const char *description;
431+ int priv_size; ///< size of private data to allocate for the filter
424432
425433 /**
426434 * Make the filter instance process a command.
@@ -445,23 +453,22 @@ struct AVFilterContext { · 18 unmodified lines
445453
446454 char *name; ///< name of this filter instance
447455
456+ AVFilterPad *input_pads; ///< array of input pads
457+ AVFilterLink **inputs; ///< array of pointers to input links
448458 #if FF_API_FOO_COUNT
449459 unsigned input_count; ///< @deprecated use nb_inputs
450460 #endif
451− AVFilterPad *input_pads; ///< array of input pads
452− AVFilterLink **inputs; ///< array of pointers to input links
461+ unsigned nb_inputs; ///< number of input pads
453462
463+ AVFilterPad *output_pads; ///< array of output pads
464+ AVFilterLink **outputs; ///< array of pointers to output links
454465 #if FF_API_FOO_COUNT
455466 unsigned output_count; ///< @deprecated use nb_outputs
456467 #endif
457− AVFilterPad *output_pads; ///< array of output pads
458− AVFilterLink **outputs; ///< array of pointers to output links
468+ unsigned nb_outputs; ///< number of output pads
459469
460470 void *priv; ///< private data for use by the filter
461471
462− unsigned nb_inputs; ///< number of input pads
463− unsigned nb_outputs; ///< number of output pads
464−
465472 struct AVFilterCommand *command_queue;
466473 };
467474
@@ -479,13 +486,6 @@ struct AVFilterLink { · 11 unmodified lines
479486 AVFilterContext *dst; ///< dest filter
480487 AVFilterPad *dstpad; ///< input pad on the dest filter
481488
482− /** stage of the initialization of the link properties (dimensions, etc) */
483− enum {
484− AVLINK_UNINIT = 0, ///< not started
485− AVLINK_STARTINIT, ///< started, but incomplete
486− AVLINK_INIT ///< complete
487− } init_state;
488−
489489 enum AVMediaType type; ///< filter media type
490490
491491 /* These parameters apply only to video */
@@ -498,28 +498,6 @@ struct AVFilterLink { · 6 unmodified lines
498498
499499 int format; ///< agreed upon media format
500500
501− /**
502− * Lists of formats and channel layouts supported by the input and output
503− * filters respectively. These lists are used for negotiating the format
504− * to actually be used, which will be loaded into the format and
505− * channel_layout members, above, when chosen.
506− *
507− */
508− AVFilterFormats *in_formats;
509− AVFilterFormats *out_formats;
510−
511− /**
512− * The buffer reference currently being sent across the link by the source
513− * filter. This is used internally by the filter system to allow
514− * automatic copying of buffers which do not have sufficient permissions
515− * for the destination. This should not be accessed directly by the
516− * filters.
517− */
518− AVFilterBufferRef *src_buf;
519−
520− AVFilterBufferRef *cur_buf;
521− AVFilterBufferRef *out_buf;
522−
523501 /**
524502 * Define the time base used by the PTS of the frames/samples
525503 * which will pass through this link.
@@ -536,6 +514,16 @@ struct AVFilterLink { · 10 unmodified lines
536514 * New public fields should be added right above.
537515 *****************************************************************
538516 */
517+ /**
518+ * Lists of formats and channel layouts supported by the input and output
519+ * filters respectively. These lists are used for negotiating the format
520+ * to actually be used, which will be loaded into the format and
521+ * channel_layout members, above, when chosen.
522+ *
523+ */
524+ AVFilterFormats *in_formats;
525+ AVFilterFormats *out_formats;
526+
539527 /**
540528 * Lists of channel layouts and sample rates used for automatic
541529 * negotiation.
@@ -554,6 +542,25 @@ struct AVFilterLink { · 12 unmodified lines
554542 */
555543 int request_samples;
556544
545+ /** stage of the initialization of the link properties (dimensions, etc) */
546+ enum {
547+ AVLINK_UNINIT = 0, ///< not started
548+ AVLINK_STARTINIT, ///< started, but incomplete
549+ AVLINK_INIT ///< complete
550+ } init_state;
551+
552+ /**
553+ * The buffer reference currently being sent across the link by the source
554+ * filter. This is used internally by the filter system to allow
555+ * automatic copying of buffers which do not have sufficient permissions
556+ * for the destination. This should not be accessed directly by the
557+ * filters.
558+ */
559+ AVFilterBufferRef *src_buf;
560+
561+ AVFilterBufferRef *cur_buf;
562+ AVFilterBufferRef *out_buf;
563+
557564 struct AVFilterPool *pool;
558565
559566 /**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t