mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
plugins-sys: 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-bad/-/merge_requests/2116>
This commit is contained in:
parent
fee725f3cc
commit
da9e012e8a
66 changed files with 473 additions and 170 deletions
|
@ -22,26 +22,23 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gstbluezelements.h"
|
||||||
#include "gsta2dpsink.h"
|
#include "gsta2dpsink.h"
|
||||||
#include "gstavdtpsink.h"
|
#include "gstavdtpsink.h"
|
||||||
#include "gstavdtpsrc.h"
|
#include "gstavdtpsrc.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY (avdtp_debug);
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (avdtp_debug, "avdtp", 0, "avdtp utils");
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
gst_element_register (plugin, "a2dpsink", GST_RANK_NONE, GST_TYPE_A2DP_SINK);
|
ret |= GST_ELEMENT_REGISTER (a2dpsink, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avdtpsink, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avdtpsrc, plugin);
|
||||||
|
|
||||||
gst_element_register (plugin, "avdtpsink",
|
return ret;
|
||||||
GST_RANK_NONE, GST_TYPE_AVDTP_SINK);
|
|
||||||
|
|
||||||
gst_element_register (plugin, "avdtpsrc", GST_RANK_NONE, GST_TYPE_AVDTP_SRC);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "gstbluezelements.h"
|
||||||
#include "gsta2dpsink.h"
|
#include "gsta2dpsink.h"
|
||||||
|
|
||||||
#include <gst/rtp/gstrtpbasepayload.h>
|
#include <gst/rtp/gstrtpbasepayload.h>
|
||||||
|
@ -48,6 +49,8 @@ enum
|
||||||
|
|
||||||
#define parent_class gst_a2dp_sink_parent_class
|
#define parent_class gst_a2dp_sink_parent_class
|
||||||
G_DEFINE_TYPE (GstA2dpSink, gst_a2dp_sink, GST_TYPE_BIN);
|
G_DEFINE_TYPE (GstA2dpSink, gst_a2dp_sink, GST_TYPE_BIN);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (a2dpsink, "a2dpsink", GST_RANK_NONE,
|
||||||
|
GST_TYPE_A2DP_SINK, bluez_element_init (plugin));
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_a2dp_sink_factory =
|
static GstStaticPadTemplate gst_a2dp_sink_factory =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||||
|
|
|
@ -66,8 +66,6 @@ struct _GstA2dpSinkClass
|
||||||
|
|
||||||
GType gst_a2dp_sink_get_type (void);
|
GType gst_a2dp_sink_get_type (void);
|
||||||
|
|
||||||
gboolean gst_a2dp_sink_plugin_init (GstPlugin * plugin);
|
|
||||||
|
|
||||||
GstCaps *gst_a2dp_sink_get_device_caps (GstA2dpSink * self);
|
GstCaps *gst_a2dp_sink_get_device_caps (GstA2dpSink * self);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
#include "a2dp-codecs.h"
|
#include "a2dp-codecs.h"
|
||||||
|
|
||||||
|
#include "gstbluezelements.h"
|
||||||
#include "gstavdtpsink.h"
|
#include "gstavdtpsink.h"
|
||||||
|
|
||||||
#include <gst/rtp/rtp.h>
|
#include <gst/rtp/rtp.h>
|
||||||
|
@ -69,6 +70,8 @@ enum
|
||||||
|
|
||||||
#define parent_class gst_avdtp_sink_parent_class
|
#define parent_class gst_avdtp_sink_parent_class
|
||||||
G_DEFINE_TYPE (GstAvdtpSink, gst_avdtp_sink, GST_TYPE_BASE_SINK);
|
G_DEFINE_TYPE (GstAvdtpSink, gst_avdtp_sink, GST_TYPE_BASE_SINK);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (avdtpsink, "avdtpsink", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVDTP_SINK, bluez_element_init (plugin));
|
||||||
|
|
||||||
static GstStaticPadTemplate avdtp_sink_factory =
|
static GstStaticPadTemplate avdtp_sink_factory =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||||
|
@ -410,14 +413,6 @@ gst_avdtp_sink_init (GstAvdtpSink * self)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avdtp_sink_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avdtpsink", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVDTP_SINK);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
GstCaps *
|
GstCaps *
|
||||||
gst_avdtp_sink_get_device_caps (GstAvdtpSink * sink)
|
gst_avdtp_sink_get_device_caps (GstAvdtpSink * sink)
|
||||||
|
|
|
@ -86,8 +86,6 @@ gchar *gst_avdtp_sink_get_device (GstAvdtpSink * sink);
|
||||||
|
|
||||||
gchar *gst_avdtp_sink_get_transport (GstAvdtpSink * sink);
|
gchar *gst_avdtp_sink_get_transport (GstAvdtpSink * sink);
|
||||||
|
|
||||||
gboolean gst_avdtp_sink_plugin_init (GstPlugin * plugin);
|
|
||||||
|
|
||||||
void gst_avdtp_sink_set_crc (GstAvdtpSink * self, gboolean crc);
|
void gst_avdtp_sink_set_crc (GstAvdtpSink * self, gboolean crc);
|
||||||
|
|
||||||
void gst_avdtp_sink_set_channel_mode (GstAvdtpSink * self, const gchar * mode);
|
void gst_avdtp_sink_set_channel_mode (GstAvdtpSink * self, const gchar * mode);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
|
||||||
#include <gst/rtp/gstrtppayloads.h>
|
#include <gst/rtp/gstrtppayloads.h>
|
||||||
|
#include "gstbluezelements.h"
|
||||||
#include "gstavdtpsrc.h"
|
#include "gstavdtpsrc.h"
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (avdtpsrc_debug);
|
GST_DEBUG_CATEGORY_STATIC (avdtpsrc_debug);
|
||||||
|
@ -47,6 +48,8 @@ enum
|
||||||
|
|
||||||
#define parent_class gst_avdtp_src_parent_class
|
#define parent_class gst_avdtp_src_parent_class
|
||||||
G_DEFINE_TYPE (GstAvdtpSrc, gst_avdtp_src, GST_TYPE_BASE_SRC);
|
G_DEFINE_TYPE (GstAvdtpSrc, gst_avdtp_src, GST_TYPE_BASE_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (avdtpsrc, "avdtpsrc", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVDTP_SRC, bluez_element_init (plugin));
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_avdtp_src_template =
|
static GstStaticPadTemplate gst_avdtp_src_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
||||||
|
@ -525,10 +528,3 @@ gst_avdtp_src_unlock_stop (GstBaseSrc * bsrc)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avdtp_src_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avdtpsrc", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVDTP_SRC);
|
|
||||||
}
|
|
||||||
|
|
|
@ -68,7 +68,5 @@ struct _GstAvdtpSrc
|
||||||
|
|
||||||
GType gst_avdtp_src_get_type (void);
|
GType gst_avdtp_src_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avdtp_src_plugin_init (GstPlugin * plugin);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif
|
#endif
|
||||||
|
|
38
sys/bluez/gstbluezelement.c
Normal file
38
sys/bluez/gstbluezelement.c
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/* GStreamer bluez plugin
|
||||||
|
*
|
||||||
|
* Copyright (C) 2013 Collabora Ltd. <tim.muller@collabora.co.uk>
|
||||||
|
*
|
||||||
|
* 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 "gstbluezelements.h"
|
||||||
|
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY (avdtp_debug);
|
||||||
|
|
||||||
|
void
|
||||||
|
bluez_element_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
static gsize res = FALSE;
|
||||||
|
if (g_once_init_enter (&res)) {
|
||||||
|
GST_DEBUG_CATEGORY_INIT (avdtp_debug, "avdtp", 0, "avdtp utils");
|
||||||
|
g_once_init_leave (&res, TRUE);
|
||||||
|
}
|
||||||
|
}
|
36
sys/bluez/gstbluezelements.h
Normal file
36
sys/bluez/gstbluezelements.h
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) <2020> Julian Bouzas <julian.bouzas@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_BLUEZ_ELEMENTS_H__
|
||||||
|
#define __GST_BLUEZ_ELEMENTS_H__
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
void bluez_element_init (GstPlugin * plugin);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (a2dpsink);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (avdtpsink);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (avdtpsrc);
|
||||||
|
|
||||||
|
#endif /* __GST_BLUEZ_ELEMENTS_H__ */
|
|
@ -1,5 +1,6 @@
|
||||||
bluez_sources = [
|
bluez_sources = [
|
||||||
'bluez-plugin.c',
|
'bluez-plugin.c',
|
||||||
|
'gstbluezelement.c',
|
||||||
'gsta2dpsink.c',
|
'gsta2dpsink.c',
|
||||||
'gstavdtpsink.c',
|
'gstavdtpsink.c',
|
||||||
'gstavdtpsrc.c',
|
'gstavdtpsrc.c',
|
||||||
|
|
|
@ -1992,45 +1992,22 @@ gst_decklink_clock_get_internal_time (GstClock * clock)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
void
|
||||||
plugin_init (GstPlugin * plugin)
|
decklink_element_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_decklink_debug, "decklink", 0,
|
static gsize res = FALSE;
|
||||||
"debug category for decklink plugin");
|
if (g_once_init_enter (&res)) {
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_decklink_debug, "decklink", 0,
|
||||||
|
"debug category for decklink plugin");
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_AUDIO_CHANNELS, (GstPluginAPIFlags) 0);
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_AUDIO_CONNECTION, (GstPluginAPIFlags) 0);
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_PROFILE_ID, (GstPluginAPIFlags) 0);
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_KEYER_MODE, (GstPluginAPIFlags) 0);
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_MODE, (GstPluginAPIFlags) 0);
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_TIMECODE_FORMAT, (GstPluginAPIFlags) 0);
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_VIDEO_FORMAT, (GstPluginAPIFlags) 0);
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_CONNECTION, (GstPluginAPIFlags) 0);
|
||||||
|
|
||||||
gst_element_register (plugin, "decklinkaudiosink", GST_RANK_NONE,
|
g_once_init_leave (&res, TRUE);
|
||||||
GST_TYPE_DECKLINK_AUDIO_SINK);
|
}
|
||||||
gst_element_register (plugin, "decklinkvideosink", GST_RANK_NONE,
|
|
||||||
GST_TYPE_DECKLINK_VIDEO_SINK);
|
|
||||||
gst_element_register (plugin, "decklinkaudiosrc", GST_RANK_NONE,
|
|
||||||
GST_TYPE_DECKLINK_AUDIO_SRC);
|
|
||||||
gst_element_register (plugin, "decklinkvideosrc", GST_RANK_NONE,
|
|
||||||
GST_TYPE_DECKLINK_VIDEO_SRC);
|
|
||||||
|
|
||||||
gst_device_provider_register (plugin, "decklinkdeviceprovider",
|
|
||||||
GST_RANK_PRIMARY, GST_TYPE_DECKLINK_DEVICE_PROVIDER);
|
|
||||||
|
|
||||||
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_AUDIO_CHANNELS,
|
|
||||||
(GstPluginAPIFlags) 0);
|
|
||||||
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_AUDIO_CONNECTION,
|
|
||||||
(GstPluginAPIFlags) 0);
|
|
||||||
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_PROFILE_ID,
|
|
||||||
(GstPluginAPIFlags) 0);
|
|
||||||
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_KEYER_MODE,
|
|
||||||
(GstPluginAPIFlags) 0);
|
|
||||||
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_MODE, (GstPluginAPIFlags) 0);
|
|
||||||
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_TIMECODE_FORMAT,
|
|
||||||
(GstPluginAPIFlags) 0);
|
|
||||||
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_VIDEO_FORMAT,
|
|
||||||
(GstPluginAPIFlags) 0);
|
|
||||||
gst_type_mark_as_plugin_api (GST_TYPE_DECKLINK_CONNECTION,
|
|
||||||
(GstPluginAPIFlags) 0);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
||||||
GST_VERSION_MINOR,
|
|
||||||
decklink,
|
|
||||||
"Blackmagic Decklink plugin",
|
|
||||||
plugin_init, VERSION, "LGPL", PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|
|
||||||
|
|
|
@ -55,6 +55,8 @@
|
||||||
#define WINAPI
|
#define WINAPI
|
||||||
#endif /* G_OS_WIN32 */
|
#endif /* G_OS_WIN32 */
|
||||||
|
|
||||||
|
void decklink_element_init (GstPlugin * plugin);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_DECKLINK_MODE_AUTO,
|
GST_DECKLINK_MODE_AUTO,
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
#define parent_class gst_decklink_audio_sink_parent_class
|
#define parent_class gst_decklink_audio_sink_parent_class
|
||||||
G_DEFINE_TYPE (GstDecklinkAudioSink, gst_decklink_audio_sink,
|
G_DEFINE_TYPE (GstDecklinkAudioSink, gst_decklink_audio_sink,
|
||||||
GST_TYPE_BASE_SINK);
|
GST_TYPE_BASE_SINK);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (decklinkaudiosink, "decklinkaudiosink", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DECKLINK_AUDIO_SINK, decklink_element_init (plugin));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_decklink_audio_sink_class_init (GstDecklinkAudioSinkClass * klass)
|
gst_decklink_audio_sink_class_init (GstDecklinkAudioSinkClass * klass)
|
||||||
|
|
|
@ -67,6 +67,8 @@ struct _GstDecklinkAudioSinkClass
|
||||||
|
|
||||||
GType gst_decklink_audio_sink_get_type (void);
|
GType gst_decklink_audio_sink_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (decklinkaudiosink);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_DECKLINK_AUDIO_SINK_H__ */
|
#endif /* __GST_DECKLINK_AUDIO_SINK_H__ */
|
||||||
|
|
|
@ -140,6 +140,8 @@ static gboolean gst_decklink_audio_src_stop (GstDecklinkAudioSrc * self);
|
||||||
|
|
||||||
#define parent_class gst_decklink_audio_src_parent_class
|
#define parent_class gst_decklink_audio_src_parent_class
|
||||||
G_DEFINE_TYPE (GstDecklinkAudioSrc, gst_decklink_audio_src, GST_TYPE_PUSH_SRC);
|
G_DEFINE_TYPE (GstDecklinkAudioSrc, gst_decklink_audio_src, GST_TYPE_PUSH_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (decklinkaudiosrc, "decklinkaudiosrc", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DECKLINK_AUDIO_SRC, decklink_element_init (plugin));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_decklink_audio_src_class_init (GstDecklinkAudioSrcClass * klass)
|
gst_decklink_audio_src_class_init (GstDecklinkAudioSrcClass * klass)
|
||||||
|
|
|
@ -94,6 +94,8 @@ struct _GstDecklinkAudioSrcClass
|
||||||
|
|
||||||
GType gst_decklink_audio_src_get_type (void);
|
GType gst_decklink_audio_src_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (decklinkaudiosrc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_DECKLINK_AUDIO_SRC_H__ */
|
#endif /* __GST_DECKLINK_AUDIO_SRC_H__ */
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstDecklinkDeviceProvider, gst_decklink_device_provider,
|
G_DEFINE_TYPE (GstDecklinkDeviceProvider, gst_decklink_device_provider,
|
||||||
GST_TYPE_DEVICE_PROVIDER);
|
GST_TYPE_DEVICE_PROVIDER);
|
||||||
|
GST_DEVICE_PROVIDER_REGISTER_DEFINE (decklinkdeviceprovider, "decklinkdeviceprovider",
|
||||||
|
GST_RANK_PRIMARY, GST_TYPE_DECKLINK_DEVICE_PROVIDER);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_decklink_device_provider_init (GstDecklinkDeviceProvider * self)
|
gst_decklink_device_provider_init (GstDecklinkDeviceProvider * self)
|
||||||
|
|
|
@ -41,6 +41,7 @@ struct _GstDecklinkDeviceProvider
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_decklink_device_provider_get_type (void);
|
GType gst_decklink_device_provider_get_type (void);
|
||||||
|
GST_DEVICE_PROVIDER_REGISTER_DECLARE (decklinkdeviceprovider);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
52
sys/decklink/gstdecklinkplugin.cpp
Normal file
52
sys/decklink/gstdecklinkplugin.cpp
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) 2011 David Schleef <ds@schleef.org>
|
||||||
|
* Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com>
|
||||||
|
* Copyright (C) 2015 Florian Langlois <florian.langlois@fr.thalesgroup.com>
|
||||||
|
* Copyright (C) 2020 Sohonet <dev@sohonet.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 Street, Suite 500,
|
||||||
|
* Boston, MA 02110-1335, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
#include "gstdecklinkaudiosink.h"
|
||||||
|
#include "gstdecklinkvideosink.h"
|
||||||
|
#include "gstdecklinkaudiosrc.h"
|
||||||
|
#include "gstdecklinkvideosrc.h"
|
||||||
|
#include "gstdecklinkdeviceprovider.h"
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
plugin_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
GST_ELEMENT_REGISTER (decklinkaudiosink, plugin);
|
||||||
|
GST_ELEMENT_REGISTER (decklinkvideosink, plugin);
|
||||||
|
GST_ELEMENT_REGISTER (decklinkaudiosrc, plugin);
|
||||||
|
GST_ELEMENT_REGISTER (decklinkvideosrc, plugin);
|
||||||
|
|
||||||
|
GST_DEVICE_PROVIDER_REGISTER (decklinkdeviceprovider, plugin);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
GST_VERSION_MINOR,
|
||||||
|
decklink,
|
||||||
|
"Blackmagic Decklink plugin",
|
||||||
|
plugin_init, VERSION, "LGPL", PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|
|
@ -280,6 +280,8 @@ gst_decklink_video_sink_start_scheduled_playback (GstElement * element);
|
||||||
#define parent_class gst_decklink_video_sink_parent_class
|
#define parent_class gst_decklink_video_sink_parent_class
|
||||||
G_DEFINE_TYPE (GstDecklinkVideoSink, gst_decklink_video_sink,
|
G_DEFINE_TYPE (GstDecklinkVideoSink, gst_decklink_video_sink,
|
||||||
GST_TYPE_BASE_SINK);
|
GST_TYPE_BASE_SINK);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (decklinkvideosink, "decklinkvideosink", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DECKLINK_VIDEO_SINK, decklink_element_init (plugin));
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
reset_framerate (GstCapsFeatures * features, GstStructure * structure,
|
reset_framerate (GstCapsFeatures * features, GstStructure * structure,
|
||||||
|
|
|
@ -84,6 +84,8 @@ struct _GstDecklinkVideoSinkClass
|
||||||
|
|
||||||
GType gst_decklink_video_sink_get_type (void);
|
GType gst_decklink_video_sink_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (decklinkvideosink);
|
||||||
|
|
||||||
void gst_decklink_video_sink_convert_to_internal_clock (GstDecklinkVideoSink * self,
|
void gst_decklink_video_sink_convert_to_internal_clock (GstDecklinkVideoSink * self,
|
||||||
GstClockTime * timestamp, GstClockTime * duration);
|
GstClockTime * timestamp, GstClockTime * duration);
|
||||||
|
|
||||||
|
|
|
@ -242,6 +242,8 @@ static void gst_decklink_video_src_start_streams (GstElement * element);
|
||||||
|
|
||||||
#define parent_class gst_decklink_video_src_parent_class
|
#define parent_class gst_decklink_video_src_parent_class
|
||||||
G_DEFINE_TYPE (GstDecklinkVideoSrc, gst_decklink_video_src, GST_TYPE_PUSH_SRC);
|
G_DEFINE_TYPE (GstDecklinkVideoSrc, gst_decklink_video_src, GST_TYPE_PUSH_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (decklinkvideosrc, "decklinkvideosrc", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DECKLINK_VIDEO_SRC, decklink_element_init (plugin));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_decklink_video_src_class_init (GstDecklinkVideoSrcClass * klass)
|
gst_decklink_video_src_class_init (GstDecklinkVideoSrcClass * klass)
|
||||||
|
|
|
@ -124,6 +124,8 @@ struct _GstDecklinkVideoSrcClass
|
||||||
|
|
||||||
GType gst_decklink_video_src_get_type (void);
|
GType gst_decklink_video_src_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (decklinkvideosrc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_DECKLINK_VIDEO_SRC_H__ */
|
#endif /* __GST_DECKLINK_VIDEO_SRC_H__ */
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
decklink_sources = [
|
decklink_sources = [
|
||||||
|
'gstdecklinkplugin.cpp',
|
||||||
'gstdecklink.cpp',
|
'gstdecklink.cpp',
|
||||||
'gstdecklinkaudiosink.cpp',
|
'gstdecklinkaudiosink.cpp',
|
||||||
'gstdecklinkvideosink.cpp',
|
'gstdecklinkvideosink.cpp',
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/mpegts/mpegts.h>
|
#include <gst/mpegts/mpegts.h>
|
||||||
|
#include "gstdvbelements.h"
|
||||||
#include "dvbbasebin.h"
|
#include "dvbbasebin.h"
|
||||||
#include "parsechannels.h"
|
#include "parsechannels.h"
|
||||||
|
|
||||||
|
@ -169,7 +170,12 @@ G_DEFINE_TYPE_EXTENDED (DvbBaseBin, dvb_base_bin, GST_TYPE_BIN,
|
||||||
0,
|
0,
|
||||||
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER,
|
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER,
|
||||||
dvb_base_bin_uri_handler_init));
|
dvb_base_bin_uri_handler_init));
|
||||||
|
#define _do_init \
|
||||||
|
GST_DEBUG_CATEGORY_INIT (dvb_base_bin_debug, "dvbbasebin", 0, "DVB bin"); \
|
||||||
|
cam_init (); \
|
||||||
|
dvb_element_init (plugin);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dvbbasebin, "dvbbasebin", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DVB_BASE_BIN, _do_init);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dvb_base_bin_ref_stream (DvbBaseBinStream * stream)
|
dvb_base_bin_ref_stream (DvbBaseBinStream * stream)
|
||||||
|
@ -1216,16 +1222,6 @@ dvb_base_bin_uri_handler_init (gpointer g_iface, gpointer iface_data)
|
||||||
iface->set_uri = dvb_base_bin_uri_set_uri;
|
iface->set_uri = dvb_base_bin_uri_set_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_dvb_base_bin_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
GST_DEBUG_CATEGORY_INIT (dvb_base_bin_debug, "dvbbasebin", 0, "DVB bin");
|
|
||||||
|
|
||||||
cam_init ();
|
|
||||||
|
|
||||||
return gst_element_register (plugin, "dvbbasebin",
|
|
||||||
GST_RANK_NONE, GST_TYPE_DVB_BASE_BIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dvb_base_bin_program_destroy (gpointer data)
|
dvb_base_bin_program_destroy (gpointer data)
|
||||||
|
|
|
@ -75,7 +75,6 @@ struct _DvbBaseBinClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
GType dvb_base_bin_get_type(void);
|
GType dvb_base_bin_get_type(void);
|
||||||
gboolean gst_dvb_base_bin_plugin_init (GstPlugin *plugin);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* gstdvb.c -
|
* gstdvb.c -
|
||||||
* Copyright (C) 2007 Alessandro Decina
|
* Copyright (C) 2007 Alessandro Decina
|
||||||
|
@ -26,26 +27,17 @@
|
||||||
|
|
||||||
#include <gst/gst-i18n-plugin.h>
|
#include <gst/gst-i18n-plugin.h>
|
||||||
|
|
||||||
#include "gstdvbsrc.h"
|
#include "gstdvbelements.h"
|
||||||
#include "dvbbasebin.h"
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_NLS
|
gboolean ret = FALSE;
|
||||||
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
|
|
||||||
LOCALEDIR);
|
|
||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
|
||||||
#endif /* ENABLE_NLS */
|
|
||||||
|
|
||||||
if (!gst_dvbsrc_plugin_init (plugin))
|
ret |= GST_ELEMENT_REGISTER (dvbsrc, plugin);
|
||||||
return FALSE;
|
ret |= GST_ELEMENT_REGISTER (dvbbasebin, plugin);
|
||||||
|
|
||||||
if (!gst_dvb_base_bin_plugin_init (plugin))
|
return ret;
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
44
sys/dvb/gstdvbelement.c
Normal file
44
sys/dvb/gstdvbelement.c
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* gstdvb.c -
|
||||||
|
* Copyright (C) 2007 Alessandro Decina
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Alessandro Decina <alessandro.d@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 <gst/gst-i18n-plugin.h>
|
||||||
|
|
||||||
|
#include "gstdvbelements.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
dvb_element_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
static gsize res = FALSE;
|
||||||
|
if (g_once_init_enter (&res)) {
|
||||||
|
#ifdef ENABLE_NLS
|
||||||
|
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
|
||||||
|
LOCALEDIR);
|
||||||
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
|
#endif /* ENABLE_NLS */
|
||||||
|
g_once_init_leave (&res, TRUE);
|
||||||
|
}
|
||||||
|
}
|
34
sys/dvb/gstdvbelements.h
Normal file
34
sys/dvb/gstdvbelements.h
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) <2020> Julian Bouzas <julian.bouzas@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_DVB_ELEMENTS_H__
|
||||||
|
#define __GST_DVB_ELEMENTS_H__
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
void dvb_element_init (GstPlugin * plugin);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (dvbbasebin);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (dvbsrc);
|
||||||
|
|
||||||
|
#endif /* __GST_DVB_ELEMENTS_H__ */
|
|
@ -93,6 +93,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gstdvbelements.h"
|
||||||
#include "gstdvbsrc.h"
|
#include "gstdvbsrc.h"
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/glib-compat-private.h>
|
#include <gst/glib-compat-private.h>
|
||||||
|
@ -601,6 +602,11 @@ static GstStaticPadTemplate ts_src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
||||||
#define gst_dvbsrc_parent_class parent_class
|
#define gst_dvbsrc_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstDvbSrc, gst_dvbsrc, GST_TYPE_PUSH_SRC);
|
G_DEFINE_TYPE (GstDvbSrc, gst_dvbsrc, GST_TYPE_PUSH_SRC);
|
||||||
|
#define _do_init \
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gstdvbsrc_debug, "dvbsrc", 0, "DVB Source Element");\
|
||||||
|
dvb_element_init (plugin);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dvbsrc, "dvbsrc", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DVBSRC, _do_init);
|
||||||
|
|
||||||
static guint gst_dvbsrc_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_dvbsrc_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
@ -1859,14 +1865,6 @@ gst_dvbsrc_finalize (GObject * _object)
|
||||||
* register the element factories and pad templates
|
* register the element factories and pad templates
|
||||||
* register the features
|
* register the features
|
||||||
*/
|
*/
|
||||||
gboolean
|
|
||||||
gst_dvbsrc_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gstdvbsrc_debug, "dvbsrc", 0, "DVB Source Element");
|
|
||||||
|
|
||||||
return gst_element_register (plugin, "dvbsrc", GST_RANK_NONE,
|
|
||||||
GST_TYPE_DVBSRC);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_dvbsrc_read_device (GstDvbSrc * object, int size, GstBuffer ** buffer)
|
gst_dvbsrc_read_device (GstDvbSrc * object, int size, GstBuffer ** buffer)
|
||||||
|
|
|
@ -144,7 +144,6 @@ struct _GstDvbSrcClass
|
||||||
|
|
||||||
|
|
||||||
GType gst_dvbsrc_get_type (void);
|
GType gst_dvbsrc_get_type (void);
|
||||||
gboolean gst_dvbsrc_plugin_init (GstPlugin * plugin);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_DVBSRC_H__ */
|
#endif /* __GST_DVBSRC_H__ */
|
||||||
|
|
|
@ -11,6 +11,7 @@ dvb_sources = [
|
||||||
'camutils.c',
|
'camutils.c',
|
||||||
'dvbbasebin.c',
|
'dvbbasebin.c',
|
||||||
'gstdvb.c',
|
'gstdvb.c',
|
||||||
|
'gstdvbelement.c',
|
||||||
'gstdvbsrc.c',
|
'gstdvbsrc.c',
|
||||||
'parsechannels.c',
|
'parsechannels.c',
|
||||||
]
|
]
|
||||||
|
|
|
@ -83,6 +83,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
|
|
||||||
#define parent_class gst_fbdevsink_parent_class
|
#define parent_class gst_fbdevsink_parent_class
|
||||||
G_DEFINE_TYPE (GstFBDEVSink, gst_fbdevsink, GST_TYPE_VIDEO_SINK);
|
G_DEFINE_TYPE (GstFBDEVSink, gst_fbdevsink, GST_TYPE_VIDEO_SINK);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (fbdevsink, "fbdevsink", GST_RANK_NONE,
|
||||||
|
GST_TYPE_FBDEVSINK);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_fbdevsink_init (GstFBDEVSink * fbdevsink)
|
gst_fbdevsink_init (GstFBDEVSink * fbdevsink)
|
||||||
|
@ -394,11 +396,7 @@ gst_fbdevsink_change_state (GstElement * element, GstStateChange transition)
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "fbdevsink", GST_RANK_NONE,
|
return GST_ELEMENT_REGISTER (fbdevsink, plugin);
|
||||||
GST_TYPE_FBDEVSINK))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -67,6 +67,7 @@ struct _GstFBDEVSinkClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_fbdevsink_get_type(void);
|
GType gst_fbdevsink_get_type(void);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (fbdevsink);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -22,21 +22,15 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gstipcpipelinecomm.h"
|
#include "gstipcpipelineelements.h"
|
||||||
#include "gstipcpipelinesink.h"
|
|
||||||
#include "gstipcpipelinesrc.h"
|
|
||||||
#include "gstipcslavepipeline.h"
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
gst_ipc_pipeline_comm_plugin_init ();
|
GST_ELEMENT_REGISTER (ipcpipelinesrc, plugin);
|
||||||
gst_element_register (plugin, "ipcpipelinesrc", GST_RANK_NONE,
|
GST_ELEMENT_REGISTER (ipcpipelinesink, plugin);
|
||||||
GST_TYPE_IPC_PIPELINE_SRC);
|
GST_ELEMENT_REGISTER (ipcslavepipeline, plugin);
|
||||||
gst_element_register (plugin, "ipcpipelinesink", GST_RANK_NONE,
|
|
||||||
GST_TYPE_IPC_PIPELINE_SINK);
|
|
||||||
gst_element_register (plugin, "ipcslavepipeline", GST_RANK_NONE,
|
|
||||||
GST_TYPE_IPC_SLAVE_PIPELINE);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
37
sys/ipcpipeline/gstipcpipelineelement.c
Normal file
37
sys/ipcpipeline/gstipcpipelineelement.c
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) 2017 YouView TV Ltd
|
||||||
|
* Author: George Kiagiadakis <george.Kiagiadakis@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 Street, Suite 500,
|
||||||
|
* Boston, MA 02110-1335, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "gstipcpipelineelements.h"
|
||||||
|
#include "gstipcpipelinecomm.h"
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
icepipeline_element_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
static gsize res = FALSE;
|
||||||
|
if (g_once_init_enter (&res)) {
|
||||||
|
gst_ipc_pipeline_comm_plugin_init ();
|
||||||
|
g_once_init_leave (&res, TRUE);
|
||||||
|
}
|
||||||
|
}
|
37
sys/ipcpipeline/gstipcpipelineelements.h
Normal file
37
sys/ipcpipeline/gstipcpipelineelements.h
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) 2017 YouView TV Ltd
|
||||||
|
* Author: George Kiagiadakis <george.Kiagiadakis@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_IPCPIPELINE_ELEMENTS_H__
|
||||||
|
#define __GST_IPCPIPELINE_ELEMENTS_H__
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
void icepipeline_element_init (GstPlugin * plugin);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (ipcpipelinesink);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (ipcpipelinesrc);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (ipcslavepipeline);
|
||||||
|
|
||||||
|
#endif /* __GST_IPCPIPELINE_ELEMENTS_H__ */
|
|
@ -73,6 +73,7 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gstipcpipelineelements.h"
|
||||||
#include "gstipcpipelinesink.h"
|
#include "gstipcpipelinesink.h"
|
||||||
|
|
||||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
|
@ -109,6 +110,9 @@ enum
|
||||||
#define gst_ipc_pipeline_sink_parent_class parent_class
|
#define gst_ipc_pipeline_sink_parent_class parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstIpcPipelineSink, gst_ipc_pipeline_sink,
|
G_DEFINE_TYPE_WITH_CODE (GstIpcPipelineSink, gst_ipc_pipeline_sink,
|
||||||
GST_TYPE_ELEMENT, _do_init);
|
GST_TYPE_ELEMENT, _do_init);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (ipcpipelinesink, "ipcpipelinesink",
|
||||||
|
GST_RANK_NONE, GST_TYPE_IPC_PIPELINE_SINK,
|
||||||
|
icepipeline_element_init (plugin));
|
||||||
|
|
||||||
static void gst_ipc_pipeline_sink_set_property (GObject * object, guint prop_id,
|
static void gst_ipc_pipeline_sink_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gstipcpipelineelements.h"
|
||||||
#include "gstipcpipelinesrc.h"
|
#include "gstipcpipelinesrc.h"
|
||||||
|
|
||||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
@ -79,6 +80,9 @@ static GQuark QUARK_UPSTREAM;
|
||||||
#define gst_ipc_pipeline_src_parent_class parent_class
|
#define gst_ipc_pipeline_src_parent_class parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstIpcPipelineSrc, gst_ipc_pipeline_src,
|
G_DEFINE_TYPE_WITH_CODE (GstIpcPipelineSrc, gst_ipc_pipeline_src,
|
||||||
GST_TYPE_ELEMENT, _do_init);
|
GST_TYPE_ELEMENT, _do_init);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (ipcpipelinesrc, "ipcpipelinesrc",
|
||||||
|
GST_RANK_NONE, GST_TYPE_IPC_PIPELINE_SRC,
|
||||||
|
icepipeline_element_init (plugin));
|
||||||
|
|
||||||
static void gst_ipc_pipeline_src_finalize (GObject * object);
|
static void gst_ipc_pipeline_src_finalize (GObject * object);
|
||||||
static void gst_ipc_pipeline_src_dispose (GObject * object);
|
static void gst_ipc_pipeline_src_dispose (GObject * object);
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "gstipcpipelineelements.h"
|
||||||
#include "gstipcpipelinesrc.h"
|
#include "gstipcpipelinesrc.h"
|
||||||
#include "gstipcslavepipeline.h"
|
#include "gstipcslavepipeline.h"
|
||||||
|
|
||||||
|
@ -53,6 +54,9 @@ GST_DEBUG_CATEGORY_STATIC (gst_ipcslavepipeline_debug);
|
||||||
#define gst_ipc_slave_pipeline_parent_class parent_class
|
#define gst_ipc_slave_pipeline_parent_class parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstIpcSlavePipeline, gst_ipc_slave_pipeline,
|
G_DEFINE_TYPE_WITH_CODE (GstIpcSlavePipeline, gst_ipc_slave_pipeline,
|
||||||
GST_TYPE_PIPELINE, _do_init);
|
GST_TYPE_PIPELINE, _do_init);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (ipcslavepipeline, "ipcslavepipeline",
|
||||||
|
GST_RANK_NONE, GST_TYPE_IPC_SLAVE_PIPELINE,
|
||||||
|
icepipeline_element_init (plugin));
|
||||||
|
|
||||||
static gboolean gst_ipc_slave_pipeline_post_message (GstElement * element,
|
static gboolean gst_ipc_slave_pipeline_post_message (GstElement * element,
|
||||||
GstMessage * message);
|
GstMessage * message);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
ipcpipeline_sources = [
|
ipcpipeline_sources = [
|
||||||
'gstipcpipeline.c',
|
'gstipcpipeline.c',
|
||||||
|
'gstipcpipelineelement.c',
|
||||||
'gstipcpipelinecomm.c',
|
'gstipcpipelinecomm.c',
|
||||||
'gstipcpipelinesink.c',
|
'gstipcpipelinesink.c',
|
||||||
'gstipcpipelinesrc.c',
|
'gstipcpipelinesrc.c',
|
||||||
|
|
|
@ -81,6 +81,8 @@ G_DEFINE_TYPE_WITH_CODE (GstKMSSink, gst_kms_sink, GST_TYPE_VIDEO_SINK,
|
||||||
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||||
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
|
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
|
||||||
gst_kms_sink_video_overlay_init));
|
gst_kms_sink_video_overlay_init));
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (kmssink, GST_PLUGIN_NAME, GST_RANK_SECONDARY,
|
||||||
|
GST_TYPE_KMS_SINK);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -2084,11 +2086,7 @@ gst_kms_sink_class_init (GstKMSSinkClass * klass)
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, GST_PLUGIN_NAME, GST_RANK_SECONDARY,
|
return GST_ELEMENT_REGISTER (kmssink, plugin);
|
||||||
GST_TYPE_KMS_SINK))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, kms,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, kms,
|
||||||
|
|
|
@ -100,7 +100,7 @@ struct _GstKMSSinkClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_kms_sink_get_type (void) G_GNUC_CONST;
|
GType gst_kms_sink_get_type (void) G_GNUC_CONST;
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (kmssink);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_KMS_SINK_H__ */
|
#endif /* __GST_KMS_SINK_H__ */
|
||||||
|
|
|
@ -113,6 +113,9 @@ struct _GstMLAudioSink
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstMLAudioSink, gst_ml_audio_sink, GST_TYPE_AUDIO_SINK);
|
G_DEFINE_TYPE (GstMLAudioSink, gst_ml_audio_sink, GST_TYPE_AUDIO_SINK);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (mlaudiosink, "mlaudiosink",
|
||||||
|
GST_RANK_PRIMARY + 10, GST_TYPE_ML_AUDIO_SINK,
|
||||||
|
GST_DEBUG_CATEGORY_INIT (mgl_debug, "magicleap", 0, "Magic Leap elements"));
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,5 +27,5 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_ML_AUDIO_SINK gst_ml_audio_sink_get_type ()
|
#define GST_TYPE_ML_AUDIO_SINK gst_ml_audio_sink_get_type ()
|
||||||
G_DECLARE_FINAL_TYPE (GstMLAudioSink, gst_ml_audio_sink, GST, ML_AUDIO_SINK, GstAudioSink)
|
G_DECLARE_FINAL_TYPE (GstMLAudioSink, gst_ml_audio_sink, GST, ML_AUDIO_SINK, GstAudioSink)
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (mlaudiosink);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -29,12 +29,7 @@ GST_DEBUG_CATEGORY (mgl_debug);
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "mlaudiosink", GST_RANK_PRIMARY + 10,
|
return GST_ELEMENT_REGISTER (mlaudiosink, plugin);
|
||||||
GST_TYPE_ML_AUDIO_SINK))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (mgl_debug, "magicleap", 0, "Magic Leap elements");
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -4,6 +4,7 @@ opensles_sources = [
|
||||||
'openslessink.c',
|
'openslessink.c',
|
||||||
'openslessrc.c',
|
'openslessrc.c',
|
||||||
'opensles.c',
|
'opensles.c',
|
||||||
|
'openslesplugin.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
opensles_option = get_option('opensles')
|
opensles_option = get_option('opensles')
|
||||||
|
|
|
@ -77,25 +77,12 @@ gst_opensles_release_engine (SLObjectItf engine_object_parameter)
|
||||||
g_mutex_unlock (&engine_mutex);
|
g_mutex_unlock (&engine_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
void
|
||||||
plugin_init (GstPlugin * plugin)
|
opensles_element_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
g_mutex_init (&engine_mutex);
|
static gsize res = FALSE;
|
||||||
|
if (g_once_init_enter (&res)) {
|
||||||
if (!gst_element_register (plugin, "openslessink", GST_RANK_PRIMARY,
|
g_mutex_init (&engine_mutex);
|
||||||
GST_TYPE_OPENSLES_SINK)) {
|
g_once_init_leave (&res, TRUE);
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
if (!gst_element_register (plugin, "openslessrc", GST_RANK_PRIMARY,
|
|
||||||
GST_TYPE_OPENSLES_SRC)) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
||||||
GST_VERSION_MINOR,
|
|
||||||
opensles,
|
|
||||||
"OpenSL ES support for GStreamer",
|
|
||||||
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <SLES/OpenSLES.h>
|
#include <SLES/OpenSLES.h>
|
||||||
|
|
||||||
|
void opensles_element_init (GstPlugin * plugin);
|
||||||
|
|
||||||
SLObjectItf gst_opensles_get_engine (void);
|
SLObjectItf gst_opensles_get_engine (void);
|
||||||
void gst_opensles_release_engine (SLObjectItf engine_object);
|
void gst_opensles_release_engine (SLObjectItf engine_object);
|
||||||
|
|
||||||
|
|
43
sys/opensles/openslesplugin.c
Normal file
43
sys/opensles/openslesplugin.c
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) 2012 Fluendo S.A. <support@fluendo.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 "opensles.h"
|
||||||
|
#include "openslessink.h"
|
||||||
|
#include "openslessrc.h"
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
plugin_init (GstPlugin * plugin)
|
||||||
|
{
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
|
ret |= GST_ELEMENT_REGISTER (openslessink, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (openslessrc, plugin);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
GST_VERSION_MINOR,
|
||||||
|
opensles,
|
||||||
|
"OpenSL ES support for GStreamer",
|
||||||
|
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|
|
@ -74,6 +74,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
#define parent_class gst_opensles_sink_parent_class
|
#define parent_class gst_opensles_sink_parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstOpenSLESSink, gst_opensles_sink,
|
G_DEFINE_TYPE_WITH_CODE (GstOpenSLESSink, gst_opensles_sink,
|
||||||
GST_TYPE_AUDIO_BASE_SINK, _do_init);
|
GST_TYPE_AUDIO_BASE_SINK, _do_init);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (openslessink, "openslessink",
|
||||||
|
GST_RANK_PRIMARY, GST_TYPE_OPENSLES_SINK, opensles_element_init (plugin));
|
||||||
|
|
||||||
static GstAudioRingBuffer *
|
static GstAudioRingBuffer *
|
||||||
gst_opensles_sink_create_ringbuffer (GstAudioBaseSink * base)
|
gst_opensles_sink_create_ringbuffer (GstAudioBaseSink * base)
|
||||||
|
|
|
@ -52,6 +52,7 @@ struct _GstOpenSLESSinkClass
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_opensles_sink_get_type (void);
|
GType gst_opensles_sink_get_type (void);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (openslessink);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __OPENSLESSINK_H__ */
|
#endif /* __OPENSLESSINK_H__ */
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "opensles.h"
|
||||||
#include "openslessrc.h"
|
#include "openslessrc.h"
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (opensles_src_debug);
|
GST_DEBUG_CATEGORY_STATIC (opensles_src_debug);
|
||||||
|
@ -58,6 +59,8 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
#define parent_class gst_opensles_src_parent_class
|
#define parent_class gst_opensles_src_parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstOpenSLESSrc, gst_opensles_src,
|
G_DEFINE_TYPE_WITH_CODE (GstOpenSLESSrc, gst_opensles_src,
|
||||||
GST_TYPE_AUDIO_BASE_SRC, _do_init);
|
GST_TYPE_AUDIO_BASE_SRC, _do_init);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (openslessrc, "openslessrc",
|
||||||
|
GST_RANK_PRIMARY, GST_TYPE_OPENSLES_SRC, opensles_element_init (plugin));
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,6 +48,7 @@ struct _GstOpenSLESSrcClass
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_opensles_src_get_type (void);
|
GType gst_opensles_src_get_type (void);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (openslessrc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __OPENSLESSRC_H__ */
|
#endif /* __OPENSLESSRC_H__ */
|
||||||
|
|
|
@ -29,10 +29,12 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
return gst_element_register (plugin, "shmsrc",
|
gboolean ret = FALSE;
|
||||||
GST_RANK_NONE, GST_TYPE_SHM_SRC) &&
|
|
||||||
gst_element_register (plugin, "shmsink",
|
ret |= GST_ELEMENT_REGISTER (shmsrc, plugin);
|
||||||
GST_RANK_NONE, GST_TYPE_SHM_SINK);
|
ret |= GST_ELEMENT_REGISTER (shmsink, plugin);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -83,6 +83,8 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
|
|
||||||
#define gst_shm_sink_parent_class parent_class
|
#define gst_shm_sink_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstShmSink, gst_shm_sink, GST_TYPE_BASE_SINK);
|
G_DEFINE_TYPE (GstShmSink, gst_shm_sink, GST_TYPE_BASE_SINK);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (shmsink, "shmsink", GST_RANK_NONE,
|
||||||
|
GST_TYPE_SHM_SINK);
|
||||||
|
|
||||||
static void gst_shm_sink_finalize (GObject * object);
|
static void gst_shm_sink_finalize (GObject * object);
|
||||||
static void gst_shm_sink_set_property (GObject * object, guint prop_id,
|
static void gst_shm_sink_set_property (GObject * object, guint prop_id,
|
||||||
|
|
|
@ -78,5 +78,7 @@ struct _GstShmSinkClass
|
||||||
|
|
||||||
GType gst_shm_sink_get_type (void);
|
GType gst_shm_sink_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (shmsink);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_SHM_SINK_H__ */
|
#endif /* __GST_SHM_SINK_H__ */
|
||||||
|
|
|
@ -76,6 +76,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
||||||
#define gst_shm_src_parent_class parent_class
|
#define gst_shm_src_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstShmSrc, gst_shm_src, GST_TYPE_PUSH_SRC);
|
G_DEFINE_TYPE (GstShmSrc, gst_shm_src, GST_TYPE_PUSH_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (shmsrc, "shmsrc", GST_RANK_NONE, GST_TYPE_SHM_SRC);
|
||||||
|
|
||||||
static void gst_shm_src_set_property (GObject * object, guint prop_id,
|
static void gst_shm_src_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
|
|
@ -65,6 +65,8 @@ struct _GstShmSrcClass
|
||||||
|
|
||||||
GType gst_shm_src_get_type (void);
|
GType gst_shm_src_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (shmsrc);
|
||||||
|
|
||||||
struct _GstShmPipe {
|
struct _GstShmPipe {
|
||||||
int use_count;
|
int use_count;
|
||||||
|
|
||||||
|
|
|
@ -28,26 +28,19 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gstuvch264_mjpgdemux.h"
|
#include "gstuvch264_mjpgdemux.h"
|
||||||
#include "gstuvch264_src.h"
|
#include "gstuvch264_src.h"
|
||||||
|
#include "gstuvch264deviceprovider.h"
|
||||||
extern GType gst_uvc_h264_device_provider_get_type ();
|
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "uvch264mjpgdemux", GST_RANK_NONE,
|
gboolean ret = FALSE;
|
||||||
GST_TYPE_UVC_H264_MJPG_DEMUX))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "uvch264src", GST_RANK_NONE,
|
ret |= GST_ELEMENT_REGISTER (uvch264mjpgdemux, plugin);
|
||||||
GST_TYPE_UVC_H264_SRC))
|
ret |= GST_ELEMENT_REGISTER (uvch264src, plugin);
|
||||||
return FALSE;
|
ret |= GST_DEVICE_PROVIDER_REGISTER (uvch264deviceprovider, plugin);
|
||||||
|
|
||||||
if (!gst_device_provider_register (plugin, "uvch264deviceprovider",
|
return ret;
|
||||||
GST_RANK_PRIMARY, gst_uvc_h264_device_provider_get_type ()))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -130,6 +130,8 @@ static gboolean gst_uvc_h264_mjpg_demux_query (GstPad * pad,
|
||||||
|
|
||||||
#define gst_uvc_h264_mjpg_demux_parent_class parent_class
|
#define gst_uvc_h264_mjpg_demux_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstUvcH264MjpgDemux, gst_uvc_h264_mjpg_demux, GST_TYPE_ELEMENT);
|
G_DEFINE_TYPE (GstUvcH264MjpgDemux, gst_uvc_h264_mjpg_demux, GST_TYPE_ELEMENT);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (uvch264mjpgdemux, "uvch264mjpgdemux",
|
||||||
|
GST_RANK_NONE, GST_TYPE_UVC_H264_MJPG_DEMUX);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_uvc_h264_mjpg_demux_class_init (GstUvcH264MjpgDemuxClass * klass)
|
gst_uvc_h264_mjpg_demux_class_init (GstUvcH264MjpgDemuxClass * klass)
|
||||||
|
|
|
@ -104,6 +104,8 @@ struct _GstUvcH264MjpgDemuxClass {
|
||||||
|
|
||||||
GType gst_uvc_h264_mjpg_demux_get_type (void);
|
GType gst_uvc_h264_mjpg_demux_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (uvch264mjpgdemux);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_UVC_H264_MJPG_DEMUX_H__ */
|
#endif /* __GST_UVC_H264_MJPG_DEMUX_H__ */
|
||||||
|
|
|
@ -123,6 +123,8 @@ GST_DEBUG_CATEGORY (uvc_h264_src_debug);
|
||||||
|
|
||||||
#define gst_uvc_h264_src_parent_class parent_class
|
#define gst_uvc_h264_src_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstUvcH264Src, gst_uvc_h264_src, GST_TYPE_BASE_CAMERA_SRC);
|
G_DEFINE_TYPE (GstUvcH264Src, gst_uvc_h264_src, GST_TYPE_BASE_CAMERA_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (uvch264src, "uvch264src", GST_RANK_NONE,
|
||||||
|
GST_TYPE_UVC_H264_SRC);
|
||||||
|
|
||||||
#define GST_UVC_H264_SRC_VF_CAPS_STR \
|
#define GST_UVC_H264_SRC_VF_CAPS_STR \
|
||||||
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ";" \
|
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ";" \
|
||||||
|
|
|
@ -158,6 +158,8 @@ struct _GstUvcH264SrcClass
|
||||||
GstBaseCameraSrcClass parent;
|
GstBaseCameraSrcClass parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (uvch264src);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_UVC_H264_SRC_H__ */
|
#endif /* __GST_UVC_H264_SRC_H__ */
|
||||||
|
|
|
@ -54,6 +54,9 @@ struct _GstUvcH264Device
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST_TYPE_DEVICE);
|
G_DEFINE_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST_TYPE_DEVICE);
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
GST_DEVICE_PROVIDER_REGISTER_DEFINE (uvch264deviceprovider,
|
||||||
|
"uvch264deviceprovider", GST_RANK_PRIMARY,
|
||||||
|
gst_uvc_h264_device_provider_get_type ());
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_uvc_h264_device_get_property (GObject * object, guint prop_id,
|
gst_uvc_h264_device_get_property (GObject * object, guint prop_id,
|
||||||
|
|
|
@ -26,5 +26,5 @@ G_BEGIN_DECLS
|
||||||
G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST, UVC_H264_DEVICE, GstDevice)
|
G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST, UVC_H264_DEVICE, GstDevice)
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider)
|
G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider)
|
||||||
|
GST_DEVICE_PROVIDER_REGISTER_DECLARE (uvch264deviceprovider);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
Loading…
Reference in a new issue