| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * ASF muxer | 2  * ASF muxer | 
| 3  * Copyright (c) 2000, 2001 Fabrice Bellard | 3  * Copyright (c) 2000, 2001 Fabrice Bellard | 
| 4  * | 4  * | 
| 5  * This file is part of FFmpeg. | 5  * This file is part of FFmpeg. | 
| 6  * | 6  * | 
| 7  * FFmpeg is free software; you can redistribute it and/or | 7  * FFmpeg is free software; you can redistribute it and/or | 
| 8  * modify it under the terms of the GNU Lesser General Public | 8  * modify it under the terms of the GNU Lesser General Public | 
| 9  * License as published by the Free Software Foundation; either | 9  * License as published by the Free Software Foundation; either | 
| 10  * version 2.1 of the License, or (at your option) any later version. | 10  * version 2.1 of the License, or (at your option) any later version. | 
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 272     ByteIOContext *pb = s->pb; | 272     ByteIOContext *pb = s->pb; | 
| 273     AVMetadataTag *tags[5]; | 273     AVMetadataTag *tags[5]; | 
| 274     int header_size, n, extra_size, extra_size2, wav_extra_size, file_time; | 274     int header_size, n, extra_size, extra_size2, wav_extra_size, file_time; | 
| 275     int has_title; | 275     int has_title; | 
| 276     int metadata_count; | 276     int metadata_count; | 
| 277     AVCodecContext *enc; | 277     AVCodecContext *enc; | 
| 278     int64_t header_offset, cur_pos, hpos; | 278     int64_t header_offset, cur_pos, hpos; | 
| 279     int bit_rate; | 279     int bit_rate; | 
| 280     int64_t duration; | 280     int64_t duration; | 
| 281 | 281 | 
|  | 282     ff_metadata_conv(&s->metadata, ff_asf_metadata_conv, NULL); | 
|  | 283 | 
| 282     tags[0] = av_metadata_get(s->metadata, "title"    , NULL, 0); | 284     tags[0] = av_metadata_get(s->metadata, "title"    , NULL, 0); | 
| 283     tags[1] = av_metadata_get(s->metadata, "author"   , NULL, 0); | 285     tags[1] = av_metadata_get(s->metadata, "author"   , NULL, 0); | 
| 284     tags[2] = av_metadata_get(s->metadata, "copyright", NULL, 0); | 286     tags[2] = av_metadata_get(s->metadata, "copyright", NULL, 0); | 
| 285     tags[3] = av_metadata_get(s->metadata, "comment"  , NULL, 0); | 287     tags[3] = av_metadata_get(s->metadata, "comment"  , NULL, 0); | 
| 286     tags[4] = av_metadata_get(s->metadata, "rating"   , NULL, 0); | 288     tags[4] = av_metadata_get(s->metadata, "rating"   , NULL, 0); | 
| 287 | 289 | 
| 288     duration = asf->duration + PREROLL_TIME * 10000; | 290     duration = asf->duration + PREROLL_TIME * 10000; | 
| 289     has_title = tags[0] || tags[1] || tags[2] || tags[3] || tags[4]; | 291     has_title = tags[0] || tags[1] || tags[2] || tags[3] || tags[4]; | 
| 290     metadata_count = s->metadata ? s->metadata->count : 0; | 292     metadata_count = s->metadata ? s->metadata->count : 0; | 
| 291 | 293 | 
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 863     CODEC_ID_MP3, | 865     CODEC_ID_MP3, | 
| 864 #else | 866 #else | 
| 865     CODEC_ID_MP2, | 867     CODEC_ID_MP2, | 
| 866 #endif | 868 #endif | 
| 867     CODEC_ID_MSMPEG4V3, | 869     CODEC_ID_MSMPEG4V3, | 
| 868     asf_write_header, | 870     asf_write_header, | 
| 869     asf_write_packet, | 871     asf_write_packet, | 
| 870     asf_write_trailer, | 872     asf_write_trailer, | 
| 871     .flags = AVFMT_GLOBALHEADER, | 873     .flags = AVFMT_GLOBALHEADER, | 
| 872     .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, ff_codec_bmp_ta
     gs, ff_codec_wav_tags, 0}, | 874     .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, ff_codec_bmp_ta
     gs, ff_codec_wav_tags, 0}, | 
| 873     .metadata_conv = ff_asf_metadata_conv, |  | 
| 874 }; | 875 }; | 
| 875 #endif | 876 #endif | 
| 876 | 877 | 
| 877 #if CONFIG_ASF_STREAM_MUXER | 878 #if CONFIG_ASF_STREAM_MUXER | 
| 878 AVOutputFormat asf_stream_muxer = { | 879 AVOutputFormat asf_stream_muxer = { | 
| 879     "asf_stream", | 880     "asf_stream", | 
| 880     NULL_IF_CONFIG_SMALL("ASF format"), | 881     NULL_IF_CONFIG_SMALL("ASF format"), | 
| 881     "video/x-ms-asf", | 882     "video/x-ms-asf", | 
| 882     "asf,wmv,wma", | 883     "asf,wmv,wma", | 
| 883     sizeof(ASFContext), | 884     sizeof(ASFContext), | 
| 884 #if CONFIG_LIBMP3LAME | 885 #if CONFIG_LIBMP3LAME | 
| 885     CODEC_ID_MP3, | 886     CODEC_ID_MP3, | 
| 886 #else | 887 #else | 
| 887     CODEC_ID_MP2, | 888     CODEC_ID_MP2, | 
| 888 #endif | 889 #endif | 
| 889     CODEC_ID_MSMPEG4V3, | 890     CODEC_ID_MSMPEG4V3, | 
| 890     asf_write_stream_header, | 891     asf_write_stream_header, | 
| 891     asf_write_packet, | 892     asf_write_packet, | 
| 892     asf_write_trailer, | 893     asf_write_trailer, | 
| 893     .flags = AVFMT_GLOBALHEADER, | 894     .flags = AVFMT_GLOBALHEADER, | 
| 894     .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, ff_codec_bmp_ta
     gs, ff_codec_wav_tags, 0}, | 895     .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, ff_codec_bmp_ta
     gs, ff_codec_wav_tags, 0}, | 
| 895     .metadata_conv = ff_asf_metadata_conv, |  | 
| 896 }; | 896 }; | 
| 897 #endif //CONFIG_ASF_STREAM_MUXER | 897 #endif //CONFIG_ASF_STREAM_MUXER | 
| OLD | NEW | 
|---|