summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog32
m---------common0
-rw-r--r--docs/random/design3
-rw-r--r--gnl/gnlcomposition.c218
-rw-r--r--gnl/gnlobject.c93
-rw-r--r--gnl/gnlobject.h7
-rw-r--r--gnl/gnlsource.c18
-rw-r--r--tests/check/simple.c6
8 files changed, 278 insertions, 99 deletions
diff --git a/ChangeLog b/ChangeLog
index bc1e371..1fa44c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,35 @@
+2006-06-18 Edward Hervey <edward@fluendo.com>
+
+ * docs/random/design:
+ Precision about gnloperation sinks property.
+ * gnl/gnlcomposition.c: (gnl_composition_init),
+ (gnl_composition_finalize), (lock_child_state),
+ (gnl_composition_reset), (segment_done_main_thread),
+ (gnl_composition_handle_message), (seek_handling),
+ (handle_seek_event), (pad_blocked),
+ (gnl_composition_ghost_pad_set_target),
+ (update_start_stop_duration), (compare_relink_stack),
+ (update_pipeline), (object_start_changed), (object_stop_changed):
+ Non-racy seeking handling. All seeks are put in the main thread.
+ A lock-protected value takes care of discarding previous seeks. This
+ avoids freeze situations when scrubbing/seeking a lot.
+ Use of pad blocks for non-used sources.
+ * gnl/gnlobject.c: (internalpad_event_function),
+ (gnl_pad_set_blocked_async), (gnl_pad_add_event_probe),
+ (gnl_pad_remove_event_probe):
+ * gnl/gnlobject.h:
+ Emit 'segment-start' message when we receive a newsegment event. This
+ allows the composition to know when a seek is really starting and
+ therefore stop all pending seeks.
+ Added functions (hacks) for recursive ghostpad handling. Should go
+ away once the issue is fixed in core (See #341029).
+ * gnl/gnlsource.c: (element_pad_added_cb),
+ (element_pad_removed_cb), (ghost_seek_pad),
+ (gnl_source_change_state):
+ Use gnl_pad_* recursive ghostpads hack functions.
+ * tests/check/simple.c: (GST_START_TEST):
+ Fix comment
+
2006-06-12 Edward Hervey <edward@fluendo.com>
* configure.ac: pre-release 0.10.4.2
diff --git a/common b/common
-Subproject dd85f550441bd5722b98f4dd304e40826383240
+Subproject bbfa0146961f4ca61ddbca7b42360b5741a6354
diff --git a/docs/random/design b/docs/random/design
index 6a337f4..c192c2b 100644
--- a/docs/random/design
+++ b/docs/random/design
@@ -90,6 +90,9 @@ GNonLin operation (GnlOperation)
developer automatically wants that operation to apply to all the underlying
sources, and the case where the developers only wants that operation to apply
to a given number of underlying sources.
+ If the controlled operation has non-request sinkpads, then the number of
+ inputs will be set to the number of sinkpads. Trying to manually change that
+ property will fail.
GNonLin composition (GnlComposition)
diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c
index 671fb1a..5bfc465 100644
--- a/gnl/gnlcomposition.c
+++ b/gnl/gnlcomposition.c
@@ -57,6 +57,10 @@ struct _GnlCompositionPrivate
GHashTable *objects_hash;
GMutex *objects_lock;
+ GMutex *flushing_lock;
+ gboolean flushing;
+ guint pending_idle;
+
/* source ghostpad */
GstPad *ghostpad;
@@ -99,6 +103,9 @@ gnl_composition_change_state (GstElement * element, GstStateChange transition);
static gboolean
+seek_handling (GnlComposition * comp, gboolean initial, gboolean update);
+
+static gboolean
update_pipeline (GnlComposition * comp, GstClockTime currenttime,
gboolean initial, gboolean change_state);
@@ -127,6 +134,20 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime,
g_mutex_unlock (comp->private->objects_lock); \
} G_STMT_END
+#define COMP_FLUSHING_LOCK(comp) G_STMT_START { \
+ GST_LOG_OBJECT (comp, "locking flushing_lock from thread %p", \
+ g_thread_self()); \
+ g_mutex_lock (comp->private->flushing_lock); \
+ GST_LOG_OBJECT (comp, "locked object_lock from thread %p", \
+ g_thread_self()); \
+ } G_STMT_END
+
+#define COMP_FLUSHING_UNLOCK(comp) G_STMT_START { \
+ GST_LOG_OBJECT (comp, "unlocking flushing_lock from thread %p", \
+ g_thread_self()); \
+ g_mutex_unlock (comp->private->flushing_lock); \
+ } G_STMT_END
+
static gboolean gnl_composition_prepare (GnlObject * object);
@@ -218,6 +239,10 @@ gnl_composition_init (GnlComposition * comp, GnlCompositionClass * klass)
comp->private->objects_start = NULL;
comp->private->objects_stop = NULL;
+ comp->private->flushing_lock = g_mutex_new ();
+ comp->private->flushing = FALSE;
+ comp->private->pending_idle = 0;
+
comp->private->segment = gst_segment_new ();
comp->private->objects_hash = g_hash_table_new_full
@@ -271,6 +296,9 @@ gnl_composition_finalize (GObject * object)
g_mutex_free (comp->private->objects_lock);
gst_segment_free (comp->private->segment);
+
+ g_mutex_free (comp->private->flushing_lock);
+
g_free (comp->private);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -287,22 +315,11 @@ unlock_child_state (GstElement * child, GValue * ret, gpointer udata)
static gboolean
lock_child_state (GstElement * child, GValue * ret, gpointer udata)
{
- GST_DEBUG_OBJECT (child, "unlocking state");
+ GST_DEBUG_OBJECT (child, "locking state");
gst_element_set_locked_state (child, TRUE);
return TRUE;
}
-/* static gboolean */
-/* ready_and_lock_child_state (GstElement * child, GValue * ret, gpointer udata) */
-/* { */
-/* GST_DEBUG_OBJECT (child, */
-/* "unlocking state, setting to ready, re-locking state"); */
-/* gst_element_set_locked_state (child, FALSE); */
-/* /\* gst_element_set_state (child, GST_STATE_READY); *\/ */
-/* /\* gst_element_set_locked_state (child, TRUE); *\/ */
-/* return TRUE; */
-/* } */
-
static void
gnl_composition_reset (GnlComposition * comp)
{
@@ -339,6 +356,48 @@ gnl_composition_reset (GnlComposition * comp)
&val, NULL);
gst_iterator_free (childs);
+ COMP_FLUSHING_LOCK (comp);
+ if (comp->private->pending_idle)
+ g_source_remove (comp->private->pending_idle);
+ comp->private->pending_idle = 0;
+ comp->private->flushing = FALSE;
+ COMP_FLUSHING_UNLOCK (comp);
+
+}
+
+static gboolean
+segment_done_main_thread (GnlComposition * comp)
+{
+ /* Set up a non-initial seek on segment_stop */
+ GST_DEBUG_OBJECT (comp, "Setting segment->start to segment_stop:%"GST_TIME_FORMAT,
+ GST_TIME_ARGS (comp->private->segment_stop));
+ comp->private->segment->start = comp->private->segment_stop;
+
+ seek_handling (comp, FALSE, TRUE);
+
+ if (!comp->private->current) {
+ /* If we're at the end, post SEGMENT_DONE, or push EOS */
+ GST_DEBUG_OBJECT (comp, "Nothing else to play");
+
+ if (!(comp->private->segment->flags & GST_SEEK_FLAG_SEGMENT)
+ && comp->private->ghostpad)
+ gst_pad_push_event (comp->private->ghostpad, gst_event_new_eos ());
+ else if (comp->private->segment->flags & GST_SEEK_FLAG_SEGMENT) {
+ gint64 epos;
+
+ if (GST_CLOCK_TIME_IS_VALID (comp->private->segment->stop))
+ epos =
+ (MIN (comp->private->segment->stop, GNL_OBJECT (comp)->stop));
+ else
+ epos = (GNL_OBJECT (comp)->stop);
+
+ GST_BIN_CLASS (parent_class)->handle_message
+ (GST_BIN (comp),
+ gst_message_new_segment_done (GST_OBJECT (comp),
+ comp->private->segment->format, epos));
+ }
+ }
+ return FALSE;
}
static void
@@ -347,77 +406,42 @@ gnl_composition_handle_message (GstBin * bin, GstMessage * message)
GnlComposition *comp = GNL_COMPOSITION (bin);
gboolean dropit = FALSE;
- GST_DEBUG_OBJECT (comp, "message:%s",
- gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
+ GST_DEBUG_OBJECT (comp, "message:%s from %s",
+ gst_message_type_get_name (GST_MESSAGE_TYPE (message)),
+ GST_MESSAGE_SRC (message) ? GST_ELEMENT_NAME (GST_MESSAGE_SRC (message)) : "UNKNOWN");
switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_SEGMENT_START: {
+ COMP_FLUSHING_LOCK (comp);
+ if (comp->private->pending_idle) {
+ GST_DEBUG_OBJECT (comp, "removing pending seek for main thread");
+ g_source_remove (comp->private->pending_idle);
+ }
+ comp->private->pending_idle = 0;
+ comp->private->flushing = FALSE;
+ COMP_FLUSHING_UNLOCK (comp);
+ dropit = TRUE;
+ break;
+ }
case GST_MESSAGE_SEGMENT_DONE:{
- gint64 pos;
- GstFormat format;
-
- /* reorganize pipeline */
-
- gst_message_parse_segment_done (message, &format, &pos);
- if (format != GST_FORMAT_TIME) {
- /* this can happen when filesrc emits a segment-done in BYTES */
- GST_WARNING_OBJECT (comp,
- "Got a SEGMENT_DONE_MESSAGE with a format different from GST_FORMAT_TIME");
+ COMP_FLUSHING_LOCK (comp);
+ if (comp->private->flushing) {
+ GST_DEBUG_OBJECT (comp, "flushing, bailing out");
+ COMP_FLUSHING_UNLOCK (comp);
+ dropit = TRUE;
+ break;
}
- GST_DEBUG_OBJECT (comp,
- "Saw a SEGMENT_DONE message [%" GST_TIME_FORMAT
- "] from %s (comp->private->segment[%" GST_TIME_FORMAT "--%"
- GST_TIME_FORMAT "])",
- GST_TIME_ARGS (pos),
- GST_OBJECT_NAME (GST_MESSAGE_SRC (message)),
- GST_TIME_ARGS (comp->private->segment_start),
- GST_TIME_ARGS (comp->private->segment_stop));
-
- if ((pos <= comp->private->segment_stop)
- && (pos > comp->private->segment_start)) {
- /* If we are switching from one object to another (rather than brutal seek), we
- want to do a flush-less update */
- gboolean initial = (pos == comp->private->segment_stop) ? TRUE : FALSE;
-
- GST_DEBUG_OBJECT (comp,
- "position within current segment, updating pipeline");
- update_pipeline (comp, (GstClockTime) comp->private->segment_stop,
- initial, TRUE);
-
- if (!(comp->private->current)) {
- GST_DEBUG_OBJECT (comp, "Nothing else to play");
-
- /*
- We drop all segments and only emit SEGMENT_DONE if segment->flags had segment
- and we've finished.
- */
- gst_message_unref (message);
-
- if (!(comp->private->segment->flags & GST_SEEK_FLAG_SEGMENT)
- && comp->private->ghostpad)
- gst_pad_push_event (comp->private->ghostpad, gst_event_new_eos ());
- else if (comp->private->segment->flags & GST_SEEK_FLAG_SEGMENT) {
- gint64 epos;
-
- if (GST_CLOCK_TIME_IS_VALID (comp->private->segment->stop))
- epos =
- (MIN (comp->private->segment->stop, GNL_OBJECT (comp)->stop));
- else
- epos = (GNL_OBJECT (comp)->stop);
-
- GST_BIN_CLASS (parent_class)->handle_message
- (bin, gst_message_new_segment_done (GST_OBJECT (comp),
- comp->private->segment->format, epos));
- }
- GST_DEBUG_OBJECT (comp, "END of Nothing else to play");
- }
+ COMP_FLUSHING_UNLOCK (comp);
- return;
- } else {
- GST_DEBUG_OBJECT (comp,
- "position outside current segment, discarding message");
- dropit = TRUE;
+
+ GST_DEBUG_OBJECT (comp, "Adding segment_done handling to main thread");
+ if (comp->private->pending_idle) {
+ GST_WARNING_OBJECT (comp, "There was already a pending segment_done in main thread !");
+ g_source_remove (comp->private->pending_idle);
}
+ comp->private->pending_idle = g_idle_add ((GSourceFunc) segment_done_main_thread, (gpointer)comp);
+ dropit = TRUE;
break;
}
default:
@@ -489,6 +513,28 @@ get_new_seek_event (GnlComposition * comp, gboolean initial)
GST_SEEK_TYPE_SET, stop);
}
+/*
+ Figures out if pipeline needs updating. Updates it and sends the seek event.
+ can be called by user_seek or segment_done
+*/
+
+static gboolean
+seek_handling (GnlComposition * comp, gboolean initial, gboolean update)
+{
+ GST_DEBUG_OBJECT (comp, "initial:%d, update:%d", initial, update);
+
+ COMP_FLUSHING_LOCK (comp);
+ GST_DEBUG_OBJECT (comp, "Setting flushing to TRUE");
+ comp->private->flushing = TRUE;
+ COMP_FLUSHING_UNLOCK (comp);
+
+ if (update || have_to_update_pipeline (comp)) {
+ update_pipeline (comp, comp->private->segment->start, initial, TRUE);
+ }
+
+ return TRUE;
+}
+
static void
handle_seek_event (GnlComposition * comp, GstEvent * event)
{
@@ -518,10 +564,7 @@ handle_seek_event (GnlComposition * comp, GstEvent * event)
comp->private->segment->stop = MIN (comp->private->segment->stop,
GNL_OBJECT (comp)->stop);
- /* Check if we need to update the pipeline */
- if (have_to_update_pipeline (comp)) {
- update_pipeline (comp, comp->private->segment->start, FALSE, TRUE);
- };
+ seek_handling (comp, FALSE, FALSE);
}
static gboolean
@@ -552,6 +595,13 @@ gnl_composition_event_handler (GstPad * ghostpad, GstEvent * event)
return res;
}
+static void
+pad_blocked (GstPad * pad, gboolean blocked, GnlComposition * comp)
+{
+ GST_DEBUG_OBJECT (comp, "Pad : %s:%s , blocked:%d",
+ GST_DEBUG_PAD_NAME (pad), blocked);
+}
+
/* gnl_composition_ghost_pad_set_target:
* target: The target #GstPad. The refcount will be decremented (given to the ghostpad).
*/
@@ -580,6 +630,7 @@ gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target)
GST_DEBUG_OBJECT (comp, "Previous target was %s:%s, blocking that pad",
GST_DEBUG_PAD_NAME (ptarget));
+ gnl_pad_set_blocked_async (ptarget, TRUE, (GstPadBlockCallback) pad_blocked, comp);
gst_object_unref (ptarget);
}
@@ -922,7 +973,6 @@ update_start_stop_duration (GnlComposition * comp)
GnlObject *obj;
GnlObject *cobj = GNL_OBJECT (comp);
- GST_DEBUG_OBJECT (comp, "...");
if (!(comp->private->objects_start)) {
GST_LOG ("no objects, resetting everything to 0");
if (cobj->start) {
@@ -1116,7 +1166,6 @@ compare_relink_stack (GnlComposition * comp, GList * stack)
GST_DEBUG_OBJECT (comp, "curo:%p, curn:%p", curo, curn);
for (; curn; curn = g_list_next (curn)) {
- GST_DEBUG_OBJECT (curn->data, "...");
newobj = GNL_OBJECT (curn->data);
if (pnew)
@@ -1275,6 +1324,7 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime,
GST_LOG_OBJECT (comp, "Setting the composition's ghostpad target to %s:%s",
GST_DEBUG_PAD_NAME (pad));
gnl_composition_ghost_pad_set_target (comp, pad);
+ gnl_pad_set_blocked_async (pad, FALSE, (GstPadBlockCallback) pad_blocked, comp);
} else {
GST_LOG_OBJECT (comp, "No srcpad was available on stack's toplevel element");
/* The pad might be created dynamically */
@@ -1315,8 +1365,6 @@ static void
object_start_changed (GnlObject * object, GParamSpec * arg,
GnlComposition * comp)
{
- GST_DEBUG_OBJECT (object, "...");
-
comp->private->objects_start = g_list_sort
(comp->private->objects_start, (GCompareFunc) objects_start_compare);
@@ -1330,8 +1378,6 @@ static void
object_stop_changed (GnlObject * object, GParamSpec * arg,
GnlComposition * comp)
{
- GST_DEBUG_OBJECT (object, "...");
-
comp->private->objects_stop = g_list_sort
(comp->private->objects_stop, (GCompareFunc) objects_stop_compare);
diff --git a/gnl/gnlobject.c b/gnl/gnlobject.c
index 60522ae..60b1cd4 100644
--- a/gnl/gnlobject.c
+++ b/gnl/gnlobject.c
@@ -542,6 +542,8 @@ internalpad_event_function (GstPad * internal, GstEvent * event)
{
GnlPadPrivate *priv = gst_pad_get_element_private (internal);
GnlObject *object = priv->object;
+ GstMessage * message = NULL;
+ gboolean res;
GST_DEBUG_OBJECT (internal, "event:%s", GST_EVENT_TYPE_NAME (event));
@@ -555,6 +557,9 @@ internalpad_event_function (GstPad * internal, GstEvent * event)
case GST_PAD_SRC:
if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) {
event = translate_outgoing_new_segment (object, event);
+ message = gst_message_new_segment_start (GST_OBJECT (object),
+ GST_FORMAT_TIME,
+ (gint64) object->start);
} else if (priv->ghostpriv->flush_hack && !priv->ghostpriv->need_flush) {
/* FIXME : REMOVE THIS AFTER FLUSH HACK SOLVED */
GST_DEBUG_OBJECT (internal, "Flush hack in effect");
@@ -581,7 +586,11 @@ internalpad_event_function (GstPad * internal, GstEvent * event)
break;
}
GST_DEBUG_OBJECT (internal, "Calling priv->eventfunc %p", priv->eventfunc);
- return priv->eventfunc (internal, event);
+ res = priv->eventfunc (internal, event);
+ if (message)
+ gst_element_post_message (GST_ELEMENT (object), message);
+
+ return res;
}
/*
@@ -1248,3 +1257,85 @@ gnl_object_change_state (GstElement * element, GstStateChange transition)
beach:
return ret;
}
+
+/* THESE ARE HACKS, REMOVE WHEN IT IS FIXED IN CORE (See bug #341029) */
+gboolean
+gnl_pad_set_blocked_async (GstPad * pad, gboolean blocked,
+ GstPadBlockCallback callback, gpointer user_data)
+{
+ gboolean was_ghost = FALSE;
+ gboolean res;
+
+ GST_LOG_OBJECT (pad, "blocked:%d", blocked);
+
+ while (GST_IS_GHOST_PAD (pad)) {
+ GstPad * tpad = gst_ghost_pad_get_target (GST_GHOST_PAD (pad));
+ if (!tpad)
+ return FALSE;
+ if (was_ghost)
+ gst_object_unref (pad);
+ was_ghost = TRUE;
+ pad = tpad;
+ }
+
+ if (was_ghost)
+ GST_LOG_OBJECT (pad, "Was ghostpad, using this pad");
+
+ res = gst_pad_set_blocked_async (pad, blocked, callback, user_data);
+
+ if (was_ghost)
+ gst_object_unref (pad);
+
+ return res;
+}
+
+gulong
+gnl_pad_add_event_probe (GstPad * pad, GCallback callback, gpointer data)
+{
+ gulong res;
+ gboolean was_ghost = FALSE;
+
+ while (GST_IS_GHOST_PAD (pad)) {
+ GstPad * tpad = gst_ghost_pad_get_target (GST_GHOST_PAD (pad));
+ if (!tpad)
+ return 0;
+ if (was_ghost)
+ gst_object_unref (pad);
+ was_ghost = TRUE;
+ pad = tpad;
+ }
+
+ if (was_ghost)
+ GST_LOG_OBJECT (pad, "Was ghostpad, using this pad");
+
+ res = gst_pad_add_event_probe (pad, callback, data);
+
+ if (was_ghost)
+ gst_object_unref (pad);
+
+ return res;
+}
+
+void
+gnl_pad_remove_event_probe (GstPad * pad, guint handler_id)
+{
+ gboolean was_ghost = FALSE;
+
+ while (GST_IS_GHOST_PAD (pad)) {
+ GstPad * tpad = gst_ghost_pad_get_target (GST_GHOST_PAD (pad));
+ if (!tpad)
+ return;
+ if (was_ghost)
+ gst_object_unref (pad);
+ was_ghost = TRUE;
+ pad = tpad;
+ }
+
+ if (was_ghost)
+ GST_LOG_OBJECT (pad, "Was ghostpad, using this pad");
+
+ gst_pad_remove_event_probe (pad, handler_id);
+
+ if (was_ghost)
+ gst_object_unref (pad);
+}
diff --git a/gnl/gnlobject.h b/gnl/gnlobject.h
index 4423649..3feef35 100644
--- a/gnl/gnlobject.h
+++ b/gnl/gnlobject.h
@@ -144,5 +144,12 @@ void gnl_object_remove_ghost_pad (GnlObject * object, GstPad * ghost);
gboolean gnl_object_covers (GnlObject * object,
GstClockTime start, GstClockTime stop, GnlCoverType type);
+/* HACKS */
+gboolean gnl_pad_set_blocked_async (GstPad * pad,
+ gboolean blocked, GstPadBlockCallback callback, gpointer user_data);
+
+gulong gnl_pad_add_event_probe (GstPad * pad, GCallback callback, gpointer data);
+void gnl_pad_remove_event_probe (GstPad * pad, guint handler_id);
+
G_END_DECLS
#endif /* __GNL_OBJECT_H__ */
diff --git a/gnl/gnlsource.c b/gnl/gnlsource.c
index 42e25c4..378d9a8 100644
--- a/gnl/gnlsource.c
+++ b/gnl/gnlsource.c
@@ -215,10 +215,10 @@ element_pad_added_cb (GstElement * element, GstPad * pad, GnlSource * source)
GST_DEBUG_OBJECT (pad, "valid pad, about to add event probe and pad block");
- source->priv->eventprobeid = gst_pad_add_event_probe
+ source->priv->eventprobeid = gnl_pad_add_event_probe
(pad, G_CALLBACK (pad_event_probe), source);
- if (!(gst_pad_set_blocked_async (pad, TRUE,
+ if (!(gnl_pad_set_blocked_async (pad, TRUE,
(GstPadBlockCallback) pad_blocked_cb, source)))
GST_WARNING_OBJECT (source, "Couldn't set Async pad blocking");
else {
@@ -240,10 +240,10 @@ element_pad_removed_cb (GstElement * element, GstPad * pad, GnlSource * source)
gst_ghost_pad_get_target (GST_GHOST_PAD (source->priv->ghostpad));
if (target == pad) {
- gst_pad_set_blocked (target, FALSE);
+ gnl_pad_set_blocked_async (target, FALSE, NULL, NULL);
if (source->priv->eventprobeid) {
- gst_pad_remove_event_probe (target, source->priv->eventprobeid);
+ gnl_pad_remove_event_probe (target, source->priv->eventprobeid);
source->priv->eventprobeid = 0;
}
@@ -308,7 +308,7 @@ ghost_seek_pad (GnlSource * source)
if (source->priv->eventprobeid) {
GST_DEBUG_OBJECT (source, "Removing event probe");
- gst_pad_remove_event_probe (pad, source->priv->eventprobeid);
+ gnl_pad_remove_event_probe (pad, source->priv->eventprobeid);
source->priv->eventprobeid = 0;
}
@@ -328,7 +328,7 @@ ghost_seek_pad (GnlSource * source)
}
GST_DEBUG_OBJECT (source, "about to unblock %s:%s", GST_DEBUG_PAD_NAME (pad));
- gst_pad_set_blocked_async (pad, FALSE,
+ gnl_pad_set_blocked_async (pad, FALSE,
(GstPadBlockCallback) pad_blocked_cb, source);
source->priv->pendingblock = FALSE;
@@ -554,9 +554,9 @@ gnl_source_change_state (GstElement * element, GstStateChange transition)
GST_DEBUG_PAD_NAME (pad));
source->priv->ghostedpad = pad;
if (!(source->priv->eventprobeid))
- source->priv->eventprobeid = gst_pad_add_event_probe
+ source->priv->eventprobeid = gnl_pad_add_event_probe
(pad, G_CALLBACK (pad_event_probe), source);
- gst_pad_set_blocked_async (pad, TRUE,
+ gnl_pad_set_blocked_async (pad, TRUE,
(GstPadBlockCallback) pad_blocked_cb, source);
gst_object_unref (pad);
}
@@ -580,7 +580,7 @@ gnl_source_change_state (GstElement * element, GstStateChange transition)
GstPad *target =
gst_ghost_pad_get_target ((GstGhostPad *) source->priv->ghostpad);
- gst_pad_set_blocked_async (target, FALSE,
+ gnl_pad_set_blocked_async (target, FALSE,
(GstPadBlockCallback) pad_blocked_cb, source);
gnl_object_remove_ghost_pad (GNL_OBJECT (source),
source->priv->ghostpad);
diff --git a/tests/check/simple.c b/tests/check/simple.c
index cebe5bc..b3c9c31 100644
--- a/tests/check/simple.c
+++ b/tests/check/simple.c
@@ -576,7 +576,7 @@ GST_START_TEST (test_one_bin_after_other)
/*
Source 1
Start : 0s
- Duration : 2s
+ Duration : 1s
Priority : 1
*/
source1 = videotest_in_bin_gnl_src ("source1", 0, 1 * GST_SECOND, 1, 1);
@@ -585,8 +585,8 @@ GST_START_TEST (test_one_bin_after_other)
/*
Source 2
- Start : 2s
- Duration : 2s
+ Start : 1s
+ Duration : 1s
Priority : 1
*/
source2 = videotest_in_bin_gnl_src ("source2", 1 * GST_SECOND, 1 * GST_SECOND, 2, 1);