| 202 | } |
| 203 | |
| 204 | static void show_format(AVFormatContext *fmt_ctx) |
| 205 | { |
| 206 | AVMetadataTag *tag = NULL; |
| 207 | char val_str[128]; |
| 208 | |
| 209 | printf("[FORMAT]\n"); |
| 210 | |
| 211 | printf("filename=%s\n", fmt_ctx->filename); |
| 212 | printf("nb_streams=%d\n", fmt_ctx->nb_streams); |
| 213 | printf("format_name=%s\n", fmt_ctx->iformat->name); |
| 214 | printf("format_long_name=%s\n", fmt_ctx->iformat->long_name); |
| 215 | printf("start_time=%s\n", time_value_string(val_str, sizeof(val_str), fmt_ctx->start_time, |
| 216 | &AV_TIME_BASE_Q)); |
| 217 | printf("duration=%s\n", time_value_string(val_str, sizeof(val_str), fmt_ctx->duration, |
| 218 | &AV_TIME_BASE_Q)); |
| 219 | printf("size=%s\n", value_string(val_str, sizeof(val_str), fmt_ctx->file_size, |
| 220 | unit_byte_str)); |
| 221 | printf("bit_rate=%s\n", value_string(val_str, sizeof(val_str), fmt_ctx->bit_rate, |
| 222 | unit_bit_per_second_str)); |
| 223 | |
| 224 | if (convert_tags) |
| 225 | av_metadata_conv(fmt_ctx, NULL, fmt_ctx->iformat->metadata_conv); |
| 226 | while ((tag = av_metadata_get(fmt_ctx->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX))) |
| 227 | printf("TAG:%s=%s\n", tag->key, tag->value); |
| 228 | |
| 229 | printf("[/FORMAT]\n"); |
| 230 | } |
| 231 | |
| 232 | static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) |
| 233 | { |
no test coverage detected