mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
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.
This commit is contained in:
parent
270cd7c421
commit
86d908589c
2 changed files with 10 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue