Move related fields closer together.
Unified · Split
| @@ -72,6 +72,19 @@ typedef struct AVCodecParameters { · 71 unmodified lines | ||
| 72 | 72 | */ |
| 73 | 73 | int extradata_size; |
| 74 | 74 | |
| 75 | + /** | |
| 76 | + * Additional data associated with the entire stream. | |
| 77 | + * | |
| 78 | + * Should be allocated with av_packet_side_data_new() or | |
| 79 | + * av_packet_side_data_add(), and will be freed by avcodec_parameters_free(). | |
| 80 | + */ | |
| 81 | + AVPacketSideData *coded_side_data; | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * Amount of entries in @ref coded_side_data. | |
| 85 | + */ | |
| 86 | + int nb_coded_side_data; | |
| 87 | + | |
| 75 | 88 | /** |
| 76 | 89 | * - video: the pixel format, the value corresponds to enum AVPixelFormat. |
| 77 | 90 | * - audio: the sample format, the value corresponds to enum AVSampleFormat. |
| @@ -130,6 +143,18 @@ typedef struct AVCodecParameters { · 52 unmodified lines | ||
| 130 | 143 | */ |
| 131 | 144 | AVRational sample_aspect_ratio; |
| 132 | 145 | |
| 146 | + /** | |
| 147 | + * Video only. Number of frames per second, for streams with constant frame | |
| 148 | + * durations. Should be set to { 0, 1 } when some frames have differing | |
| 149 | + * durations or if the value is not known. | |
| 150 | + * | |
| 151 | + * @note This field correponds to values that are stored in codec-level | |
| 152 | + * headers and is typically overridden by container/transport-layer | |
| 153 | + * timestamps, when available. It should thus be used only as a last resort, | |
| 154 | + * when no higher-level timing information is available. | |
| 155 | + */ | |
| 156 | + AVRational framerate; | |
| 157 | + | |
| 133 | 158 | /** |
| 134 | 159 | * Video only. The order of the fields in interlaced video. |
| 135 | 160 | */ |
| @@ -149,6 +174,10 @@ typedef struct AVCodecParameters { · 13 unmodified lines | ||
| 149 | 174 | */ |
| 150 | 175 | int video_delay; |
| 151 | 176 | |
| 177 | + /** | |
| 178 | + * Audio only. The channel layout and number of channels. | |
| 179 | + */ | |
| 180 | + AVChannelLayout ch_layout; | |
| 152 | 181 | /** |
| 153 | 182 | * Audio only. The number of audio samples per second. |
| 154 | 183 | */ |
| @@ -183,36 +212,6 @@ typedef struct AVCodecParameters { · 28 unmodified lines | ||
| 183 | 212 | * Audio only. Number of samples to skip after a discontinuity. |
| 184 | 213 | */ |
| 185 | 214 | int seek_preroll; |
| 186 | − | |
| 187 | − /** | |
| 188 | − * Audio only. The channel layout and number of channels. | |
| 189 | − */ | |
| 190 | − AVChannelLayout ch_layout; | |
| 191 | − | |
| 192 | − /** | |
| 193 | − * Video only. Number of frames per second, for streams with constant frame | |
| 194 | − * durations. Should be set to { 0, 1 } when some frames have differing | |
| 195 | − * durations or if the value is not known. | |
| 196 | − * | |
| 197 | − * @note This field correponds to values that are stored in codec-level | |
| 198 | − * headers and is typically overridden by container/transport-layer | |
| 199 | − * timestamps, when available. It should thus be used only as a last resort, | |
| 200 | − * when no higher-level timing information is available. | |
| 201 | − */ | |
| 202 | − AVRational framerate; | |
| 203 | − | |
| 204 | − /** | |
| 205 | − * Additional data associated with the entire stream. | |
| 206 | − * | |
| 207 | − * Should be allocated with av_packet_side_data_new() or | |
| 208 | − * av_packet_side_data_add(), and will be freed by avcodec_parameters_free(). | |
| 209 | − */ | |
| 210 | − AVPacketSideData *coded_side_data; | |
| 211 | − | |
| 212 | − /** | |
| 213 | − * Amount of entries in @ref coded_side_data. | |
| 214 | − */ | |
| 215 | − int nb_coded_side_data; | |
| 216 | 215 | } AVCodecParameters; |
| 217 | 216 | |
| 218 | 217 | /** |