diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-05-08 16:06:01 +0100 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-05-11 17:04:07 +0100 |
commit | f2f79cd4108add0071f868c5d8e8857d3421c707 (patch) | |
tree | c26b8d9d0ac24604a642781d1f71d58a7dd519f1 /ext/resindvd | |
parent | 9f01bd64349cc14c25991cea5e054f286ab732bf (diff) | |
download | gst-plugins-bad-f2f79cd4108add0071f868c5d8e8857d3421c707.tar.gz gst-plugins-bad-f2f79cd4108add0071f868c5d8e8857d3421c707.tar.bz2 gst-plugins-bad-f2f79cd4108add0071f868c5d8e8857d3421c707.zip |
resindvd: Simplify some stuff. Remove an unnecessary LOG message.
Skip attempting to schedule a nav block unless we're in PLAYING. Take a lock
slightly later, when we actually need it. Remove a noisy LOG message.
Diffstat (limited to 'ext/resindvd')
-rw-r--r-- | ext/resindvd/resindvdsrc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 7b6a7415..479a883a 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -665,7 +665,7 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) /* FIXME: Implement timed stills by sleeping on the clock, possibly * in multiple steps if we get paused/unpaused */ g_mutex_unlock (src->dvd_lock); - GST_LOG_OBJECT (src, "cond_timed_wait still"); + GST_LOG_OBJECT (src, "cond_timed_wait still for %d sec", duration); was_signalled = g_cond_timed_wait (src->still_cond, src->branch_lock, &end_time); was_signalled |= src->branching; @@ -2109,19 +2109,19 @@ rsn_dvdsrc_nav_clock_cb (GstClock * clock, GstClockTime time, GstClockID id, return TRUE; } +/* Called with dvd_lock held */ static void rsn_dvdsrc_schedule_nav_cb (resinDvdSrc * src, RsnDvdPendingNav * next_nav) { GstClock *clock; GstClockTime base_ts; - GST_OBJECT_LOCK (src); if (!src->in_playing) { GST_LOG_OBJECT (src, "Not scheduling NAV block - state != PLAYING"); - GST_OBJECT_UNLOCK (src); return; /* Not in playing state yet */ } + GST_OBJECT_LOCK (src); clock = GST_ELEMENT_CLOCK (src); base_ts = GST_ELEMENT (src)->base_time; @@ -2144,6 +2144,7 @@ rsn_dvdsrc_schedule_nav_cb (resinDvdSrc * src, RsnDvdPendingNav * next_nav) gst_object_unref (clock); } +/* Called with dvd_lock held */ static void rsn_dvdsrc_check_nav_blocks (resinDvdSrc * src) { @@ -2154,9 +2155,10 @@ rsn_dvdsrc_check_nav_blocks (resinDvdSrc * src) return; /* Something already scheduled */ } if (src->pending_nav_blocks == NULL) { - GST_LOG_OBJECT (src, "No NAV blocks to schedule"); return; /* No nav blocks available yet */ } + if (!src->in_playing) + return; /* Not in playing state yet */ GST_LOG_OBJECT (src, "Installing NAV callback"); next_nav = (RsnDvdPendingNav *) src->pending_nav_blocks->data; @@ -2164,8 +2166,6 @@ rsn_dvdsrc_check_nav_blocks (resinDvdSrc * src) rsn_dvdsrc_schedule_nav_cb (src, next_nav); } -/* Use libdvdread to read and cache info from the IFO file about - * streams in each VTS */ static gboolean rsn_dvdsrc_src_event (RsnBaseSrc * basesrc, GstEvent * event) { |