mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
API: remove video sink plugin selection
Clapper only has and supports one video sink. I would rather replace it than forcing support for multiple plugins.
This commit is contained in:
@@ -77,9 +77,7 @@ gst_clapper_gtk4_plugin_constructed (GObject * object)
|
||||
{
|
||||
GstClapperGtk4Plugin *self = GST_CLAPPER_GTK4_PLUGIN (object);
|
||||
|
||||
if (!self->video_sink)
|
||||
self->video_sink = g_object_new (GST_TYPE_CLAPPER_GL_SINK, NULL);
|
||||
|
||||
self->video_sink = g_object_new (GST_TYPE_CLAPPER_GL_SINK, NULL);
|
||||
gst_object_ref_sink (self->video_sink);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
@@ -111,35 +109,15 @@ gst_clapper_gtk4_plugin_finalize (GObject * object)
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
#define C_ENUM(v) ((gint) v)
|
||||
|
||||
GType
|
||||
gst_clapper_gtk4_plugin_type_get_type (void)
|
||||
{
|
||||
static gsize id = 0;
|
||||
static const GEnumValue values[] = {
|
||||
{C_ENUM (GST_CLAPPER_GTK4_PLUGIN_TYPE_GLAREA), "GST_CLAPPER_GTK4_PLUGIN_TYPE_GLAREA", "glarea"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
if (g_once_init_enter (&id)) {
|
||||
GType tmp = g_enum_register_static ("GstClapperGtk4PluginType", values);
|
||||
g_once_init_leave (&id, tmp);
|
||||
}
|
||||
|
||||
return (GType) id;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_clapper_gtk4_plugin_new:
|
||||
* @plugin_type: (allow-none): Requested GstClapperGtk4PluginType
|
||||
*
|
||||
* Creates a new GTK4 plugin.
|
||||
*
|
||||
* Returns: (transfer full): the new GstClapperGtk4Plugin
|
||||
*/
|
||||
GstClapperGtk4Plugin *
|
||||
gst_clapper_gtk4_plugin_new (G_GNUC_UNUSED const GstClapperGtk4PluginType plugin_type)
|
||||
gst_clapper_gtk4_plugin_new (void)
|
||||
{
|
||||
return g_object_new (GST_TYPE_CLAPPER_GTK4_PLUGIN, NULL);
|
||||
}
|
||||
|
@@ -26,20 +26,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* PluginType */
|
||||
GST_CLAPPER_API
|
||||
GType gst_clapper_gtk4_plugin_type_get_type (void);
|
||||
#define GST_TYPE_CLAPPER_GTK4_PLUGIN_TYPE (gst_clapper_gtk4_plugin_type_get_type ())
|
||||
|
||||
/**
|
||||
* GstClapperGtk4PluginType:
|
||||
* @GST_CLAPPER_GTK4_PLUGIN_TYPE_GLAREA: GTK4 GLArea sink.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GST_CLAPPER_GTK4_PLUGIN_TYPE_GLAREA,
|
||||
} GstClapperGtk4PluginType;
|
||||
|
||||
#define GST_TYPE_CLAPPER_GTK4_PLUGIN (gst_clapper_gtk4_plugin_get_type ())
|
||||
#define GST_IS_CLAPPER_GTK4_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CLAPPER_GTK4_PLUGIN))
|
||||
#define GST_IS_CLAPPER_GTK4_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_CLAPPER_GTK4_PLUGIN))
|
||||
@@ -79,7 +65,7 @@ GST_CLAPPER_API
|
||||
GType gst_clapper_gtk4_plugin_get_type (void);
|
||||
|
||||
GST_CLAPPER_API
|
||||
GstClapperGtk4Plugin * gst_clapper_gtk4_plugin_new (const GstClapperGtk4PluginType plugin_type);
|
||||
GstClapperGtk4Plugin * gst_clapper_gtk4_plugin_new (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Reference in New Issue
Block a user