summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-05-08 14:20:32 +0100
committerJan Schmidt <thaytan@noraisin.net>2009-05-11 17:04:07 +0100
commit86d908589c4ef2d715e4f015c2455a19de322a51 (patch)
tree0849c5aea6c29cf073c79d5e4dac0aca74810d4e
parent270cd7c421118af2d6f86535c495e216b5e821d2 (diff)
downloadgst-plugins-bad-86d908589c4ef2d715e4f015c2455a19de322a51.tar.gz
gst-plugins-bad-86d908589c4ef2d715e4f015c2455a19de322a51.tar.bz2
gst-plugins-bad-86d908589c4ef2d715e4f015c2455a19de322a51.zip
resindvd: Send title info message when current angle is switched.
Make sure we send an update title tag when the current angle or available angles changes.
-rw-r--r--ext/resindvd/resindvdsrc.c12
-rw-r--r--ext/resindvd/resindvdsrc.h3
2 files changed, 10 insertions, 5 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c
index 22f6430b..b95e5c4a 100644
--- a/ext/resindvd/resindvdsrc.c
+++ b/ext/resindvd/resindvdsrc.c
@@ -398,6 +398,7 @@ rsn_dvdsrc_start (RsnBaseSrc * bsrc)
src->angles_changed = FALSE;
src->n_angles = 0;
+ src->cur_angle = 0;
src->commands_changed = TRUE;
@@ -761,17 +762,20 @@ update_title_info (resinDvdSrc * src)
if (dvdnav_get_angle_info (src->dvdnav, &cur_agl,
&n_angles) == DVDNAV_STATUS_OK && src->n_angles != n_angles) {
+ /* Make sure we send an angles-changed message soon */
src->angles_changed = TRUE;
- src->n_angles = n_angles;
}
if (dvdnav_current_title_info (src->dvdnav, &title_n,
&part_n) == DVDNAV_STATUS_OK) {
- if (title_n != src->title_n || part_n != src->part_n || src->angles_changed) {
+ if (title_n != src->title_n || part_n != src->part_n ||
+ src->n_angles != n_angles || src->cur_angle != cur_agl) {
gchar *title_str = NULL;
src->title_n = title_n;
src->part_n = part_n;
+ src->n_angles = n_angles;
+ src->cur_angle = cur_agl;
if (title_n == 0) {
static const char *dvd_menu_map[] = {
@@ -1178,7 +1182,6 @@ rsn_dvdsrc_create (RsnPushSrc * psrc, GstBuffer ** outbuf)
angles_msg =
gst_navigation_message_new_angles_changed (GST_OBJECT_CAST (src),
cur, agls);
- src->n_angles = agls;
}
src->angles_changed = FALSE;
}
@@ -1626,9 +1629,10 @@ rsn_dvdsrc_handle_navigation_event (resinDvdSrc * src, GstEvent * event)
angles_msg =
gst_navigation_message_new_angles_changed (GST_OBJECT_CAST (src),
cur, agls);
- src->n_angles = agls;
}
src->angles_changed = FALSE;
+
+ update_title_info (src);
}
g_mutex_unlock (src->dvd_lock);
diff --git a/ext/resindvd/resindvdsrc.h b/ext/resindvd/resindvdsrc.h
index fd03466a..0d883744 100644
--- a/ext/resindvd/resindvdsrc.h
+++ b/ext/resindvd/resindvdsrc.h
@@ -76,6 +76,8 @@ struct _resinDvdSrc
gboolean in_menu;
gint title_n; /* Title num */
gint part_n; /* Part num */
+ gint n_angles; /* number of angles */
+ gint cur_angle; /* current angle */
gboolean running;
gboolean discont;
@@ -136,7 +138,6 @@ struct _resinDvdSrc
gint8 cur_spu_phys_stream;
gboolean cur_spu_forced_only;
guint32 cur_clut[16];
- gint n_angles;
};
struct _resinDvdSrcClass