GNOME Bugzilla – Bug 733284
cluttervideosink doesn't initialize clutter
Last modified: 2014-07-17 13:11:22 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.
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
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
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.
Fixed by not registering the plugin. Thanks!
AFAIK cheese uses this element and creates it with gst_element_factory_make.
Are you trying to port Cheese to ClutterGst 3?
No, I actually found this while using cheese to debug a camerabin issue. I just know cheese's code superficially.
Cheese doesn't use cluttervideosink, but cluttersink (which is the ClutterGst 2 plugin). So you must have a different issue.
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.