GstInputSelector *sel;
GstFlowReturn result;
GstPad *active_sinkpad;
+ GstPad *prev_active_sinkpad;
GstSelectorPad *selpad;
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
GST_DEBUG_OBJECT (pad, "received alloc");
GST_INPUT_SELECTOR_LOCK (sel);
+ prev_active_sinkpad = sel->active_sinkpad;
active_sinkpad = gst_input_selector_activate_sinkpad (sel, pad);
if (pad != active_sinkpad)
GST_INPUT_SELECTOR_UNLOCK (sel);
+ if (prev_active_sinkpad != active_sinkpad && pad == active_sinkpad)
+ g_object_notify (G_OBJECT (sel), "active-pad");
+
result = gst_pad_alloc_buffer (sel->srcpad, offset, size, caps, buf);
done:
GstInputSelector *sel;
GstFlowReturn res;
GstPad *active_sinkpad;
+ GstPad *prev_active_sinkpad;
GstSelectorPad *selpad;
GstClockTime end_time, duration;
GstSegment *seg;
GST_DEBUG_OBJECT (pad, "getting active pad");
+ prev_active_sinkpad = sel->active_sinkpad;
active_sinkpad = gst_input_selector_activate_sinkpad (sel, pad);
/* update the segment on the srcpad */
}
GST_INPUT_SELECTOR_UNLOCK (sel);
+ if (prev_active_sinkpad != active_sinkpad && pad == active_sinkpad)
+ g_object_notify (G_OBJECT (sel), "active-pad");
+
if (close_event)
gst_pad_push_event (sel->srcpad, close_event);
/* schedule a last_stop update if one isn't already scheduled, and a
segment has been pushed before. */
memcpy (&self->segment, &old->segment, sizeof (self->segment));
+
GST_DEBUG_OBJECT (self, "setting stop_time to %" G_GINT64_FORMAT,
stop_time);
gst_segment_set_stop (&self->segment, stop_time);