| @@ -1036,6 +1036,44 @@ typedef struct AVPanScan{ · 1035 unmodified lines |
| 1036 | 1036 | int16_t position[3][2]; |
| 1037 | 1037 | }AVPanScan; |
| 1038 | 1038 | |
| 1039 | +/** |
| 1040 | + * This structure describes the bitrate properties of an encoded bitstream. It |
| 1041 | + * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD |
| 1042 | + * parameters for H.264/HEVC. |
| 1043 | + */ |
| 1044 | +typedef struct AVCPBProperties { |
| 1045 | + /** |
| 1046 | + * Maximum bitrate of the stream, in bits per second. |
| 1047 | + * Zero if unknown or unspecified. |
| 1048 | + */ |
| 1049 | + int max_bitrate; |
| 1050 | + /** |
| 1051 | + * Minimum bitrate of the stream, in bits per second. |
| 1052 | + * Zero if unknown or unspecified. |
| 1053 | + */ |
| 1054 | + int min_bitrate; |
| 1055 | + /** |
| 1056 | + * Average bitrate of the stream, in bits per second. |
| 1057 | + * Zero if unknown or unspecified. |
| 1058 | + */ |
| 1059 | + int avg_bitrate; |
| 1060 | + |
| 1061 | + /** |
| 1062 | + * The size of the buffer to which the ratecontrol is applied, in bits. |
| 1063 | + * Zero if unknown or unspecified. |
| 1064 | + */ |
| 1065 | + int buffer_size; |
| 1066 | + |
| 1067 | + /** |
| 1068 | + * The delay between the time the packet this structure is associated with |
| 1069 | + * is received and the time when it should be decoded, in periods of a 27MHz |
| 1070 | + * clock. |
| 1071 | + * |
| 1072 | + * UINT64_MAX when unknown or unspecified. |
| 1073 | + */ |
| 1074 | + uint64_t vbv_delay; |
| 1075 | +} AVCPBProperties; |
| 1076 | + |
| 1039 | 1077 | #if FF_API_QSCALE_TYPE |
| 1040 | 1078 | #define FF_QSCALE_TYPE_MPEG1 0 |
| 1041 | 1079 | #define FF_QSCALE_TYPE_MPEG2 1 |
| @@ -1137,6 +1175,11 @@ enum AVPacketSideDataType { · 95 unmodified lines |
| 1137 | 1175 | * e.g. no decoder available for codec. |
| 1138 | 1176 | */ |
| 1139 | 1177 | AV_PKT_DATA_FALLBACK_TRACK, |
| 1178 | + |
| 1179 | + /** |
| 1180 | + * This side data corresponds to the AVCPBProperties struct. |
| 1181 | + */ |
| 1182 | + AV_PKT_DATA_CPB_PROPERTIES, |
| 1140 | 1183 | }; |
| 1141 | 1184 | |
| 1142 | 1185 | typedef struct AVPacketSideData { |
| @@ -4630,6 +4673,17 @@ const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev); · 3487 unmodified lines |
| 4630 | 4673 | */ |
| 4631 | 4674 | const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name); |
| 4632 | 4675 | |
| 4676 | +/** |
| 4677 | + * Allocate a CPB properties structure and initialize its fields to default |
| 4678 | + * values. |
| 4679 | + * |
| 4680 | + * @param size if non-NULL, the size of the allocated struct will be written |
| 4681 | + * here. This is useful for embedding it in side data. |
| 4682 | + * |
| 4683 | + * @return the newly allocated struct or NULL on failure |
| 4684 | + */ |
| 4685 | +AVCPBProperties *av_cpb_properties_alloc(size_t *size); |
| 4686 | + |
| 4633 | 4687 | /** |
| 4634 | 4688 | * @} |
| 4635 | 4689 | */ |