summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2003-01-01 20:39:19 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2003-01-01 20:39:19 +0000
commit73baf5e122d22c67def6754ea37b8da50f571b1b (patch)
tree1238adb5dc0da38f4eff48ffb1507ff6ab07fbd5 /src
parentd93626d8fc6996d79627e18626ff5dece7dab9bf (diff)
downloadxine-lib-73baf5e122d22c67def6754ea37b8da50f571b1b.tar.gz
xine-lib-73baf5e122d22c67def6754ea37b8da50f571b1b.tar.bz2
real video v40 support by chris rankin, added missing copyright notices/credits for mplayer
CVS patchset: 3746 CVS date: 2003/01/01 20:39:19
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_real.c114
-rw-r--r--src/libreal/xine_decoder.c13
-rw-r--r--src/libw32dll/qt_decoder.c4
-rw-r--r--src/xine-engine/buffer.h3
-rw-r--r--src/xine-engine/buffer_types.c9
-rw-r--r--src/xine-engine/load_plugins.c4
6 files changed, 74 insertions, 73 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c
index 71243ee55..a4172925e 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -21,7 +21,14 @@
* For more information regarding the Real file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_real.c,v 1.28 2002/12/22 16:46:27 holstsn Exp $
+ * video packet sub-demuxer ported from mplayer code (www.mplayerhq.hu):
+ * Real parser & demuxer
+ *
+ * (C) Alex Beregszaszi <alex@naxine.org>
+ *
+ * Based on FFmpeg's libav/rm.c.
+ *
+ * $Id: demux_real.c,v 1.29 2003/01/01 20:39:19 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -448,91 +455,64 @@ static void real_parse_headers (demux_real_t *this) {
break; /* audio */
}
if (!strncmp (mdpr->type_specific_data+off, "VIDO", 4)) {
+ const char *video_fmt = (mdpr->type_specific_data + off + 4);
#ifdef LOG
printf ("demux_real: video detected\n");
#endif
this->stream->stream_info[XINE_STREAM_INFO_VIDEO_BITRATE] = mdpr->avg_bit_rate;
- /* FIXME: insert video codec detection code here */
-
- break; /* video */
- }
- off++;
- }
- }
-
-
-
- /* detect video streamtype */
-
- if (!strncmp (mdpr->type_specific_data+4, "VIDORV20", 8)) {
-
- buf_element_t *buf;
-
- this->video_stream_num = mdpr->stream_number;
- this->video_buf_type = BUF_VIDEO_RV20;
+ 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");
+ 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_HAS_VIDEO] = 1;
-
- buf = this->video_fifo->buffer_pool_alloc (this->video_fifo);
-
- buf->content = buf->mem;
-
- memcpy (buf->content, mdpr->type_specific_data,
- mdpr->type_specific_len);
-
- buf->size = mdpr->type_specific_len;
-
- buf->extra_info->input_pos = 0 ;
- buf->extra_info->input_time = 0 ;
- buf->type = BUF_VIDEO_RV20;
- buf->decoder_flags = BUF_FLAG_HEADER;
-
- this->video_fifo->put (this->video_fifo, buf);
-
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
-
- } else if (!strncmp (mdpr->type_specific_data+4, "VIDORV30", 8)) {
-
- buf_element_t *buf;
-
- this->video_stream_num = mdpr->stream_number;
- this->video_buf_type = BUF_VIDEO_RV30;
-
#ifdef LOG
- printf ("demux_real: RV30 video detected\n");
+ 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");
+ }
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
+ if ( this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] ) {
+ buf_element_t *buf;
- buf = this->video_fifo->buffer_pool_alloc (this->video_fifo);
+ buf = this->video_fifo->buffer_pool_alloc(this->video_fifo);
- buf->content = buf->mem;
+ buf->content = buf->mem;
- memcpy (buf->content, mdpr->type_specific_data,
- mdpr->type_specific_len);
+ memcpy(buf->content, mdpr->type_specific_data,
+ mdpr->type_specific_len);
- buf->size = mdpr->type_specific_len;
+ buf->size = mdpr->type_specific_len;
- buf->extra_info->input_pos = 0 ;
- buf->extra_info->input_time = 0 ;
- buf->type = BUF_VIDEO_RV30;
- buf->decoder_flags = BUF_FLAG_HEADER;
-
- this->video_fifo->put (this->video_fifo, buf);
-
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
-
- } else {
+ buf->type = this->video_buf_type;
+ buf->decoder_flags = BUF_FLAG_HEADER;
+ buf->extra_info->input_pos = 0;
+ buf->extra_info->input_time = 0;
-#ifdef LOG
- printf ("demux_real: codec not recognized as video\n");
-#endif
+ this->video_fifo->put (this->video_fifo, buf);
+ }
+ break; /* video */
+ }
+ off++;
+ } /* while */
}
+
}
free (mdpr);
diff --git a/src/libreal/xine_decoder.c b/src/libreal/xine_decoder.c
index cc23c18a1..a4c80097c 100644
--- a/src/libreal/xine_decoder.c
+++ b/src/libreal/xine_decoder.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: xine_decoder.c,v 1.23 2002/12/23 13:41:16 holstsn Exp $
+ * $Id: xine_decoder.c,v 1.24 2003/01/01 20:39:20 guenter Exp $
*
* thin layer to use real binary-only codecs in xine
*
@@ -192,6 +192,12 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) {
this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
= strdup ("RV 30");
break;
+ case BUF_VIDEO_RV40:
+ if (!load_syms_linux(this, "drv4.so.6.0"))
+ return 0;
+ this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
+ = strdup("RV 40");
+ break;
default:
printf ("libreal: error, i don't handle buf type 0x%08x\n",
buf->type);
@@ -593,7 +599,10 @@ static void *init_class (xine_t *xine, void *data) {
* exported plugin catalog entry
*/
-static uint32_t supported_types[] = { BUF_VIDEO_RV20, BUF_VIDEO_RV30, 0 };
+static uint32_t supported_types[] = { BUF_VIDEO_RV20,
+ BUF_VIDEO_RV30,
+ BUF_VIDEO_RV40,
+ 0 };
static decoder_info_t dec_info_real = {
supported_types, /* supported types */
diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c
index 775cbccdc..d012d9623 100644
--- a/src/libw32dll/qt_decoder.c
+++ b/src/libw32dll/qt_decoder.c
@@ -17,11 +17,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: qt_decoder.c,v 1.5 2002/12/30 05:09:53 tmmm Exp $
+ * $Id: qt_decoder.c,v 1.6 2003/01/01 20:39:20 guenter Exp $
*
* quicktime video/audio decoder plugin, using win32 dlls
* most of this code comes directly from MPlayer
* authors: A'rpi and Sascha Sommer
+ *
+ * rv40 support by Chris Rankin <cj.rankin@ntlworld.com>
*/
#ifdef HAVE_CONFIG_H
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index ba9df8658..884947ae7 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.h
@@ -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.h,v 1.89 2002/12/28 18:18:18 tmmm Exp $
+ * $Id: buffer.h,v 1.90 2003/01/01 20:39:21 guenter Exp $
*
*
* contents:
@@ -138,6 +138,7 @@ extern "C" {
#define BUF_VIDEO_UCOD 0x02360000
#define BUF_VIDEO_WMV9 0x02370000
#define BUF_VIDEO_INTERPLAY 0x02380000
+#define BUF_VIDEO_RV40 0x02390000
/* audio buffer types: (please keep in sync with buffer_types.c) */
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c
index 08a9ebf4a..9c000a63c 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.49 2002/12/21 12:56:52 miguelfreitas Exp $
+ * $Id: buffer_types.c,v 1.50 2003/01/01 20:39:21 guenter Exp $
*
*
* contents:
@@ -501,6 +501,13 @@ static video_db_t video_db[] = {
BUF_VIDEO_UCOD,
"ClearVideo"
},
+{
+ {
+ 0
+ },
+ BUF_VIDEO_RV40,
+ "Real Video 4.0"
+},
{ { 0 }, 0, "last entry" }
};
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 3a4550f67..2d08416da 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.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: load_plugins.c,v 1.127 2002/12/29 14:04:43 mroi Exp $
+ * $Id: load_plugins.c,v 1.128 2003/01/01 20:39:21 guenter Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -1011,6 +1011,8 @@ static demux_plugin_t *probe_demux (xine_stream_t *stream, int method1, int meth
#endif
if ((plugin = ((demux_class_t *)node->plugin_class)->open_plugin(node->plugin_class, stream, input))) {
+ if (stream->xine->verbosity)
+ printf ("load_plugins: using demuxer '%s'\n", node->info->id);
pthread_mutex_unlock (&catalog->lock);
return plugin;
}