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 604280 - fpsdisplaysink: allow access to internal video sink used
fpsdisplaysink: allow access to internal video sink used
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-12-10 14:47 UTC by Philippe Normand
Modified: 2009-12-16 21:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fpsdisplaysink: expose video sink using properties (5.40 KB, patch)
2009-12-10 14:54 UTC, Philippe Normand
none Details | Review
fpsdisplaysink: expose video sink using a property (4.34 KB, patch)
2009-12-10 15:59 UTC, Philippe Normand
none Details | Review
fpsdisplaysink: expose video sink using a property (5.67 KB, patch)
2009-12-10 17:20 UTC, Philippe Normand
none Details | Review
updated patch (5.83 KB, patch)
2009-12-11 01:52 UTC, Thiago Sousa Santos
committed Details | Review
fpsdisplaysink: check the sync property exists on embedded sink(s) (2.64 KB, patch)
2009-12-15 12:10 UTC, Philippe Normand
committed Details | Review

Description Philippe Normand 2009-12-10 14:47:59 UTC
The fpsdisplaysink uses an internal video sink, hardcoded, xvimagesink. It would be nice to be able to change this both from pipeline description and from a program like:

GstElement* sink = gst_element_factory_make("mysink", "sink");
g_object_set(G_OBJECT(fps_sink), "video-sink", sink, NULL);

or with gst-launch videotestsrc ! fpsdisplaysink video-sink-name=foo

Proposal is to add 2 properties in the sink, video-sink and video-sink-name to allow above 2 use-cases.
Comment 1 Philippe Normand 2009-12-10 14:54:52 UTC
Created attachment 149519 [details] [review]
fpsdisplaysink: expose video sink using properties
Comment 2 Tim-Philipp Müller 2009-12-10 15:42:23 UTC
The "video-sink-name" property should not be needed, and we don't have this in playbin/elsewhere either..

  gst-launch-0.10 blabla ! fpsdisplaysink video-sink="xvimagesink optionalpropertyfoo=bar"

should work automagically with recent core versions.
Comment 3 Philippe Normand 2009-12-10 15:59:14 UTC
Created attachment 149527 [details] [review]
fpsdisplaysink: expose video sink using a property
Comment 4 Philippe Normand 2009-12-10 17:20:16 UTC
Created attachment 149535 [details] [review]
fpsdisplaysink: expose video sink using a property

Previous patch was producing warnings because I was setting the sync
property on the video-sink bin. I now iterate on the sinks of the bin.
Comment 5 Thiago Sousa Santos 2009-12-11 01:52:08 UTC
Created attachment 149559 [details] [review]
updated patch

Fixed the build and changed the default sink to autovideosink instead of xvimagesink. Would that be considered a behavior break?
Comment 6 Philippe Normand 2009-12-11 08:43:54 UTC
Using autovideosink sounds good to me :)
Comment 7 Thiago Sousa Santos 2009-12-14 12:01:18 UTC
FIxed.

Module: gst-plugins-bad
Branch: master
Commit: 4111d6321f140eb7790620ab42e5cf1d9413b56a
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=4111d6321f140eb7790620ab42e5cf1d9413b56a

Author: Philippe Normand <phil@base-art.net>
Date:   Thu Dec 10 22:49:13 2009 -0300

fpsdisplaysink: expose video sink using a property

Exposes the internally used sink as video-sink property and
makes the default one to be autovideosink instead of
the hardcoded xvimagesink

Fixes #604280
Comment 8 Thiago Sousa Santos 2009-12-14 12:01:53 UTC
Review of attachment 149559 [details] [review]:

commited
Comment 9 Philippe Normand 2009-12-15 10:43:45 UTC
I get this warning:

GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GstAutoVideoSink' has no property named `sync'

and indeed autovideosink has no sync property. Should we reopen this bug or open a bug for autovideosink?
Comment 10 Thiago Sousa Santos 2009-12-15 10:52:59 UTC
I guess we should reopen and add the property to autovideosink
Comment 11 Thiago Sousa Santos 2009-12-15 11:11:35 UTC
Another thing here is that, as the user can set any sink he wants with the property, setting the sync property on them might raise the warning. Is there a way to check if a property exists?
Comment 12 Philippe Normand 2009-12-15 12:10:56 UTC
Created attachment 149755 [details] [review]
fpsdisplaysink: check the sync property exists on embedded sink(s)

Follow-up on 4111d6321f140eb7790620ab42e5cf1d9413b56a, the video
sink(s) used by fpsdisplaysink might not have the sync property. So we
check its existence to avoid warning from g_object_set() at runtime.
Comment 13 Thiago Sousa Santos 2009-12-16 21:42:07 UTC
Pushed your patch + another one to make sync work with autovideosink.

Hopefully closing this forever now.

Module: gst-plugins-bad
Branch: master
Commit: 9c03149e7b8375388ab779f2f51a3dbbab57f7bb
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=9c03149e7b8375388ab779f2f51a3dbbab57f7bb

Author: Philippe Normand <phil@base-art.net>
Date:   Tue Dec 15 13:08:08 2009 +0100

fpsdisplaysink: check the sync property exists on embedded sink(s)

Follow-up on 4111d6321f140eb7790620ab42e5cf1d9413b56a, the video
sink(s) used by fpsdisplaysink might not have the sync property. So we
check its existence to avoid warning from g_object_set() at runtime.

Fixes #604280

Module: gst-plugins-bad
Branch: master
Commit: d2dce72c602465654ba45145f695cc427c052c50
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=d2dce72c602465654ba45145f695cc427c052c50

Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Wed Dec 16 18:32:42 2009 -0300

fpsdisplaysink: fix setting sync on child bin

Use GST_IS_BIN instead of G_OBJECT_TYPE to check if the
internal sink is a bin. Using the later won't work when
the sink is not a bin directly (but inherits from one, like
autovideosink).

Fixes #604280
Comment 14 Thiago Sousa Santos 2009-12-16 21:43:34 UTC
Comment on attachment 149755 [details] [review]
fpsdisplaysink: check the sync property exists on embedded sink(s)

Committed with micro changes