diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-04-01 17:41:40 +0100 |
---|---|---|
committer | Dave Robillard <dave@drobilla.net> | 2009-05-03 12:03:14 -0400 |
commit | eea3a0396c22b8a93e56c8d6ef2c4815beffe846 (patch) | |
tree | 70e891f3210f2ecac926f24f08c58ae7dcc45c04 | |
parent | eef15f4048fb76014343b862cf9d10dc51656528 (diff) | |
download | gst-plugins-bad-eea3a0396c22b8a93e56c8d6ef2c4815beffe846.tar.gz gst-plugins-bad-eea3a0396c22b8a93e56c8d6ef2c4815beffe846.tar.bz2 gst-plugins-bad-eea3a0396c22b8a93e56c8d6ef2c4815beffe846.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.
-rw-r--r-- | ext/resindvd/resindvdsrc.c | 19 |
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); |