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 733284 - cluttervideosink doesn't initialize clutter
cluttervideosink doesn't initialize clutter
Status: RESOLVED FIXED
Product: clutter-gst
Classification: Other
Component: general
git master
Other Linux
: Normal blocker
: ---
Assigned To: clutter-gst-maint
clutter-gst-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-17 01:13 UTC by Thiago Sousa Santos
Modified: 2014-07-17 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clutter-gst-video-sink: init clutter (994 bytes, patch)
2014-07-17 01:18 UTC, Thiago Sousa Santos
none Details | Review
clutter-gst-video-sink: init clutter (994 bytes, patch)
2014-07-17 01:19 UTC, Thiago Sousa Santos
none Details | Review

Description Thiago Sousa Santos 2014-07-17 01:13:47 UTC
cluttervideosink doesn't initialize clutter (clutterautovideosink does it) and will cause a segfault if you run gst-inspect-1.0 cluttervideosink or try to create an instance of it in any application that doesn't call clutter_init itself.

Not sure if this is a valid use case, but causing gst-inspect-1.0 to segfault is not good.
Comment 1 Thiago Sousa Santos 2014-07-17 01:18:12 UTC
Created attachment 280896 [details] [review]
clutter-gst-video-sink: init clutter

Otherwise it will segfault when trying to get the cogl context.

This happens even with gst-inspect cluttervideosink
Comment 2 Thiago Sousa Santos 2014-07-17 01:19:06 UTC
Created attachment 280897 [details] [review]
clutter-gst-video-sink: init clutter

Otherwise it will segfault when trying to get the cogl context.

This happens even with gst-inspect cluttervideosink
Comment 3 Lionel Landwerlin 2014-07-17 10:19:42 UTC
Good spot.
Though I wonder if the sink should be registered at all.
It doesn't display anything directly and if you're willing to use its output it means you're dealing with Clutter already which means it would have to initialize stuff on your own.
Comment 4 Lionel Landwerlin 2014-07-17 10:36:58 UTC
Fixed by not registering the plugin.
Thanks!
Comment 5 Thiago Sousa Santos 2014-07-17 12:48:44 UTC
AFAIK cheese uses this element and creates it with gst_element_factory_make.
Comment 6 Lionel Landwerlin 2014-07-17 12:52:01 UTC
Are you trying to port Cheese to ClutterGst 3?
Comment 7 Thiago Sousa Santos 2014-07-17 12:53:10 UTC
No, I actually found this while using cheese to debug a camerabin issue. I just know cheese's code superficially.
Comment 8 Lionel Landwerlin 2014-07-17 12:56:15 UTC
Cheese doesn't use cluttervideosink, but cluttersink (which is the ClutterGst 2 plugin).
So you must have a different issue.
Comment 9 David King 2014-07-17 13:11:22 UTC
Cheese also calls clutter_gst_init() before creating the cluttersink (via the startup() method in CheeseApplication and then cheese_gtk_init() and cheese_init()), so I think that it would be OK regardless.