Unified · Split
| @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 · 1 unmodified line | ||
| 2 | 2 | |
| 3 | 3 | API changes, most recent first: |
| 4 | 4 | |
| 5 | +2024-02-xx - xxxxxxxxxx - lavu 58.37.100 - channel_layout.h | |
| 6 | + Add av_channel_layout_custom_init(). | |
| 7 | + | |
| 5 | 8 | 2024-02-04 - xxxxxxxxxx - lavc 60.39.100 - packet.h |
| 6 | 9 | Add AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT. |
| 7 | 10 | |
| @@ -398,6 +398,26 @@ int av_get_standard_channel_layout(unsigned index, uint64_t *layout, · 397 unmodified lines | ||
| 398 | 398 | FF_ENABLE_DEPRECATION_WARNINGS |
| 399 | 399 | #endif |
| 400 | 400 | |
| 401 | +int av_channel_layout_custom_init(AVChannelLayout *channel_layout, int nb_channels) | |
| 402 | +{ | |
| 403 | + AVChannelCustom *map; | |
| 404 | + | |
| 405 | + if (nb_channels <= 0) | |
| 406 | + return AVERROR(EINVAL); | |
| 407 | + | |
| 408 | + map = av_calloc(nb_channels, sizeof(*channel_layout->u.map)); | |
| 409 | + if (!map) | |
| 410 | + return AVERROR(ENOMEM); | |
| 411 | + for (int i = 0; i < nb_channels; i++) | |
| 412 | + map[i].id = AV_CHAN_UNKNOWN; | |
| 413 | + | |
| 414 | + channel_layout->order = AV_CHANNEL_ORDER_CUSTOM; | |
| 415 | + channel_layout->nb_channels = nb_channels; | |
| 416 | + channel_layout->u.map = map; | |
| 417 | + | |
| 418 | + return 0; | |
| 419 | +} | |
| 420 | + | |
| 401 | 421 | int av_channel_layout_from_mask(AVChannelLayout *channel_layout, |
| 402 | 422 | uint64_t mask) |
| 403 | 423 | { |
| @@ -617,6 +617,23 @@ void av_channel_description_bprint(struct AVBPrint *bp, enum AVChannel channel_i · 616 unmodified lines | ||
| 617 | 617 | */ |
| 618 | 618 | enum AVChannel av_channel_from_string(const char *name); |
| 619 | 619 | |
| 620 | +/** | |
| 621 | + * Initialize a custom channel layout with the specified number of channels. | |
| 622 | + * The channel map will be allocated and the designation of all channels will | |
| 623 | + * be set to AV_CHAN_UNKNOWN. | |
| 624 | + * | |
| 625 | + * This is only a convenience helper function, a custom channel layout can also | |
| 626 | + * be constructed without using this. | |
| 627 | + * | |
| 628 | + * @param channel_layout the layout structure to be initialized | |
| 629 | + * @param nb_channels the number of channels | |
| 630 | + * | |
| 631 | + * @return 0 on success | |
| 632 | + * AVERROR(EINVAL) if the number of channels <= 0 | |
| 633 | + * AVERROR(ENOMEM) if the channel map could not be allocated | |
| 634 | + */ | |
| 635 | +int av_channel_layout_custom_init(AVChannelLayout *channel_layout, int nb_channels); | |
| 636 | + | |
| 620 | 637 | /** |
| 621 | 638 | * Initialize a native channel layout from a bitmask indicating which channels |
| 622 | 639 | * are present. |
| @@ -79,8 +79,8 @@ · 78 unmodified lines | ||
| 79 | 79 | */ |
| 80 | 80 | |
| 81 | 81 | #define LIBAVUTIL_VERSION_MAJOR 58 |
| 82 | −#define LIBAVUTIL_VERSION_MINOR 36 | |
| 83 | −#define LIBAVUTIL_VERSION_MICRO 101 | |
| 82 | +#define LIBAVUTIL_VERSION_MINOR 37 | |
| 83 | +#define LIBAVUTIL_VERSION_MICRO 100 | |
| 84 | 84 | |
| 85 | 85 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| 86 | 86 | LIBAVUTIL_VERSION_MINOR, \ |