summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-03-25 01:21:28 +0000
committerJan Schmidt <thaytan@noraisin.net>2009-04-02 14:49:19 +0100
commit85db327e82dcbd028416f094b81fc780c4488465 (patch)
tree4eab4a67564500cf26c2d6adb25c5ce3e5f65c1c /ext
parent5f789d307595ba5c442d57efee8b1318fdca1531 (diff)
downloadgst-plugins-bad-85db327e82dcbd028416f094b81fc780c4488465.tar.gz
gst-plugins-bad-85db327e82dcbd028416f094b81fc780c4488465.tar.bz2
gst-plugins-bad-85db327e82dcbd028416f094b81fc780c4488465.zip
resindvd: Support multiangle titles.
Add a workaround for an apparent libdvdnav bug where it loses nav packets during multiangle titles, and add some keypress bindings to switch the angle.
Diffstat (limited to 'ext')
-rw-r--r--ext/resindvd/resindvdsrc.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c
index 2a7ef8aa..2d98f04b 100644
--- a/ext/resindvd/resindvdsrc.c
+++ b/ext/resindvd/resindvdsrc.c
@@ -757,9 +757,10 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock)
if (new_start_ptm != src->cur_end_ts) {
/* Hack because libdvdnav seems to lose a NAV packet during
- * angle block changes */
+ * angle block changes, triggering a false discont */
GstClockTimeDiff diff = GST_CLOCK_DIFF (src->cur_end_ts, new_start_ptm);
- if (src->cur_end_ts == GST_CLOCK_TIME_NONE || diff > 2 * GST_SECOND) {
+ if (src->cur_end_ts == GST_CLOCK_TIME_NONE || diff > 2 * GST_SECOND ||
+ diff < 0) {
discont = TRUE;
}
}
@@ -1209,6 +1210,17 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event)
} else if (g_str_equal (key, "period")) {
dvdnav_next_pg_search (src->dvdnav);
channel_hop = TRUE;
+ } else if (g_str_equal (key, "bracketleft")) {
+ gint32 cur, agls;
+ if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK
+ && cur > 0
+ && dvdnav_angle_change (src->dvdnav, cur - 1) == DVDNAV_STATUS_OK)
+ g_print ("Switched to angle %d\n", cur - 1);
+ } else if (g_str_equal (key, "bracketright")) {
+ gint32 cur, agls;
+ if (dvdnav_get_angle_info (src->dvdnav, &cur, &agls) == DVDNAV_STATUS_OK
+ && dvdnav_angle_change (src->dvdnav, cur + 1) == DVDNAV_STATUS_OK)
+ g_print ("Switched to angle %d\n", cur + 1);
} else {
g_print ("Unknown keypress: %s\n", key);
}