summaryrefslogtreecommitdiffstats
path: root/ext/resindvd
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-04-01 17:41:40 +0100
committerJan Schmidt <thaytan@noraisin.net>2009-04-02 14:49:54 +0100
commit70bdf00200ef47efef570b15aed6d8d1de32128b (patch)
tree2aadbe4f0bc88de206671c34f2ef97a82fb615cb /ext/resindvd
parent0cf5e27b5bba04a2a0accebef6ad0ac0eed295e8 (diff)
downloadgst-plugins-bad-70bdf00200ef47efef570b15aed6d8d1de32128b.tar.gz
gst-plugins-bad-70bdf00200ef47efef570b15aed6d8d1de32128b.tar.bz2
gst-plugins-bad-70bdf00200ef47efef570b15aed6d8d1de32128b.zip
resindvd: Send both the logical and physical substream ID in the stream change.
When sending the stream change message(s) to the demuxer, also include the logical stream id along with the physical ID, so that the demuxer can remap logical->physical MPEG stream ID.
Diffstat (limited to 'ext/resindvd')
-rw-r--r--ext/resindvd/resindvdsrc.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c
index 05abe407..d2e3b25a 100644
--- a/ext/resindvd/resindvdsrc.c
+++ b/ext/resindvd/resindvdsrc.c
@@ -112,9 +112,9 @@ static GstStateChangeReturn
rsn_dvdsrc_change_state (GstElement * element, GstStateChange transition);
static void rsn_dvdsrc_prepare_spu_stream_event (resinDvdSrc * src,
- guint8 phys_stream, gboolean forced_only);
+ guint8 logical_stream, guint8 phys_stream, gboolean forced_only);
static void rsn_dvdsrc_prepare_audio_stream_event (resinDvdSrc * src,
- guint8 phys_stream);
+ guint8 logical_stream, guint8 phys_stream);
static gboolean rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src);
static void rsn_dvdsrc_prepare_clut_change_event (resinDvdSrc * src,
const guint32 * clut);
@@ -897,7 +897,8 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock)
GST_DEBUG_OBJECT (src, " physical: %d", event->physical);
GST_DEBUG_OBJECT (src, " logical: %d", event->logical);
- rsn_dvdsrc_prepare_audio_stream_event (src, event->physical);
+ rsn_dvdsrc_prepare_audio_stream_event (src,
+ event->logical, event->physical);
break;
}
case DVDNAV_SPU_STREAM_CHANGE:{
@@ -906,7 +907,8 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock)
gint phys_track = event->physical_wide & 0x1f;
gboolean forced_only = (event->physical_wide & 0x80) ? TRUE : FALSE;
- rsn_dvdsrc_prepare_spu_stream_event (src, phys_track, forced_only);
+ rsn_dvdsrc_prepare_spu_stream_event (src, event->logical, phys_track,
+ forced_only);
GST_DEBUG_OBJECT (src, " physical_wide: %x", event->physical_wide);
GST_DEBUG_OBJECT (src, " physical_letterbox: %x",
@@ -1435,7 +1437,8 @@ not_running:
}
static void
-rsn_dvdsrc_prepare_audio_stream_event (resinDvdSrc * src, guint8 phys_stream)
+rsn_dvdsrc_prepare_audio_stream_event (resinDvdSrc * src, guint8 logical_stream,
+ guint8 phys_stream)
{
GstStructure *s;
GstEvent *e;
@@ -1448,6 +1451,7 @@ rsn_dvdsrc_prepare_audio_stream_event (resinDvdSrc * src, guint8 phys_stream)
s = gst_structure_new ("application/x-gst-dvd",
"event", G_TYPE_STRING, "dvd-set-audio-track",
+ "logical-id", G_TYPE_INT, (gint) logical_stream,
"physical-id", G_TYPE_INT, (gint) phys_stream, NULL);
e = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, s);
@@ -1458,8 +1462,8 @@ rsn_dvdsrc_prepare_audio_stream_event (resinDvdSrc * src, guint8 phys_stream)
}
static void
-rsn_dvdsrc_prepare_spu_stream_event (resinDvdSrc * src, guint8 phys_stream,
- gboolean forced_only)
+rsn_dvdsrc_prepare_spu_stream_event (resinDvdSrc * src, guint8 logical_stream,
+ guint8 phys_stream, gboolean forced_only)
{
GstStructure *s;
GstEvent *e;
@@ -1476,6 +1480,7 @@ rsn_dvdsrc_prepare_spu_stream_event (resinDvdSrc * src, guint8 phys_stream,
s = gst_structure_new ("application/x-gst-dvd",
"event", G_TYPE_STRING, "dvd-set-subpicture-track",
+ "logical-id", G_TYPE_INT, (gint) logical_stream,
"physical-id", G_TYPE_INT, (gint) phys_stream,
"forced-only", G_TYPE_BOOLEAN, forced_only, NULL);