| 1135 | } |
| 1136 | |
| 1137 | int ff_iamf_write_parameter_blocks(const IAMFContext *iamf, AVIOContext *pb, |
| 1138 | const AVPacket *pkt, void *log_ctx) |
| 1139 | { |
| 1140 | AVIAMFParamDefinition *mix = |
| 1141 | (AVIAMFParamDefinition *)av_packet_get_side_data(pkt, |
| 1142 | AV_PKT_DATA_IAMF_MIX_GAIN_PARAM, |
| 1143 | NULL); |
| 1144 | AVIAMFParamDefinition *demix = |
| 1145 | (AVIAMFParamDefinition *)av_packet_get_side_data(pkt, |
| 1146 | AV_PKT_DATA_IAMF_DEMIXING_INFO_PARAM, |
| 1147 | NULL); |
| 1148 | AVIAMFParamDefinition *recon = |
| 1149 | (AVIAMFParamDefinition *)av_packet_get_side_data(pkt, |
| 1150 | AV_PKT_DATA_IAMF_RECON_GAIN_INFO_PARAM, |
| 1151 | NULL); |
| 1152 | |
| 1153 | if (mix) { |
| 1154 | int ret = write_parameter_block(iamf, pb, mix, log_ctx); |
| 1155 | if (ret < 0) |
| 1156 | return ret; |
| 1157 | } |
| 1158 | if (demix) { |
| 1159 | int ret = write_parameter_block(iamf, pb, demix, log_ctx); |
| 1160 | if (ret < 0) |
| 1161 | return ret; |
| 1162 | } |
| 1163 | if (recon) { |
| 1164 | int ret = write_parameter_block(iamf, pb, recon, log_ctx); |
| 1165 | if (ret < 0) |
| 1166 | return ret; |
| 1167 | } |
| 1168 | |
| 1169 | return 0; |
| 1170 | } |
| 1171 | |
| 1172 | static IAMFAudioElement *get_audio_element(const IAMFContext *c, |
| 1173 | unsigned int audio_substream_id) |
no test coverage detected