Mercurial > libavformat.hg
comparison ffm.c @ 858:66cc656ea404 libavformat
Replace CONFIG_ENCODERS/CONFIG_DECODERS with CONFIG_MUXERS/CONFIG_DEMUXERS
in libavformat to allow building (de)coders and (de)muxers independently at
some point + support for this option in configure.
author | diego |
---|---|
date | Fri, 23 Sep 2005 00:25:41 +0000 |
parents | e8b4454b997d |
children | aa0abab5e320 |
comparison
equal
deleted
inserted
replaced
857:26aaf3eed638 | 858:66cc656ea404 |
---|---|
54 static int64_t get_pts(AVFormatContext *s, offset_t pos); | 54 static int64_t get_pts(AVFormatContext *s, offset_t pos); |
55 | 55 |
56 /* disable pts hack for testing */ | 56 /* disable pts hack for testing */ |
57 int ffm_nopts = 0; | 57 int ffm_nopts = 0; |
58 | 58 |
59 #ifdef CONFIG_ENCODERS | 59 #ifdef CONFIG_MUXERS |
60 static void flush_packet(AVFormatContext *s) | 60 static void flush_packet(AVFormatContext *s) |
61 { | 61 { |
62 FFMContext *ffm = s->priv_data; | 62 FFMContext *ffm = s->priv_data; |
63 int fill_size, h; | 63 int fill_size, h; |
64 ByteIOContext *pb = &s->pb; | 64 ByteIOContext *pb = &s->pb; |
292 put_flush_packet(pb); | 292 put_flush_packet(pb); |
293 } | 293 } |
294 | 294 |
295 return 0; | 295 return 0; |
296 } | 296 } |
297 #endif //CONFIG_ENCODERS | 297 #endif //CONFIG_MUXERS |
298 | 298 |
299 /* ffm demux */ | 299 /* ffm demux */ |
300 | 300 |
301 static int ffm_is_avail_data(AVFormatContext *s, int size) | 301 static int ffm_is_avail_data(AVFormatContext *s, int size) |
302 { | 302 { |
761 ffm_read_packet, | 761 ffm_read_packet, |
762 ffm_read_close, | 762 ffm_read_close, |
763 ffm_seek, | 763 ffm_seek, |
764 }; | 764 }; |
765 | 765 |
766 #ifdef CONFIG_ENCODERS | 766 #ifdef CONFIG_MUXERS |
767 static AVOutputFormat ffm_oformat = { | 767 static AVOutputFormat ffm_oformat = { |
768 "ffm", | 768 "ffm", |
769 "ffm format", | 769 "ffm format", |
770 "", | 770 "", |
771 "ffm", | 771 "ffm", |
775 CODEC_ID_MPEG1VIDEO, | 775 CODEC_ID_MPEG1VIDEO, |
776 ffm_write_header, | 776 ffm_write_header, |
777 ffm_write_packet, | 777 ffm_write_packet, |
778 ffm_write_trailer, | 778 ffm_write_trailer, |
779 }; | 779 }; |
780 #endif //CONFIG_ENCODERS | 780 #endif //CONFIG_MUXERS |
781 | 781 |
782 int ffm_init(void) | 782 int ffm_init(void) |
783 { | 783 { |
784 av_register_input_format(&ffm_iformat); | 784 av_register_input_format(&ffm_iformat); |
785 #ifdef CONFIG_ENCODERS | 785 #ifdef CONFIG_MUXERS |
786 av_register_output_format(&ffm_oformat); | 786 av_register_output_format(&ffm_oformat); |
787 #endif //CONFIG_ENCODERS | 787 #endif //CONFIG_MUXERS |
788 return 0; | 788 return 0; |
789 } | 789 } |