diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2011-12-13 23:43:59 +0100 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2012-03-04 19:57:14 +0100 |
commit | b84271faa6510475079c7578e23ca60d19321141 (patch) | |
tree | 0b2c749fe7e839c1751880085f46636d72d14705 /ext | |
parent | f88c45c0cfded0579bea6cc0a001b8a60b7c7e4a (diff) | |
download | gstreamer-plugins-bad-b84271faa6510475079c7578e23ca60d19321141.tar.gz |
resindvd: send duration message on duration updates
When we know a new duration, report it. Add more logging.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/resindvd/resindvdsrc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 53320752b..76139aa52 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1036,6 +1036,7 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) break; case DVDNAV_CELL_CHANGE:{ dvdnav_cell_change_event_t *event = (dvdnav_cell_change_event_t *) data; + GstMessage *message; src->pgc_duration = MPEGTIME_TO_GSTTIME (event->pgc_length); /* event->cell_start has the wrong time - it doesn't handle @@ -1049,6 +1050,10 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock) GST_TIME_FORMAT, GST_TIME_ARGS (src->pgc_duration), GST_TIME_ARGS (src->cur_position)); + message = gst_message_new_duration (GST_OBJECT (src), GST_FORMAT_TIME, + src->pgc_duration); + gst_element_post_message (GST_ELEMENT (src), message); + rsn_dvdsrc_prepare_streamsinfo_event (src); src->need_tag_update = TRUE; @@ -2485,6 +2490,9 @@ rsn_dvdsrc_src_query (GstBaseSrc * basesrc, GstQuery * query) if (format == GST_FORMAT_TIME) { if (src->pgc_duration != GST_CLOCK_TIME_NONE) { val = src->pgc_duration; + + GST_DEBUG_OBJECT (src, "duration : %" GST_TIME_FORMAT, + GST_TIME_ARGS (val)); gst_query_set_duration (query, format, val); res = TRUE; } |