[Bug 729760] appsrc: Changing caps and pushing buffers is not serialized

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jul 30 18:06:00 PDT 2014


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

--- Comment #15 from comicfans44 <comicfans44 at gmail.com> 2014-07-31 01:05:56 UTC ---
(In reply to comment #14)
> Review of attachment 281987 [details]:
> 
> ::: gst-libs/gst/app/gstappsrc.c
> @@ +526,3 @@
>    priv->min_percent = DEFAULT_PROP_MIN_PERCENT;
> +  priv->last_caps = gst_caps_new_any ();
> +  priv->current_caps = gst_caps_new_any ();
> 
> Why distinguish current and last caps?
> 
> The caps property should always return the last caps, while the current caps
> are the currently used ones. That's the reason, right? Makes sense :)
there may be naming confusing in my patch, last_caps is the caps last
app_src_set_caps setted, which is the tail caps in queue

so I should return current_caps in basesrc_class->get_caps
but return last_caps in app_src_get_caps. 
did I misunderstand something ? :)

last_caps also used to skip no-op caps set (set the same caps, or call
app_src_set_caps many times but not pushing buffer bewteen them)

> 
> And why not keep them at NULL and handle that as before?
it makes caps equal test easier. but maybe not fit original style.
I'll try to correct this.

addition question: should gst_app_src_set_caps check if caps is fixed ? 
after queued , none-fixed caps will trigger gst_base_src_set_caps
->gst_pad_push_event->gst_event_new_caps failed, but not at the point wrong
caps is setted. or should this be noticed in doc ?

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


More information about the gstreamer-bugs mailing list