Mercurial > libavformat.hg
comparison mpeg.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 | feca73904e67 |
children | da1d5db0ce5c |
comparison
equal
deleted
inserted
replaced
857:26aaf3eed638 | 858:66cc656ea404 |
---|---|
105 #define STREAM_TYPE_AUDIO_AC3 0x81 | 105 #define STREAM_TYPE_AUDIO_AC3 0x81 |
106 #define STREAM_TYPE_AUDIO_DTS 0x8a | 106 #define STREAM_TYPE_AUDIO_DTS 0x8a |
107 | 107 |
108 static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 }; | 108 static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 }; |
109 | 109 |
110 #ifdef CONFIG_ENCODERS | 110 #ifdef CONFIG_MUXERS |
111 static AVOutputFormat mpeg1system_mux; | 111 static AVOutputFormat mpeg1system_mux; |
112 static AVOutputFormat mpeg1vcd_mux; | 112 static AVOutputFormat mpeg1vcd_mux; |
113 static AVOutputFormat mpeg2vob_mux; | 113 static AVOutputFormat mpeg2vob_mux; |
114 static AVOutputFormat mpeg2svcd_mux; | 114 static AVOutputFormat mpeg2svcd_mux; |
115 static AVOutputFormat mpeg2dvd_mux; | 115 static AVOutputFormat mpeg2dvd_mux; |
1251 assert(fifo_size(&stream->fifo, stream->fifo.rptr) == 0); | 1251 assert(fifo_size(&stream->fifo, stream->fifo.rptr) == 0); |
1252 fifo_free(&stream->fifo); | 1252 fifo_free(&stream->fifo); |
1253 } | 1253 } |
1254 return 0; | 1254 return 0; |
1255 } | 1255 } |
1256 #endif //CONFIG_ENCODERS | 1256 #endif //CONFIG_MUXERS |
1257 | 1257 |
1258 /*********************************************/ | 1258 /*********************************************/ |
1259 /* demux code */ | 1259 /* demux code */ |
1260 | 1260 |
1261 #define MAX_SYNC_SIZE 100000 | 1261 #define MAX_SYNC_SIZE 100000 |
1705 #endif | 1705 #endif |
1706 *ppos = pos; | 1706 *ppos = pos; |
1707 return dts; | 1707 return dts; |
1708 } | 1708 } |
1709 | 1709 |
1710 #ifdef CONFIG_ENCODERS | 1710 #ifdef CONFIG_MUXERS |
1711 static AVOutputFormat mpeg1system_mux = { | 1711 static AVOutputFormat mpeg1system_mux = { |
1712 "mpeg", | 1712 "mpeg", |
1713 "MPEG1 System format", | 1713 "MPEG1 System format", |
1714 "video/mpeg", | 1714 "video/mpeg", |
1715 "mpg,mpeg", | 1715 "mpg,mpeg", |
1773 mpeg_mux_init, | 1773 mpeg_mux_init, |
1774 mpeg_mux_write_packet, | 1774 mpeg_mux_write_packet, |
1775 mpeg_mux_end, | 1775 mpeg_mux_end, |
1776 }; | 1776 }; |
1777 | 1777 |
1778 #endif //CONFIG_ENCODERS | 1778 #endif //CONFIG_MUXERS |
1779 | 1779 |
1780 AVInputFormat mpegps_demux = { | 1780 AVInputFormat mpegps_demux = { |
1781 "mpeg", | 1781 "mpeg", |
1782 "MPEG PS format", | 1782 "MPEG PS format", |
1783 sizeof(MpegDemuxContext), | 1783 sizeof(MpegDemuxContext), |
1790 .flags = AVFMT_SHOW_IDS, | 1790 .flags = AVFMT_SHOW_IDS, |
1791 }; | 1791 }; |
1792 | 1792 |
1793 int mpegps_init(void) | 1793 int mpegps_init(void) |
1794 { | 1794 { |
1795 #ifdef CONFIG_ENCODERS | 1795 #ifdef CONFIG_MUXERS |
1796 av_register_output_format(&mpeg1system_mux); | 1796 av_register_output_format(&mpeg1system_mux); |
1797 av_register_output_format(&mpeg1vcd_mux); | 1797 av_register_output_format(&mpeg1vcd_mux); |
1798 av_register_output_format(&mpeg2vob_mux); | 1798 av_register_output_format(&mpeg2vob_mux); |
1799 av_register_output_format(&mpeg2svcd_mux); | 1799 av_register_output_format(&mpeg2svcd_mux); |
1800 av_register_output_format(&mpeg2dvd_mux); | 1800 av_register_output_format(&mpeg2dvd_mux); |
1801 #endif //CONFIG_ENCODERS | 1801 #endif //CONFIG_MUXERS |
1802 av_register_input_format(&mpegps_demux); | 1802 av_register_input_format(&mpegps_demux); |
1803 return 0; | 1803 return 0; |
1804 } | 1804 } |