diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2020-12-11 15:02:03 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-03-16 17:58:59 +0000 |
commit | 160ba7d0e9094a9254586f96ed9a02e9a6955dfe (patch) | |
tree | 9f6f4ff1ca5866c2ed3a86b064d7cd38c59e93c5 /gst/app | |
parent | f94d9f1cc5d9679cda2bf44b3a257852a29e4ec3 (diff) | |
download | gstreamer-plugins-base-160ba7d0e9094a9254586f96ed9a02e9a6955dfe.tar.gz |
app: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
Diffstat (limited to 'gst/app')
-rw-r--r-- | gst/app/gstapp.c | 41 | ||||
-rw-r--r-- | gst/app/gstappelements.h | 36 | ||||
-rw-r--r-- | gst/app/gstappsink.c | 35 | ||||
-rw-r--r-- | gst/app/gstappsrc.c | 35 | ||||
-rw-r--r-- | gst/app/meson.build | 8 |
5 files changed, 119 insertions, 36 deletions
diff --git a/gst/app/gstapp.c b/gst/app/gstapp.c index 9732fc8c2..1a036a204 100644 --- a/gst/app/gstapp.c +++ b/gst/app/gstapp.c @@ -16,47 +16,18 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ -/** - * SECTION:element-appsrc - * @title: appsrc - * - * The appsrc element can be used by applications to insert data into a - * GStreamer pipeline. Unlike most GStreamer elements, Appsrc provides - * external API functions. - * - * For the documentation of the API, please see the - * <link linkend="gst-plugins-base-libs-appsrc">libgstapp</link> section in the - * GStreamer Plugins Base Libraries documentation. - */ -/** - * SECTION:element-appsink - * @title: appsink - * - * Appsink is a sink plugin that supports many different methods for making - * the application get a handle on the GStreamer data in a pipeline. Unlike - * most GStreamer elements, Appsink provides external API functions. - * - * For the documentation of the API, please see the - * <link linkend="gst-plugins-base-libs-appsink">libgstapp</link> section in - * the GStreamer Plugins Base Libraries documentation. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <gst/gst.h> - -#include <gst/app/gstappsrc.h> -#include <gst/app/gstappsink.h> +#include "gstappelements.h" static gboolean plugin_init (GstPlugin * plugin) { - gst_element_register (plugin, "appsrc", GST_RANK_NONE, GST_TYPE_APP_SRC); - gst_element_register (plugin, "appsink", GST_RANK_NONE, GST_TYPE_APP_SINK); + gboolean ret = FALSE; + + ret |= GST_ELEMENT_REGISTER (appsrc, plugin); + ret |= GST_ELEMENT_REGISTER (appsink, plugin); - return TRUE; + return ret; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/app/gstappelements.h b/gst/app/gstappelements.h new file mode 100644 index 000000000..0328aad71 --- /dev/null +++ b/gst/app/gstappelements.h @@ -0,0 +1,36 @@ +/* GStreamer + * Copyright (C) 2007 David Schleef <ds@schleef.org> + * Copyright (C) 2020 Huawei Technologies Co., Ltd. + * @Author: Stéphane Cerveau <scerveau@collabora.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. + */ + +#ifndef __GST_APP_ELEMENTS_H__ +#define __GST_APP_ELEMENTS_H__ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <gst/gst.h> + +#include <gst/app/gstappsrc.h> +#include <gst/app/gstappsink.h> + +GST_ELEMENT_REGISTER_DECLARE (appsrc); +GST_ELEMENT_REGISTER_DECLARE (appsink); + +#endif /* __GST_APP_ELEMENTS_H__ */ diff --git a/gst/app/gstappsink.c b/gst/app/gstappsink.c new file mode 100644 index 000000000..108a2a814 --- /dev/null +++ b/gst/app/gstappsink.c @@ -0,0 +1,35 @@ +/* GStreamer + * Copyright (C) 2007 David Schleef <ds@schleef.org> + * + * 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. + */ +/** + * SECTION:element-appsink + * @title: appsink + * + * Appsink is a sink plugin that supports many different methods for making + * the application get a handle on the GStreamer data in a pipeline. Unlike + * most GStreamer elements, Appsink provides external API functions. + * + * For the documentation of the API, please see the + * <link linkend="gst-plugins-base-libs-appsink">libgstapp</link> section in + * the GStreamer Plugins Base Libraries documentation. + */ + +#include "gstappelements.h" + +GST_ELEMENT_REGISTER_DEFINE (appsink, "appsink", GST_RANK_NONE, + GST_TYPE_APP_SINK); diff --git a/gst/app/gstappsrc.c b/gst/app/gstappsrc.c new file mode 100644 index 000000000..c6a81e7f9 --- /dev/null +++ b/gst/app/gstappsrc.c @@ -0,0 +1,35 @@ +/* GStreamer + * Copyright (C) 2007 David Schleef <ds@schleef.org> + * + * 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. + */ +/** + * SECTION:element-appsrc + * @title: appsrc + * + * The appsrc element can be used by applications to insert data into a + * GStreamer pipeline. Unlike most GStreamer elements, Appsrc provides + * external API functions. + * + * For the documentation of the API, please see the + * <link linkend="gst-plugins-base-libs-appsrc">libgstapp</link> section in the + * GStreamer Plugins Base Libraries documentation. + */ + + +#include "gstappelements.h" + +GST_ELEMENT_REGISTER_DEFINE (appsrc, "appsrc", GST_RANK_NONE, GST_TYPE_APP_SRC); diff --git a/gst/app/meson.build b/gst/app/meson.build index 79b314219..8bdf2d8eb 100644 --- a/gst/app/meson.build +++ b/gst/app/meson.build @@ -1,5 +1,11 @@ -gstapp_plugin = library('gstapp', +app_sources = [ 'gstapp.c', + 'gstappsink.c', + 'gstappsrc.c', +] + +gstapp_plugin = library('gstapp', + app_sources, c_args: gst_plugins_base_args, include_directories: [configinc], dependencies : [gst_base_dep, app_dep, tag_dep], |