After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796770 - compositor: transition output frame looks ugly
compositor: transition output frame looks ugly
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-07-09 15:52 UTC by Seungha Yang
Modified: 2018-11-03 14:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
videoaggregator: Add "foreach-sink-pad" signal action (13.13 KB, patch)
2018-07-09 15:55 UTC, Seungha Yang
none Details | Review

Description Seungha Yang 2018-07-09 15:52:34 UTC
Dynamic layout change (e.g., g_object_set(GstCompositorPad, ...)) produces ugly  frame(s) since GstCompositorPad's member variables might be modified while aggregate_frame() is running.
Comment 1 Seungha Yang 2018-07-09 15:55:08 UTC
Created attachment 372983 [details] [review]
videoaggregator: Add "foreach-sink-pad" signal action

Used for protected access to sinkpads while
GstVideoAggregator::aggregate_frames() virtual method is not running.
Comment 2 Tim-Philipp Müller 2018-07-09 16:15:51 UTC
I wonder if this wouldn't be better handled more generically e.g. by adding something like gst_object_queue_set_property() that would be done atomically when the next sync is called (possibly something that works with multiple objects too), or something in aggregator at least?

I might be misunderstanding the exact problem though.
Comment 3 Thibault Saunier 2018-07-09 16:38:11 UTC
(In reply to Tim-Philipp Müller from comment #2)
> I wonder if this wouldn't be better handled more generically e.g. by adding
> something like gst_object_queue_set_property() that would be done atomically
> when the next sync is called (possibly something that works with multiple
> objects too), or something in aggregator at least?
> 
> I might be misunderstanding the exact problem though.

I was trying to formulate something around those lines, I agree with you though I am not sure how the API should look like as in this case it would require properties from several object (sinkpads) to be "comited" at once.
Comment 4 Olivier Crête 2018-07-09 17:23:19 UTC
Maybe we can use some special GstController for this? It seems that pretty much what this API was designed for. So you could do a gst_manual_controller_set_property_at (obj, time, "prop", value);
Comment 5 Tim-Philipp Müller 2018-07-09 17:36:09 UTC
Yeah, but I was more thinking of a special one-shot-at-next-opportunity thing, that's something that's generally needed I think.

Multiple objects could be accommodated via a helper object that's passed, or API like

  queue_set_multiple_objects (obj1, prop, value, obj2, prop, value);

In any case, I feel like we should come up with something related to controller if these are controllable properties.
Comment 6 Seungha Yang 2018-07-16 11:38:02 UTC
(In reply to Tim-Philipp Müller from comment #2)
> I wonder if this wouldn't be better handled more generically e.g. by adding
> something like gst_object_queue_set_property() that would be done atomically
> when the next sync is called (possibly something that works with multiple
> objects too), or something in aggregator at least?
> 
> I might be misunderstanding the exact problem though.

As you mentioned, we need some nice API(s) to solve this problem. I think this is generic problem of Gstreamer. Since "setting multiple properties (and maybe multiple objects' properties also) at once" is not supported yet, some elements such as videocrop, videomixer, compositor, etc seems to generating weird frame sometimes.
Comment 7 Nicolas Dufresne (ndufresne) 2018-09-11 03:45:23 UTC
For simple element, like videocrop, we workaround by using a pad probe on the sink pad. I bet setting the property within a probe callback on the src pad of an aggregator would work (except you are already 1 frame late). It boils down to setting the properties while the thread using these properties is blocked. It's ugly though, I agree we need something nicer.
Comment 8 GStreamer system administrator 2018-11-03 14:27:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/748.