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