mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
Add new GStreamer plugin with custom video sink for Clapper video player. The main difference is that unlike the old one, this does not operate using `GtkGLArea` anymore, but processes and displays `GdkTextures` directly through `GtkPicture` widget. Also this one is installed like any other GStreamer plugin, thus can be used via `gst-launch-1.0` binary or even by other GTK4 apps if they wish to integrate it. In order to not depend on GL stuff at build time, this plugin uses seperate GModules called "importers" in order to import different kind of memories into GdkTexture. This allows expanding its capabilities further then we were able to do before.
44 lines
1.3 KiB
C
Vendored
44 lines
1.3 KiB
C
Vendored
/*
|
|
* Copyright (C) 2022 Rafał Dzięgiel <rafostar.github@gmail.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
* Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <gmodule.h>
|
|
|
|
#include "gstclappersink.h"
|
|
|
|
static gboolean
|
|
plugin_init (GstPlugin *plugin)
|
|
{
|
|
if (!g_module_supported ())
|
|
return FALSE;
|
|
|
|
gst_plugin_add_dependency_simple (plugin,
|
|
NULL, CLAPPER_SINK_IMPORTER_PATH, NULL,
|
|
GST_PLUGIN_DEPENDENCY_FLAG_NONE);
|
|
|
|
return GST_ELEMENT_REGISTER (clappersink, plugin);
|
|
}
|
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR,
|
|
clapper, "Clapper elements", plugin_init, VERSION, "LGPL",
|
|
GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|