* 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
Showing the changes to libavfilter/avfilter.h (1 of 39 files). Show all
Unified · Split
| @@ -60,22 +60,6 @@ typedef struct AVFilterFormats AVFilterFormats; · 59 unmodified lines | |||
| 60 | */ | 60 | */ |
| 61 | typedef struct AVFilterBuffer { | 61 | typedef struct AVFilterBuffer { |
| 62 | uint8_t *data[8]; ///< buffer data for each plane/channel | 62 | 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 | ||
| 79 | 63 | ||
| 80 | /** | 64 | /** |
| 81 | * pointers to the data planes/channels. | 65 | * pointers to the data planes/channels. |
| @@ -92,6 +76,21 @@ typedef struct AVFilterBuffer { · 10 unmodified lines | |||
| 92 | * in order to access all channels. | 76 | * in order to access all channels. |
| 93 | */ | 77 | */ |
| 94 | uint8_t **extended_data; | 78 | 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 | ||
| 95 | } AVFilterBuffer; | 94 | } AVFilterBuffer; |
| 96 | 95 | ||
| 97 | #define AV_PERM_READ 0x01 ///< can read from the buffer | 96 | #define AV_PERM_READ 0x01 ///< can read from the buffer |
| @@ -141,23 +140,6 @@ typedef struct AVFilterBufferRefVideoProps { · 43 unmodified lines | |||
| 141 | typedef struct AVFilterBufferRef { | 140 | typedef struct AVFilterBufferRef { |
| 142 | AVFilterBuffer *buf; ///< the buffer that this is a reference to | 141 | AVFilterBuffer *buf; ///< the buffer that this is a reference to |
| 143 | uint8_t *data[8]; ///< picture/audio data for each plane | 142 | 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 | |||
| 161 | /** | 143 | /** |
| 162 | * pointers to the data planes/channels. | 144 | * pointers to the data planes/channels. |
| 163 | * | 145 | * |
| @@ -173,6 +155,24 @@ typedef struct AVFilterBufferRef { · 9 unmodified lines | |||
| 173 | * in order to access all channels. | 155 | * in order to access all channels. |
| 174 | */ | 156 | */ |
| 175 | uint8_t **extended_data; | 157 | 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 | ||
| 176 | } AVFilterBufferRef; | 176 | } AVFilterBufferRef; |
| 177 | 177 | ||
| 178 | /** | 178 | /** |
| @@ -388,7 +388,22 @@ void avfilter_default_end_frame(AVFilterLink *link); · 209 unmodified lines | |||
| 388 | typedef struct AVFilter { | 388 | typedef struct AVFilter { |
| 389 | const char *name; ///< filter name | 389 | const char *name; ///< filter name |
| 390 | 390 | ||
| 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 | */ | ||
| 392 | 407 | ||
| 393 | /** | 408 | /** |
| 394 | * Filter initialization function. Args contains the user-supplied | 409 | * Filter initialization function. Args contains the user-supplied |
| @@ -413,14 +428,7 @@ typedef struct AVFilter { · 18 unmodified lines | |||
| 413 | */ | 428 | */ |
| 414 | int (*query_formats)(AVFilterContext *); | 429 | int (*query_formats)(AVFilterContext *); |
| 415 | 430 | ||
| 416 | const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none | 431 | int priv_size; ///< size of private data to allocate for the filter |
| 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; | ||
| 424 | 432 | ||
| 425 | /** | 433 | /** |
| 426 | * Make the filter instance process a command. | 434 | * Make the filter instance process a command. |
| @@ -445,23 +453,22 @@ struct AVFilterContext { · 18 unmodified lines | |||
| 445 | 453 | ||
| 446 | char *name; ///< name of this filter instance | 454 | char *name; ///< name of this filter instance |
| 447 | 455 | ||
| 456 | AVFilterPad *input_pads; ///< array of input pads | ||
| 457 | AVFilterLink **inputs; ///< array of pointers to input links | ||
| 448 | #if FF_API_FOO_COUNT | 458 | #if FF_API_FOO_COUNT |
| 449 | unsigned input_count; ///< @deprecated use nb_inputs | 459 | unsigned input_count; ///< @deprecated use nb_inputs |
| 450 | #endif | 460 | #endif |
| 451 | AVFilterPad *input_pads; ///< array of input pads | 461 | unsigned nb_inputs; ///< number of input pads |
| 452 | AVFilterLink **inputs; ///< array of pointers to input links | ||
| 453 | 462 | ||
| 463 | AVFilterPad *output_pads; ///< array of output pads | ||
| 464 | AVFilterLink **outputs; ///< array of pointers to output links | ||
| 454 | #if FF_API_FOO_COUNT | 465 | #if FF_API_FOO_COUNT |
| 455 | unsigned output_count; ///< @deprecated use nb_outputs | 466 | unsigned output_count; ///< @deprecated use nb_outputs |
| 456 | #endif | 467 | #endif |
| 457 | AVFilterPad *output_pads; ///< array of output pads | 468 | unsigned nb_outputs; ///< number of output pads |
| 458 | AVFilterLink **outputs; ///< array of pointers to output links | ||
| 459 | 469 | ||
| 460 | void *priv; ///< private data for use by the filter | 470 | void *priv; ///< private data for use by the filter |
| 461 | 471 | ||
| 462 | unsigned nb_inputs; ///< number of input pads | ||
| 463 | unsigned nb_outputs; ///< number of output pads | ||
| 464 | |||
| 465 | struct AVFilterCommand *command_queue; | 472 | struct AVFilterCommand *command_queue; |
| 466 | }; | 473 | }; |
| 467 | 474 | ||
| @@ -479,13 +486,6 @@ struct AVFilterLink { · 11 unmodified lines | |||
| 479 | AVFilterContext *dst; ///< dest filter | 486 | AVFilterContext *dst; ///< dest filter |
| 480 | AVFilterPad *dstpad; ///< input pad on the dest filter | 487 | AVFilterPad *dstpad; ///< input pad on the dest filter |
| 481 | 488 | ||
| 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 | |||
| 489 | enum AVMediaType type; ///< filter media type | 489 | enum AVMediaType type; ///< filter media type |
| 490 | 490 | ||
| 491 | /* These parameters apply only to video */ | 491 | /* These parameters apply only to video */ |
| @@ -498,28 +498,6 @@ struct AVFilterLink { · 6 unmodified lines | |||
| 498 | 498 | ||
| 499 | int format; ///< agreed upon media format | 499 | int format; ///< agreed upon media format |
| 500 | 500 | ||
| 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 | |||
| 523 | /** | 501 | /** |
| 524 | * Define the time base used by the PTS of the frames/samples | 502 | * Define the time base used by the PTS of the frames/samples |
| 525 | * which will pass through this link. | 503 | * which will pass through this link. |
| @@ -536,6 +514,16 @@ struct AVFilterLink { · 10 unmodified lines | |||
| 536 | * New public fields should be added right above. | 514 | * New public fields should be added right above. |
| 537 | ***************************************************************** | 515 | ***************************************************************** |
| 538 | */ | 516 | */ |
| 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 | |||
| 539 | /** | 527 | /** |
| 540 | * Lists of channel layouts and sample rates used for automatic | 528 | * Lists of channel layouts and sample rates used for automatic |
| 541 | * negotiation. | 529 | * negotiation. |
| @@ -554,6 +542,25 @@ struct AVFilterLink { · 12 unmodified lines | |||
| 554 | */ | 542 | */ |
| 555 | int request_samples; | 543 | int request_samples; |
| 556 | 544 | ||
| 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 | |||
| 557 | struct AVFilterPool *pool; | 564 | struct AVFilterPool *pool; |
| 558 | 565 | ||
| 559 | /** | 566 | /** |