[Redbutton-devel] SF.net SVN: redbutton: [221] redbutton-browser/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-02-16 21:58:41
|
Revision: 221
http://svn.sourceforge.net/redbutton/?rev=221&view=rev
Author: skilvington
Date: 2007-02-16 13:58:40 -0800 (Fri, 16 Feb 2007)
Log Message:
-----------
cope with MPEG stream type 6
Modified Paths:
--------------
redbutton-browser/trunk/MHEGStreamPlayer.c
redbutton-browser/trunk/TODO
redbutton-browser/trunk/mpegts.h
Modified: redbutton-browser/trunk/MHEGStreamPlayer.c
===================================================================
--- redbutton-browser/trunk/MHEGStreamPlayer.c 2007-02-16 21:06:15 UTC (rev 220)
+++ redbutton-browser/trunk/MHEGStreamPlayer.c 2007-02-16 21:58:40 UTC (rev 221)
@@ -221,7 +221,8 @@
p->video->inst.no_video = true;
/* is audio/video output totally disabled */
- if(MHEGEngine_avDisabled())
+ if(MHEGEngine_avDisabled()
+ || (!p->have_video && !p->have_audio))
return;
p->audio_pid = p->audio_tag;
@@ -242,6 +243,17 @@
p->stop = false;
/*
+ * the MPEG type for some streams is set to 6 (STREAM_TYPE_PRIVATE_DATA)
+ * eg the streams for BBC News Multiscreen
+ * presumably, this is stop them getting accidentally picked up when you scan for channels
+ * luckily we know what type MPEG audio and video streams should be
+ */
+ if(p->have_video && p->video_type == STREAM_TYPE_PRIVATE_DATA)
+ p->video_type = STREAM_TYPE_VIDEO_MPEG2;
+ if(p->have_audio && p->audio_type == STREAM_TYPE_PRIVATE_DATA)
+ p->audio_type = STREAM_TYPE_AUDIO_MPEG2;
+
+ /*
* we have three threads:
* decode_thread reads MPEG data from the TS and decodes it into YUV video frames and audio samples
* video_thread takes YUV frames off the videoq list, converts them to RGB and displays them on the screen
Modified: redbutton-browser/trunk/TODO
===================================================================
--- redbutton-browser/trunk/TODO 2007-02-16 21:06:15 UTC (rev 220)
+++ redbutton-browser/trunk/TODO 2007-02-16 21:58:40 UTC (rev 221)
@@ -1,4 +1,4 @@
-find out what MPEG stream type 6 means!
+VideoDecodeOffset
don't keep malloc/free'ing memory for a/v frames
Modified: redbutton-browser/trunk/mpegts.h
===================================================================
--- redbutton-browser/trunk/mpegts.h 2007-02-16 21:06:15 UTC (rev 220)
+++ redbutton-browser/trunk/mpegts.h 2007-02-16 21:58:40 UTC (rev 221)
@@ -6,15 +6,16 @@
#define __MPEGTS_H__
/* stream types we care about */
-#define STREAM_TYPE_VIDEO_MPEG1 0x01
-#define STREAM_TYPE_VIDEO_MPEG2 0x02
-#define STREAM_TYPE_AUDIO_MPEG1 0x03
-#define STREAM_TYPE_AUDIO_MPEG2 0x04
-#define STREAM_TYPE_AUDIO_AAC 0x0f
-#define STREAM_TYPE_VIDEO_MPEG4 0x10
-#define STREAM_TYPE_VIDEO_H264 0x1b
-#define STREAM_TYPE_AUDIO_AC3 0x81
-#define STREAM_TYPE_AUDIO_DTS 0x8a
+#define STREAM_TYPE_VIDEO_MPEG1 0x01
+#define STREAM_TYPE_VIDEO_MPEG2 0x02
+#define STREAM_TYPE_AUDIO_MPEG1 0x03
+#define STREAM_TYPE_AUDIO_MPEG2 0x04
+#define STREAM_TYPE_PRIVATE_DATA 0x06
+#define STREAM_TYPE_AUDIO_AAC 0x0f
+#define STREAM_TYPE_VIDEO_MPEG4 0x10
+#define STREAM_TYPE_VIDEO_H264 0x1b
+#define STREAM_TYPE_AUDIO_AC3 0x81
+#define STREAM_TYPE_AUDIO_DTS 0x8a
typedef struct MpegTSContext MpegTSContext;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|