The planar/packed switch and the packing_formats list is no longer required, since the planar/packed information is now stored in the sample format enum. This is technically a major API break, possibly it should be not too painful as we marked the audio filtering API as unstable.
Showing the changes to libavfilter/avfilter.h (1 of 28 files). Show all
Unified · Split
| @@ -121,7 +121,9 @@ typedef struct AVFilterBufferRefAudioProps { · 120 unmodified lines | |||
| 121 | uint64_t channel_layout; ///< channel layout of audio buffer | 121 | uint64_t channel_layout; ///< channel layout of audio buffer |
| 122 | int nb_samples; ///< number of audio samples per channel | 122 | int nb_samples; ///< number of audio samples per channel |
| 123 | int sample_rate; ///< audio buffer sample rate | 123 | int sample_rate; ///< audio buffer sample rate |
| 124 | #if FF_API_PACKING | ||
| 124 | int planar; ///< audio buffer - planar or packed | 125 | int planar; ///< audio buffer - planar or packed |
| 126 | #endif | ||
| 125 | } AVFilterBufferRefAudioProps; | 127 | } AVFilterBufferRefAudioProps; |
| 126 | 128 | ||
| 127 | /** | 129 | /** |
| @@ -303,10 +305,12 @@ AVFilterFormats *avfilter_make_all_formats(enum AVMediaType type); · 175 unmodified lines | |||
| 303 | */ | 305 | */ |
| 304 | extern const int64_t avfilter_all_channel_layouts[]; | 306 | extern const int64_t avfilter_all_channel_layouts[]; |
| 305 | 307 | ||
| 308 | #if FF_API_PACKING | ||
| 306 | /** | 309 | /** |
| 307 | * Return a list of all audio packing formats. | 310 | * Return a list of all audio packing formats. |
| 308 | */ | 311 | */ |
| 309 | AVFilterFormats *avfilter_make_all_packing_formats(void); | 312 | AVFilterFormats *avfilter_make_all_packing_formats(void); |
| 313 | #endif | ||
| 310 | 314 | ||
| 311 | /** | 315 | /** |
| 312 | * Return a format list which contains the intersection of the formats of | 316 | * Return a format list which contains the intersection of the formats of |
| @@ -519,7 +523,9 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) · 206 unmodified lines | |||
| 519 | void avfilter_set_common_pixel_formats(AVFilterContext *ctx, AVFilterFormats *formats); | 523 | void avfilter_set_common_pixel_formats(AVFilterContext *ctx, AVFilterFormats *formats); |
| 520 | void avfilter_set_common_sample_formats(AVFilterContext *ctx, AVFilterFormats *formats); | 524 | void avfilter_set_common_sample_formats(AVFilterContext *ctx, AVFilterFormats *formats); |
| 521 | void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *formats); | 525 | void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *formats); |
| 526 | #if FF_API_PACKING | ||
| 522 | void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats); | 527 | void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats); |
| 528 | #endif | ||
| 523 | 529 | ||
| 524 | /** Default handler for query_formats() */ | 530 | /** Default handler for query_formats() */ |
| 525 | int avfilter_default_query_formats(AVFilterContext *ctx); | 531 | int avfilter_default_query_formats(AVFilterContext *ctx); |
| @@ -616,10 +622,12 @@ struct AVFilterContext { · 90 unmodified lines | |||
| 616 | struct AVFilterCommand *command_queue; | 622 | struct AVFilterCommand *command_queue; |
| 617 | }; | 623 | }; |
| 618 | 624 | ||
| 625 | #if FF_API_PACKING | ||
| 619 | enum AVFilterPacking { | 626 | enum AVFilterPacking { |
| 620 | AVFILTER_PACKED = 0, | 627 | AVFILTER_PACKED = 0, |
| 621 | AVFILTER_PLANAR, | 628 | AVFILTER_PLANAR, |
| 622 | }; | 629 | }; |
| 630 | #endif | ||
| 623 | 631 | ||
| 624 | /** | 632 | /** |
| 625 | * A link between two filters. This contains pointers to the source and | 633 | * A link between two filters. This contains pointers to the source and |
| @@ -655,7 +663,9 @@ struct AVFilterLink { · 29 unmodified lines | |||
| 655 | #else | 663 | #else |
| 656 | int sample_rate; ///< samples per second | 664 | int sample_rate; ///< samples per second |
| 657 | #endif | 665 | #endif |
| 666 | #if FF_API_PACKING | ||
| 658 | int planar; ///< agreed upon packing mode of audio buffers. true if planar. | 667 | int planar; ///< agreed upon packing mode of audio buffers. true if planar. |
| 668 | #endif | ||
| 659 | 669 | ||
| 660 | int format; ///< agreed upon media format | 670 | int format; ///< agreed upon media format |
| 661 | 671 | ||
| @@ -669,8 +679,10 @@ struct AVFilterLink { · 7 unmodified lines | |||
| 669 | AVFilterFormats *in_formats; | 679 | AVFilterFormats *in_formats; |
| 670 | AVFilterFormats *out_formats; | 680 | AVFilterFormats *out_formats; |
| 671 | 681 | ||
| 682 | #if FF_API_PACKING | ||
| 672 | AVFilterFormats *in_packing; | 683 | AVFilterFormats *in_packing; |
| 673 | AVFilterFormats *out_packing; | 684 | AVFilterFormats *out_packing; |
| 685 | #endif | ||
| 674 | 686 | ||
| 675 | /** | 687 | /** |
| 676 | * The buffer reference currently being sent across the link by the source | 688 | * The buffer reference currently being sent across the link by the source |