[Bug 676739] Make stream changes using input-selector/playbin2 instantaneous

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon May 28 04:59:18 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=676739
  GStreamer | gst-plugins-base | unspecified

--- Comment #8 from Andre Moreira Magalhaes <andrunko at gmail.com> 2012-05-28 11:59:14 UTC ---
(In reply to comment #7)
> Review of attachment 214859 [details]:
> 
> Please restore the old syncing behaviour based on the buffer timestamps and
> current segments (add a property to select between clock and timestamp and make
> timestamp the default), and make the maximum cache size (in time and bytes)
> configurable (i.e. -1 current behaviour, 0 no caching, any other value cache at
> most that much).
Yep, I am on it.

> ::: plugins/elements/gstinputselector.c
> @@ +177,3 @@
> +  GstBuffer *buffer;
> +  GstSegment segment;
> +  gboolean segment_update;
> 
> Why do you keep a copy of the segment again?
The CachedBuffer keeps the segment for that buffer and whether it is a segment
update or not, to be used when this pad is reactivated.

> @@ +406,3 @@
> +  GST_DEBUG_OBJECT (selpad, "Caching buffer %p", buffer);
> +  if (!selpad->cached_buffers)
> +    selpad->cached_buffers = g_queue_new ();
> 
> You could also directly store a GQueue inside the selpad struct instead of
> needing to allocate one
I prefer not to, as the queue (cached buffers) is only created for pads that
were once active. There is no need to allocate a gqueue if we are never using
it and also I prefer checking for null instead of checking the size of the
queue. That will be even more useful now that cached buffers will be optional.

> @@ +1389,3 @@
> +  g_signal_connect_data (sel, "notify::active-pad",
> +      (GCallback) gst_input_selector_active_pad_changed, NULL,
> +      NULL, G_CONNECT_AFTER);
> 
> Why do you connect to your own signal here? With a NULL callback
This is not an empty callback. The callback called is
gst_input_selector_active_pad_changed and it is called after all other
callbacks connected to this signal. What happens is that I want playbin2 and
others to have a chance to do something after the pad changes before
input-selector proceeds. "notify::active-pad" is emitted automatically when
set_property returns, and playbin2 catches the signal and mark the bin for
flush as appropriate.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list