diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_aiff.c | 6 | ||||
-rw-r--r-- | src/demuxers/demux_asf.c | 8 | ||||
-rw-r--r-- | src/demuxers/demux_avi.c | 6 | ||||
-rw-r--r-- | src/demuxers/demux_cda.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_fli.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_mng.c | 10 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_ogg.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_real.c | 53 | ||||
-rw-r--r-- | src/demuxers/demux_realaudio.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_snd.c | 7 | ||||
-rw-r--r-- | src/demuxers/demux_wav.c | 7 | ||||
-rw-r--r-- | src/libflac/decoder_flac.c | 23 | ||||
-rw-r--r-- | src/libsputext/demux_sputext.c | 7 | ||||
-rw-r--r-- | src/xine-engine/buffer_types.c | 58 |
15 files changed, 127 insertions, 79 deletions
diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index d8660ad21..9eb5bca02 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -19,7 +19,7 @@ * * AIFF File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_aiff.c,v 1.26 2003/01/19 23:33:33 tmmm Exp $ + * $Id: demux_aiff.c,v 1.27 2003/01/23 16:11:56 miguelfreitas Exp $ * */ @@ -432,7 +432,9 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return NULL; + return "audio/x-aiff: aif, aiff: AIFF audio;" + "audio/aiff: aif, aiff: AIFF audio;" + "audio/x-pn-aiff: aif, aiff: AIFF audio;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 49042265b..bde88db2f 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_asf.c,v 1.98 2003/01/18 00:06:02 tmattern Exp $ + * $Id: demux_asf.c,v 1.99 2003/01/23 16:11:56 miguelfreitas Exp $ * * demultiplexer for asf streams * @@ -1570,9 +1570,9 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return "video/x-ms-asf: asf: ASF animation;" - "video/x-ms-wmv: wmv: WMV animation;" - "application/vnd.ms-asf: asf: ASF animation;"; + return "video/x-ms-asf: asf: ASF video;" + "video/x-ms-wmv: wmv: WMV video;" + "application/vnd.ms-asf: asf: ASF video;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 9d7b6bc1d..182bc6e40 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_avi.c,v 1.147 2003/01/10 21:10:56 miguelfreitas Exp $ + * $Id: demux_avi.c,v 1.148 2003/01/23 16:12:00 miguelfreitas Exp $ * * demultiplexer for avi streams * @@ -1563,8 +1563,8 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return "video/msvideo: avi: AVI animation;" - "video/x-msvideo: avi: AVI animation;"; + return "video/msvideo: avi: AVI video;" + "video/x-msvideo: avi: AVI video;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_cda.c b/src/demuxers/demux_cda.c index 9446a82bb..d49bb56c0 100644 --- a/src/demuxers/demux_cda.c +++ b/src/demuxers/demux_cda.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_cda.c,v 1.40 2003/01/10 21:10:57 miguelfreitas Exp $ + * $Id: demux_cda.c,v 1.41 2003/01/23 16:12:02 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -259,7 +259,7 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return "audio/cda: CD Audio"; + return NULL; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c index 8378f8009..a11380c48 100644 --- a/src/demuxers/demux_fli.c +++ b/src/demuxers/demux_fli.c @@ -22,7 +22,7 @@ * avoid while programming a FLI decoder, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_fli.c,v 1.36 2003/01/19 23:33:33 tmmm Exp $ + * $Id: demux_fli.c,v 1.37 2003/01/23 16:12:02 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -365,7 +365,7 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return NULL; + return "video/x-flic: fli,flc: Autodesk FLIC files;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_mng.c b/src/demuxers/demux_mng.c index 636559e35..267ae0816 100644 --- a/src/demuxers/demux_mng.c +++ b/src/demuxers/demux_mng.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mng.c,v 1.5 2003/01/10 11:57:16 miguelfreitas Exp $ + * $Id: demux_mng.c,v 1.6 2003/01/23 16:12:03 miguelfreitas Exp $ * * demux_mng.c, Demuxer plugin for Multiple-image Network Graphics format * @@ -368,10 +368,10 @@ static char *get_extensions(demux_class_t *this_gen) static char *get_mimetypes(demux_class_t *this_gen) { - return "image/png: png: PNG image" - "image/x-png: png: PNG image" - "video/mng: mng: MNG animation" - "video/x-mng: mng: MNG animation"; + return "image/png: png: PNG image;" + "image/x-png: png: PNG image;" + "video/mng: mng: MNG animation;" + "video/x-mng: mng: MNG animation;"; } static void class_dispose(demux_class_t *this) diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index da81fbb60..d3b9c66f9 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg_block.c,v 1.156 2003/01/11 11:29:22 esnel Exp $ + * $Id: demux_mpeg_block.c,v 1.157 2003/01/23 16:12:04 miguelfreitas Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -1180,7 +1180,7 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return ""; + return NULL; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index c703846f9..4750a07ad 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_ogg.c,v 1.60 2003/01/10 21:11:05 miguelfreitas Exp $ + * $Id: demux_ogg.c,v 1.61 2003/01/23 16:12:12 miguelfreitas Exp $ * * demultiplexer for ogg streams * @@ -1045,7 +1045,8 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return "audio/x-ogg: ogg: OggVorbis Audio;"; + return "audio/x-ogg: ogg: OggVorbis Audio;" + "application/x-ogg: ogg: OggVorbis Audio;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 097da65e9..f40849e6a 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -28,7 +28,7 @@ * * Based on FFmpeg's libav/rm.c. * - * $Id: demux_real.c,v 1.36 2003/01/19 23:33:33 tmmm Exp $ + * $Id: demux_real.c,v 1.37 2003/01/23 16:12:13 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -416,17 +416,9 @@ static void real_parse_headers (demux_real_t *this) { return; } - if (!strncmp (fourcc, "dnet", 4)) - this->audio_buf_type = BUF_AUDIO_DNET; - else if (!strncmp (fourcc, "sipr", 4)) - this->audio_buf_type = BUF_AUDIO_SIPRO; - else if (!strncmp (fourcc, "cook", 4)) - this->audio_buf_type = BUF_AUDIO_COOK; - else if (!strncmp (fourcc, "atrc", 4)) - this->audio_buf_type = BUF_AUDIO_ATRK; - else - this->audio_buf_type = 0; - + this->stream->stream_info[XINE_STREAM_INFO_AUDIO_FOURCC] = *(uint32_t *)fourcc; + this->audio_buf_type = formattag_to_buf_audio(*(uint32_t *)fourcc); + #ifdef LOG printf ("demux_real: audio codec, buf type %08x\n", this->audio_buf_type); @@ -468,37 +460,17 @@ static void real_parse_headers (demux_real_t *this) { #endif this->stream->stream_info[XINE_STREAM_INFO_VIDEO_BITRATE] = mdpr->avg_bit_rate; - /* if ( strncmp(video_fmt, "RV10", 4) == 0 ) { - this->video_stream_num = mdpr->stream_number; - this->video_buf_type = BUF_VIDEO_RV10; - this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1; -#ifdef LOG - printf("demux_real: RV10 video detected\n"); -#endif - } else */ if ( strncmp(video_fmt, "RV20", 4) == 0 ) { - this->video_stream_num = mdpr->stream_number; - this->video_buf_type = BUF_VIDEO_RV20; - this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1; -#ifdef LOG - printf("demux_real: RV20 video detected\n"); -#endif - } else if ( strncmp(video_fmt, "RV30", 4) == 0 ) { - this->video_stream_num = mdpr->stream_number; - this->video_buf_type = BUF_VIDEO_RV30; - this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1; + this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] = *(uint32_t *)video_fmt; + + this->video_buf_type = fourcc_to_buf_video(*(uint32_t *)video_fmt); + + if( this->video_buf_type ) { -#ifdef LOG - printf("demux_real: RV30 video detected\n"); -#endif - } else if ( strncmp(video_fmt, "RV40", 4) == 0 ) { this->video_stream_num = mdpr->stream_number; - this->video_buf_type = BUF_VIDEO_RV40; this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1; -#ifdef LOG - printf("demux_real: RV40 video detected\n"); -#endif } else { - fprintf(stderr, "demux_real: codec not recognized as video\n"); + printf("demux_real: video codec [%c%c%c%c] not recognized\n", + video_fmt[0],video_fmt[1],video_fmt[2],video_fmt[3]); } if ( this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] ) { @@ -1177,8 +1149,7 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return "audio/x-pn-realaudio: ra, rm, ram: Real Media File;" - "audio/x-realaudio: ra: Real Media File;"; + return "audio/x-pn-realaudio: ra, rm, ram: Real Media File;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 4207c7343..33eae2c21 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -19,7 +19,7 @@ * * RealAudio File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_realaudio.c,v 1.15 2003/01/19 23:33:33 tmmm Exp $ + * $Id: demux_realaudio.c,v 1.16 2003/01/23 16:12:14 miguelfreitas Exp $ * */ @@ -374,7 +374,7 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return NULL; + return "audio/x-realaudio: ra: RealAudio File;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c index da63e1616..6ea1719f3 100644 --- a/src/demuxers/demux_snd.c +++ b/src/demuxers/demux_snd.c @@ -19,7 +19,7 @@ * * SND/AU File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_snd.c,v 1.25 2003/01/19 23:33:33 tmmm Exp $ + * $Id: demux_snd.c,v 1.26 2003/01/23 16:12:15 miguelfreitas Exp $ * */ @@ -403,7 +403,10 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return NULL; + return "audio/basic: snd,au: ULAW (Sun) audio;" + "audio/x-basic: snd,au: ULAW (Sun) audio;" + "audio/x-pn-au: snd,au: ULAW (Sun) audio;"; + } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 429ca8f34..b5806fa90 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -20,7 +20,7 @@ * MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net) * based on WAV specs that are available far and wide * - * $Id: demux_wav.c,v 1.35 2003/01/19 23:33:33 tmmm Exp $ + * $Id: demux_wav.c,v 1.36 2003/01/23 16:12:15 miguelfreitas Exp $ * */ @@ -403,7 +403,10 @@ static char *get_extensions (demux_class_t *this_gen) { } static char *get_mimetypes (demux_class_t *this_gen) { - return NULL; + return "audio/x-wav: wav: WAV audio;" + "audio/wav: wav: WAV audio;" + "audio/x-pn-wav: wav: WAV audio;" + "audio/x-pn-windows-acm: wav: WAV audio;"; } static void class_dispose (demux_class_t *this_gen) { diff --git a/src/libflac/decoder_flac.c b/src/libflac/decoder_flac.c index f46d35cbf..36278df12 100644 --- a/src/libflac/decoder_flac.c +++ b/src/libflac/decoder_flac.c @@ -35,6 +35,9 @@ #include "audio_out.h" #include "buffer.h" +/* +#define LOG 1 +*/ typedef struct { audio_decoder_class_t decoder_class; @@ -77,14 +80,18 @@ flac_read_callback (const FLAC__StreamDecoder *decoder, flac_decoder_t *this = (flac_decoder_t *)client_data; int number_of_bytes_to_copy; +#ifdef LOG printf("FLAC_DEC: flac_read_callback: %d\n", *bytes); +#endif if (this->buf_pos > *bytes) number_of_bytes_to_copy = *bytes; else number_of_bytes_to_copy = this->buf_pos; +#ifdef LOG printf("FLAC_DEC: number_of_bytes_to_copy: %d\n", number_of_bytes_to_copy); +#endif *bytes = number_of_bytes_to_copy; @@ -114,7 +121,9 @@ flac_write_callback (const FLAC__StreamDecoder *decoder, int16_t *data16; int i,j; +#ifdef LOG printf("FLAC_DEC: flac_write_callback\n"); +#endif while( samples_left ) { @@ -159,13 +168,17 @@ flac_metadata_callback (const FLAC__StreamDecoder *decoder, { flac_decoder_t *this = (flac_decoder_t *)client_data; +#ifdef LOG printf("FLAC_DEC: Metadata callback called!\n"); +#endif if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO) { +#ifdef LOG printf("FLAC_DEC: min_blocksize = %d\n", metadata->data.stream_info.min_blocksize); printf("FLAC_DEC: max_blocksize = %d\n", metadata->data.stream_info.max_blocksize); printf("FLAC_DEC: min_framesize = %d\n", metadata->data.stream_info.min_framesize); printf("FLAC_DEC: max_framesize = %d\n", metadata->data.stream_info.max_framesize); +#endif /* does not work well: this->min_size = 2 * metadata->data.stream_info.max_blocksize; */ @@ -179,6 +192,7 @@ flac_error_callback (const FLAC__StreamDecoder *decoder, void *client_data) { /* This will be called if there is an error in the flac stream */ +#ifdef LOG printf("FLAC_DEC: flac_error_callback\n"); if (status == FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC) @@ -189,6 +203,7 @@ flac_error_callback (const FLAC__StreamDecoder *decoder, printf("FLAC_DEC: Frame's data did not match the CRC in the footer.\n"); else printf("FLAC_DEC: unknown error.\n"); +#endif return; } @@ -218,7 +233,9 @@ flac_discontinuity (audio_decoder_t *this_gen) flac_decoder_t *this = (flac_decoder_t *) this_gen; this->pts = 0; +#ifdef LOG printf("FLAC_DEC: Discontinuity!\n"); +#endif } static void @@ -280,7 +297,9 @@ flac_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { this->buf_size += 2 * buf->size; this->buf = realloc (this->buf, this->buf_size); +#ifdef LOG printf("FLAC_DEC: reallocating buffer to %d\n", this->buf_size); +#endif } xine_fast_memcpy (&this->buf[this->buf_pos], buf->content, buf->size); @@ -294,10 +313,14 @@ flac_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) if( FLAC__stream_decoder_get_state(this->flac_decoder) == FLAC__STREAM_DECODER_SEARCH_FOR_METADATA ) { +#ifdef LOG printf("FLAC_DEC: process_until_end_of_metadata\n"); +#endif ret = FLAC__stream_decoder_process_until_end_of_metadata (this->flac_decoder); } else { +#ifdef LOG printf("FLAC_DEC: process_single\n"); +#endif ret = FLAC__stream_decoder_process_single (this->flac_decoder); } } diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c index 15de8e100..f5b09ddb9 100644 --- a/src/libsputext/demux_sputext.c +++ b/src/libsputext/demux_sputext.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_sputext.c,v 1.9 2003/01/12 15:29:08 miguelfreitas Exp $ + * $Id: demux_sputext.c,v 1.10 2003/01/23 16:12:19 miguelfreitas Exp $ * * code based on old libsputext/xine_decoder.c * @@ -994,7 +994,10 @@ static char *get_demux_extensions (demux_class_t *this_gen) { } static char *get_demux_mimetypes (demux_class_t *this_gen) { - return "text/plain: asc txt sub srt: VIDEO subtitles;"; + return NULL; + + /* do not report this mimetype, it might confuse browsers. */ + /* "text/plain: asc txt sub srt: VIDEO subtitles;" */ } static void demux_class_dispose (demux_class_t *this_gen) { diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 667620844..5b82579ed 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer_types.c,v 1.51 2003/01/18 15:29:21 miguelfreitas Exp $ + * $Id: buffer_types.c,v 1.52 2003/01/23 16:12:19 miguelfreitas Exp $ * * * contents: @@ -264,13 +264,6 @@ static video_db_t video_db[] = { }, { { - 0 - }, - BUF_VIDEO_RV10, - "" -}, -{ - { meFOURCC('D','I','B',' '), /* device-independent bitmap */ meFOURCC('r','a','w',' '), 0 @@ -503,6 +496,31 @@ static video_db_t video_db[] = { }, { { + meFOURCC('R', 'V', '1', '0'), + 0 + }, + BUF_VIDEO_RV10, + "Real Video 1.0" +}, +{ + { + meFOURCC('R', 'V', '2', '0'), + 0 + }, + BUF_VIDEO_RV20, + "Real Video 2.0" +}, +{ + { + meFOURCC('R', 'V', '3', '0'), + 0 + }, + BUF_VIDEO_RV30, + "Real Video 3.0" +}, +{ + { + meFOURCC('R', 'V', '4', '0'), 0 }, BUF_VIDEO_RV40, @@ -721,6 +739,30 @@ static audio_db_t audio_db[] = { }, { { + meFOURCC('s', 'i', 'p', 'r'), + 0 + }, + BUF_AUDIO_SIPRO, + "RealAudio SIPRO" +}, +{ + { + meFOURCC('c', 'o', 'o', 'k'), + 0 + }, + BUF_AUDIO_COOK, + "RealAudio COOK" +}, +{ + { + meFOURCC('a', 't', 'r', 'c'), + 0 + }, + BUF_AUDIO_ATRK, + "RealAudio ATRK" +}, +{ + { meFOURCC('Q', 'c', 'l', 'p'), 0 }, |