mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
gst-plugins: 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/2110>
This commit is contained in:
parent
7f60138ef6
commit
891be51105
322 changed files with 1582 additions and 1198 deletions
|
@ -72,8 +72,6 @@ enum
|
|||
PROP_LAST_TRACK
|
||||
};
|
||||
|
||||
#define parent_class gst_accurip_parent_class
|
||||
G_DEFINE_TYPE (GstAccurip, gst_accurip, GST_TYPE_AUDIO_FILTER);
|
||||
|
||||
|
||||
|
||||
|
@ -86,6 +84,11 @@ static GstFlowReturn gst_accurip_transform_ip (GstBaseTransform * trans,
|
|||
GstBuffer * buf);
|
||||
static gboolean gst_accurip_sink_event (GstBaseTransform * trans,
|
||||
GstEvent * event);
|
||||
static gboolean accurip_element_init (GstPlugin * plugin);
|
||||
|
||||
#define parent_class gst_accurip_parent_class
|
||||
G_DEFINE_TYPE (GstAccurip, gst_accurip, GST_TYPE_AUDIO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (accurip, accurip_element_init);
|
||||
|
||||
static void
|
||||
gst_accurip_class_init (GstAccuripClass * klass)
|
||||
|
@ -342,7 +345,7 @@ gst_accurip_get_property (GObject * object, guint prop_id,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
accurip_element_init (GstPlugin * plugin)
|
||||
{
|
||||
gboolean ret;
|
||||
|
||||
|
@ -362,6 +365,12 @@ plugin_init (GstPlugin * plugin)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return GST_ELEMENT_REGISTER (accurip, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
accurip,
|
||||
|
|
|
@ -80,6 +80,8 @@ struct _GstAccuripClass
|
|||
|
||||
GType gst_accurip_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (accurip);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_ACCURIP_H__ */
|
||||
|
|
|
@ -81,7 +81,12 @@ typedef struct _ADPCMDec
|
|||
} ADPCMDec;
|
||||
|
||||
GType adpcmdec_get_type (void);
|
||||
G_DEFINE_TYPE (ADPCMDec, adpcmdec, GST_TYPE_AUDIO_DECODER);
|
||||
GST_ELEMENT_REGISTER_DECLARE (adpcmdec);
|
||||
G_DEFINE_TYPE_WITH_CODE (ADPCMDec, adpcmdec, GST_TYPE_AUDIO_DECODER,
|
||||
GST_DEBUG_CATEGORY_INIT (adpcmdec_debug, "adpcmdec", 0, "ADPCM Decoders");
|
||||
);
|
||||
GST_ELEMENT_REGISTER_DEFINE (adpcmdec, "adpcmdec", GST_RANK_PRIMARY,
|
||||
GST_TYPE_ADPCM_DEC);
|
||||
|
||||
static gboolean
|
||||
adpcmdec_set_format (GstAudioDecoder * bdec, GstCaps * in_caps)
|
||||
|
@ -485,12 +490,7 @@ adpcmdec_class_init (ADPCMDecClass * klass)
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (adpcmdec_debug, "adpcmdec", 0, "ADPCM Decoders");
|
||||
if (!gst_element_register (plugin, "adpcmdec", GST_RANK_PRIMARY,
|
||||
GST_TYPE_ADPCM_DEC)) {
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
return GST_ELEMENT_REGISTER (adpcmdec, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, adpcmdec,
|
||||
|
|
|
@ -132,7 +132,12 @@ typedef struct _ADPCMEnc
|
|||
} ADPCMEnc;
|
||||
|
||||
GType adpcmenc_get_type (void);
|
||||
G_DEFINE_TYPE (ADPCMEnc, adpcmenc, GST_TYPE_AUDIO_ENCODER);
|
||||
GST_ELEMENT_REGISTER_DECLARE (adpcmenc);
|
||||
G_DEFINE_TYPE_WITH_CODE (ADPCMEnc, adpcmenc, GST_TYPE_AUDIO_ENCODER,
|
||||
GST_DEBUG_CATEGORY_INIT (adpcmenc_debug, "adpcmenc", 0, "ADPCM Encoders");
|
||||
);
|
||||
GST_ELEMENT_REGISTER_DEFINE (adpcmenc, "adpcmenc", GST_RANK_PRIMARY,
|
||||
GST_TYPE_ADPCM_ENC);
|
||||
|
||||
static gboolean
|
||||
adpcmenc_setup (ADPCMEnc * enc)
|
||||
|
@ -470,12 +475,7 @@ adpcmenc_class_init (ADPCMEncClass * klass)
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (adpcmenc_debug, "adpcmenc", 0, "ADPCM Encoders");
|
||||
if (!gst_element_register (plugin, "adpcmenc", GST_RANK_PRIMARY,
|
||||
GST_TYPE_ADPCM_ENC)) {
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
return GST_ELEMENT_REGISTER (adpcmenc, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, adpcmenc,
|
||||
|
|
|
@ -22,41 +22,16 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <gst/tag/tag.h>
|
||||
#include "aiffelements.h"
|
||||
|
||||
#include <gst/gst-i18n-plugin.h>
|
||||
|
||||
#include "aiffparse.h"
|
||||
#include "aiffmux.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (aiff_debug);
|
||||
#define GST_CAT_DEFAULT (aiff_debug)
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (aiffparse_debug);
|
||||
GST_DEBUG_CATEGORY_EXTERN (aiffmux_debug);
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gboolean ret;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (aiff_debug, "aiff", 0, "AIFF plugin");
|
||||
GST_DEBUG_CATEGORY_INIT (aiffparse_debug, "aiffparse", 0, "AIFF parser");
|
||||
GST_DEBUG_CATEGORY_INIT (aiffmux_debug, "aiffmux", 0, "AIFF muxer");
|
||||
|
||||
#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
|
||||
|
||||
ret = gst_element_register (plugin, "aiffparse", GST_RANK_PRIMARY,
|
||||
GST_TYPE_AIFF_PARSE);
|
||||
ret &= gst_element_register (plugin, "aiffmux", GST_RANK_PRIMARY,
|
||||
GST_TYPE_AIFF_MUX);
|
||||
|
||||
gst_tag_register_musicbrainz_tags ();
|
||||
ret |= GST_ELEMENT_REGISTER (aiffparse, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (aiffmux, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
35
gst/aiff/aiffelements.h
Normal file
35
gst/aiff/aiffelements.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <2020> The GStreamer Contributors.
|
||||
*
|
||||
* 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_AIFF_ELEMENTS_H__
|
||||
#define __GST_AIFF_ELEMENTS_H__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_GNUC_INTERNAL void aiff_element_init (GstPlugin * plugin);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (aiffmux);
|
||||
GST_ELEMENT_REGISTER_DECLARE (aiffparse);
|
||||
|
||||
#endif /* __GST_AIFF_ELEMENTS_H__ */
|
|
@ -57,6 +57,7 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/base/gstbytewriter.h>
|
||||
|
||||
#include "aiffelements.h"
|
||||
#include "aiffmux.h"
|
||||
|
||||
GST_DEBUG_CATEGORY (aiffmux_debug);
|
||||
|
@ -77,7 +78,10 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
);
|
||||
|
||||
#define gst_aiff_mux_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstAiffMux, gst_aiff_mux, GST_TYPE_ELEMENT);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstAiffMux, gst_aiff_mux, GST_TYPE_ELEMENT,
|
||||
GST_DEBUG_CATEGORY_INIT (aiffmux_debug, "aiffmux", 0, "AIFF muxer"));
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (aiffmux, "aiffmux", GST_RANK_PRIMARY,
|
||||
GST_TYPE_AIFF_MUX, aiff_element_init (plugin));
|
||||
|
||||
static GstStateChangeReturn
|
||||
gst_aiff_mux_change_state (GstElement * element, GstStateChange transition)
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "aiffelements.h"
|
||||
#include "aiffparse.h"
|
||||
#include <gst/audio/audio.h>
|
||||
#include <gst/tag/tag.h>
|
||||
|
@ -104,7 +105,10 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
#define MAX_BUFFER_SIZE 4096
|
||||
|
||||
#define gst_aiff_parse_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstAiffParse, gst_aiff_parse, GST_TYPE_ELEMENT);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstAiffParse, gst_aiff_parse, GST_TYPE_ELEMENT,
|
||||
GST_DEBUG_CATEGORY_INIT (aiffparse_debug, "aiffparse", 0, "AIFF parser"));
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (aiffparse, "aiffparse", GST_RANK_PRIMARY,
|
||||
GST_TYPE_AIFF_PARSE, aiff_element_init (plugin));
|
||||
|
||||
static void
|
||||
gst_aiff_parse_class_init (GstAiffParseClass * klass)
|
||||
|
|
50
gst/aiff/gstaiffelement.c
Normal file
50
gst/aiff/gstaiffelement.c
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */
|
||||
/* GStreamer AIFF plugin initialisation
|
||||
* Copyright (C) <2008> Pioneers of the Inevitable <songbird@songbirdnest.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/tag/tag.h>
|
||||
|
||||
#include <gst/gst-i18n-plugin.h>
|
||||
|
||||
#include "aiffelements.h"
|
||||
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (aiff_debug);
|
||||
#define GST_CAT_DEFAULT (aiff_debug)
|
||||
|
||||
void
|
||||
aiff_element_init (GstPlugin * plugin)
|
||||
{
|
||||
static gsize res = FALSE;
|
||||
if (g_once_init_enter (&res)) {
|
||||
GST_DEBUG_CATEGORY_INIT (aiff_debug, "aiff", 0, "AIFF plugin");
|
||||
#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
|
||||
gst_tag_register_musicbrainz_tags ();
|
||||
g_once_init_leave (&res, TRUE);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
aiff_sources = [
|
||||
'aiff.c', 'aiffmux.c', 'aiffparse.c',
|
||||
'aiff.c', 'aiffmux.c', 'aiffparse.c', 'gstaiffelement.c'
|
||||
]
|
||||
|
||||
gstaiff = library('gstaiff',
|
||||
|
|
|
@ -32,16 +32,13 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
if (!gst_asf_mux_plugin_init (plugin)) {
|
||||
return FALSE;
|
||||
}
|
||||
if (!gst_rtp_asf_pay_plugin_init (plugin)) {
|
||||
return FALSE;
|
||||
}
|
||||
if (!gst_asf_parse_plugin_init (plugin)) {
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret |= GST_ELEMENT_REGISTER (asfmux, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (rtpasfpay, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (asfparse, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -173,6 +173,8 @@ static GstElementClass *parent_class = NULL;
|
|||
|
||||
G_DEFINE_TYPE_WITH_CODE (GstAsfMux, gst_asf_mux, GST_TYPE_ELEMENT,
|
||||
G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_SETTER, NULL));
|
||||
GST_ELEMENT_REGISTER_DEFINE (asfmux, "asfmux",
|
||||
GST_RANK_PRIMARY, GST_TYPE_ASF_MUX);
|
||||
|
||||
static void
|
||||
gst_asf_mux_reset (GstAsfMux * asfmux)
|
||||
|
@ -2455,10 +2457,3 @@ gst_asf_mux_change_state (GstElement * element, GstStateChange transition)
|
|||
done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_asf_mux_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "asfmux",
|
||||
GST_RANK_PRIMARY, GST_TYPE_ASF_MUX);
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ struct _GstAsfMuxClass
|
|||
};
|
||||
|
||||
GType gst_asf_mux_get_type (void);
|
||||
gboolean gst_asf_mux_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (asfmux);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_ASF_MUX_H__ */
|
||||
|
|
|
@ -44,6 +44,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
|
||||
#define gst_asf_parse_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstAsfParse, gst_asf_parse, GST_TYPE_BASE_PARSE);
|
||||
GST_ELEMENT_REGISTER_DEFINE (asfparse, "asfparse",
|
||||
GST_RANK_NONE, GST_TYPE_ASF_PARSE);
|
||||
|
||||
static gboolean
|
||||
gst_asf_parse_start (GstBaseParse * parse)
|
||||
|
@ -416,10 +418,3 @@ gst_asf_parse_init (GstAsfParse * asfparse)
|
|||
asfparse->asfinfo = gst_asf_file_info_new ();
|
||||
asfparse->packetinfo = g_new0 (GstAsfPacketInfo, 1);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_asf_parse_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "asfparse",
|
||||
GST_RANK_NONE, GST_TYPE_ASF_PARSE);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ struct _GstAsfParseClass {
|
|||
};
|
||||
|
||||
GType gst_asf_parse_get_type(void);
|
||||
gboolean gst_asf_parse_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (asfparse);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ gst_rtp_asf_pay_set_caps (GstRTPBasePayload * rtppay, GstCaps * caps);
|
|||
|
||||
#define gst_rtp_asf_pay_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstRtpAsfPay, gst_rtp_asf_pay, GST_TYPE_RTP_BASE_PAYLOAD);
|
||||
GST_ELEMENT_REGISTER_DEFINE (rtpasfpay, "rtpasfpay",
|
||||
GST_RANK_NONE, GST_TYPE_RTP_ASF_PAY);
|
||||
|
||||
static void
|
||||
gst_rtp_asf_pay_init (GstRtpAsfPay * rtpasfpay)
|
||||
|
@ -460,10 +462,3 @@ gst_rtp_asf_pay_handle_buffer (GstRTPBasePayload * rtppay, GstBuffer * buffer)
|
|||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_rtp_asf_pay_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "rtpasfpay",
|
||||
GST_RANK_NONE, GST_TYPE_RTP_ASF_PAY);
|
||||
}
|
||||
|
|
|
@ -81,7 +81,8 @@ struct _GstRtpAsfPayClass
|
|||
};
|
||||
|
||||
GType gst_rtp_asf_pay_get_type (void);
|
||||
gboolean gst_rtp_asf_pay_plugin_init (GstPlugin * plugin);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (rtpasfpay);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_RTP_ASF_PAY_H__ */
|
||||
|
|
|
@ -63,7 +63,11 @@ enum
|
|||
#define DEFAULT_MAX_SILENCE_TIME (0)
|
||||
|
||||
#define parent_class gst_audio_buffer_split_parent_class
|
||||
G_DEFINE_TYPE (GstAudioBufferSplit, gst_audio_buffer_split, GST_TYPE_ELEMENT);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstAudioBufferSplit, gst_audio_buffer_split,
|
||||
GST_TYPE_ELEMENT, GST_DEBUG_CATEGORY_INIT (gst_audio_buffer_split_debug,
|
||||
"audiobuffersplit", 0, "Audio buffer splitter"););
|
||||
GST_ELEMENT_REGISTER_DEFINE (audiobuffersplit, "audiobuffersplit",
|
||||
GST_RANK_NONE, GST_TYPE_AUDIO_BUFFER_SPLIT);
|
||||
|
||||
static GstFlowReturn gst_audio_buffer_split_sink_chain (GstPad * pad,
|
||||
GstObject * parent, GstBuffer * buffer);
|
||||
|
@ -923,13 +927,7 @@ gst_audio_buffer_split_src_query (GstPad * pad,
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_audio_buffer_split_debug, "audiobuffersplit",
|
||||
0, "Audio buffer splitter");
|
||||
|
||||
gst_element_register (plugin, "audiobuffersplit", GST_RANK_NONE,
|
||||
GST_TYPE_AUDIO_BUFFER_SPLIT);
|
||||
|
||||
return TRUE;
|
||||
return GST_ELEMENT_REGISTER (audiobuffersplit, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -74,6 +74,7 @@ struct _GstAudioBufferSplitClass {
|
|||
};
|
||||
|
||||
GType gst_audio_buffer_split_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (audiobuffersplit);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -91,6 +91,8 @@ G_DEFINE_TYPE_WITH_CODE (GstAudioChannelMix, gst_audio_channel_mix,
|
|||
GST_TYPE_AUDIO_FILTER,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_audio_channel_mix_debug_category,
|
||||
"audiochannelmix", 0, "debug category for audiochannelmix element"));
|
||||
GST_ELEMENT_REGISTER_DEFINE (audiochannelmix, "audiochannelmix", GST_RANK_NONE,
|
||||
GST_TYPE_AUDIO_CHANNEL_MIX);
|
||||
|
||||
static void
|
||||
gst_audio_channel_mix_class_init (GstAudioChannelMixClass * klass)
|
||||
|
|
|
@ -50,6 +50,8 @@ struct _GstAudioChannelMixClass
|
|||
|
||||
GType gst_audio_channel_mix_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (audiochannelmix);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,8 +26,7 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "audiochannelmix", GST_RANK_NONE,
|
||||
GST_TYPE_AUDIO_CHANNEL_MIX);
|
||||
return GST_ELEMENT_REGISTER (audiochannelmix, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -79,7 +79,11 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
);
|
||||
|
||||
#define gst_audiolatency_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstAudioLatency, gst_audiolatency, GST_TYPE_BIN);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstAudioLatency, gst_audiolatency, GST_TYPE_BIN,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_audiolatency_debug, "audiolatency", 0,
|
||||
"audiolatency"););
|
||||
GST_ELEMENT_REGISTER_DEFINE (audiolatency, "audiolatency", GST_RANK_PRIMARY,
|
||||
GST_TYPE_AUDIOLATENCY);
|
||||
|
||||
#define DEFAULT_PRINT_LATENCY FALSE
|
||||
enum
|
||||
|
@ -422,11 +426,7 @@ out:
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_audiolatency_debug, "audiolatency", 0,
|
||||
"audiolatency");
|
||||
|
||||
return gst_element_register (plugin, "audiolatency", GST_RANK_PRIMARY,
|
||||
GST_TYPE_AUDIOLATENCY);
|
||||
return GST_ELEMENT_REGISTER (audiolatency, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -65,5 +65,7 @@ struct _GstAudioLatencyClass
|
|||
|
||||
GType gst_audiolatency_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (audiolatency);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_AUDIOLATENCY_H__ */
|
||||
|
|
|
@ -150,6 +150,8 @@ static GstStateChangeReturn gst_audio_mix_matrix_change_state (GstElement *
|
|||
|
||||
G_DEFINE_TYPE (GstAudioMixMatrix, gst_audio_mix_matrix,
|
||||
GST_TYPE_BASE_TRANSFORM);
|
||||
GST_ELEMENT_REGISTER_DEFINE (audiomixmatrix, "audiomixmatrix", GST_RANK_NONE,
|
||||
GST_TYPE_AUDIO_MIX_MATRIX);
|
||||
|
||||
static void
|
||||
gst_audio_mix_matrix_class_init (GstAudioMixMatrixClass * klass)
|
||||
|
@ -743,8 +745,7 @@ beach:
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "audiomixmatrix", GST_RANK_NONE,
|
||||
GST_TYPE_AUDIO_MIX_MATRIX);
|
||||
return GST_ELEMENT_REGISTER (audiomixmatrix, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -72,6 +72,8 @@ struct _GstAudioMixMatrixClass
|
|||
|
||||
GType gst_audio_mix_matrix_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (audiomixmatrix);
|
||||
|
||||
GType gst_audio_mix_matrix_mode_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -120,7 +120,11 @@ static gboolean gst_space_scope_render (GstAudioVisualizer * scope,
|
|||
GstBuffer * audio, GstVideoFrame * video);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GstSpaceScope, gst_space_scope, GST_TYPE_AUDIO_VISUALIZER);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstSpaceScope, gst_space_scope,
|
||||
GST_TYPE_AUDIO_VISUALIZER, GST_DEBUG_CATEGORY_INIT (space_scope_debug,
|
||||
"spacescope", 0, "spacescope"););
|
||||
GST_ELEMENT_REGISTER_DEFINE (spacescope, "spacescope", GST_RANK_NONE,
|
||||
GST_TYPE_SPACE_SCOPE);
|
||||
|
||||
static void
|
||||
gst_space_scope_class_init (GstSpaceScopeClass * g_class)
|
||||
|
@ -445,12 +449,3 @@ gst_space_scope_render (GstAudioVisualizer * base, GstBuffer * audio,
|
|||
gst_buffer_unmap (audio, &amap);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_space_scope_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (space_scope_debug, "spacescope", 0, "spacescope");
|
||||
|
||||
return gst_element_register (plugin, "spacescope", GST_RANK_NONE,
|
||||
GST_TYPE_SPACE_SCOPE);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,8 @@ struct _GstSpaceScopeClass
|
|||
};
|
||||
|
||||
GType gst_space_scope_get_type (void);
|
||||
gboolean gst_space_scope_plugin_init (GstPlugin * plugin);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (spacescope);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_SPACE_SCOPE_H__ */
|
||||
|
|
|
@ -75,7 +75,11 @@ static gboolean gst_spectra_scope_render (GstAudioVisualizer * scope,
|
|||
GstBuffer * audio, GstVideoFrame * video);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GstSpectraScope, gst_spectra_scope, GST_TYPE_AUDIO_VISUALIZER);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstSpectraScope, gst_spectra_scope,
|
||||
GST_TYPE_AUDIO_VISUALIZER, GST_DEBUG_CATEGORY_INIT (spectra_scope_debug,
|
||||
"spectrascope", 0, "spectrascope"););
|
||||
GST_ELEMENT_REGISTER_DEFINE (spectrascope, "spectrascope", GST_RANK_NONE,
|
||||
GST_TYPE_SPECTRA_SCOPE);
|
||||
|
||||
static void
|
||||
gst_spectra_scope_class_init (GstSpectraScopeClass * g_class)
|
||||
|
@ -228,13 +232,3 @@ gst_spectra_scope_render (GstAudioVisualizer * bscope, GstBuffer * audio,
|
|||
gst_buffer_unmap (audio, &amap);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_spectra_scope_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (spectra_scope_debug, "spectrascope", 0,
|
||||
"spectrascope");
|
||||
|
||||
return gst_element_register (plugin, "spectrascope", GST_RANK_NONE,
|
||||
GST_TYPE_SPECTRA_SCOPE);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,8 @@ struct _GstSpectraScopeClass
|
|||
};
|
||||
|
||||
GType gst_spectra_scope_get_type (void);
|
||||
gboolean gst_spectra_scope_plugin_init (GstPlugin * plugin);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (spectrascope);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_SPECTRA_SCOPE_H__ */
|
||||
|
|
|
@ -73,7 +73,11 @@ static gboolean gst_synae_scope_render (GstAudioVisualizer * scope,
|
|||
GstBuffer * audio, GstVideoFrame * video);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GstSynaeScope, gst_synae_scope, GST_TYPE_AUDIO_VISUALIZER);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstSynaeScope, gst_synae_scope,
|
||||
GST_TYPE_AUDIO_VISUALIZER, GST_DEBUG_CATEGORY_INIT (synae_scope_debug,
|
||||
"synaescope", 0, "synaescope"););
|
||||
GST_ELEMENT_REGISTER_DEFINE (synaescope, "synaescope", GST_RANK_NONE,
|
||||
GST_TYPE_SYNAE_SCOPE);
|
||||
|
||||
static void
|
||||
gst_synae_scope_class_init (GstSynaeScopeClass * g_class)
|
||||
|
@ -309,12 +313,3 @@ gst_synae_scope_render (GstAudioVisualizer * bscope, GstBuffer * audio,
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_synae_scope_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (synae_scope_debug, "synaescope", 0, "synaescope");
|
||||
|
||||
return gst_element_register (plugin, "synaescope", GST_RANK_NONE,
|
||||
GST_TYPE_SYNAE_SCOPE);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,8 @@ struct _GstSynaeScopeClass
|
|||
};
|
||||
|
||||
GType gst_synae_scope_get_type (void);
|
||||
gboolean gst_synae_scope_plugin_init (GstPlugin * plugin);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (synaescope);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_SYNAE_SCOPE_H__ */
|
||||
|
|
|
@ -122,7 +122,11 @@ static gboolean gst_wave_scope_render (GstAudioVisualizer * base,
|
|||
GstBuffer * audio, GstVideoFrame * video);
|
||||
|
||||
#define gst_wave_scope_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstWaveScope, gst_wave_scope, GST_TYPE_AUDIO_VISUALIZER);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstWaveScope, gst_wave_scope,
|
||||
GST_TYPE_AUDIO_VISUALIZER, GST_DEBUG_CATEGORY_INIT (wave_scope_debug,
|
||||
"wavescope", 0, "wavescope"););
|
||||
GST_ELEMENT_REGISTER_DEFINE (wavescope, "wavescope", GST_RANK_NONE,
|
||||
GST_TYPE_WAVE_SCOPE);
|
||||
|
||||
static void
|
||||
gst_wave_scope_class_init (GstWaveScopeClass * g_class)
|
||||
|
@ -422,12 +426,3 @@ gst_wave_scope_render (GstAudioVisualizer * base, GstBuffer * audio,
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_wave_scope_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (wave_scope_debug, "wavescope", 0, "wavescope");
|
||||
|
||||
return gst_element_register (plugin, "wavescope", GST_RANK_NONE,
|
||||
GST_TYPE_WAVE_SCOPE);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,8 @@ struct _GstWaveScopeClass
|
|||
};
|
||||
|
||||
GType gst_wave_scope_get_type (void);
|
||||
gboolean gst_wave_scope_plugin_init (GstPlugin * plugin);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (wavescope);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_WAVE_SCOPE_H__ */
|
||||
|
|
|
@ -32,13 +32,14 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
res &= gst_space_scope_plugin_init (plugin);
|
||||
res &= gst_spectra_scope_plugin_init (plugin);
|
||||
res &= gst_synae_scope_plugin_init (plugin);
|
||||
res &= gst_wave_scope_plugin_init (plugin);
|
||||
return res;
|
||||
ret |= GST_ELEMENT_REGISTER (spacescope, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (spectrascope, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (synaescope, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (wavescope, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -145,6 +145,8 @@ static GQuark internal_sinkpad_quark = 0;
|
|||
static GQuark parent_quark = 0;
|
||||
|
||||
G_DEFINE_TYPE (GstAutoConvert, gst_auto_convert, GST_TYPE_BIN);
|
||||
GST_ELEMENT_REGISTER_DEFINE (autoconvert, "autoconvert",
|
||||
GST_RANK_NONE, GST_TYPE_AUTO_CONVERT);
|
||||
|
||||
static void
|
||||
gst_auto_convert_class_init (GstAutoConvertClass * klass)
|
||||
|
|
|
@ -61,6 +61,7 @@ struct _GstAutoConvertClass
|
|||
};
|
||||
|
||||
GType gst_auto_convert_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (autoconvert);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_AUTO_CONVERT_H__ */
|
||||
|
|
|
@ -131,6 +131,8 @@ gst_auto_video_convert_update_factory_list (GstAutoVideoConvert *
|
|||
}
|
||||
|
||||
G_DEFINE_TYPE (GstAutoVideoConvert, gst_auto_video_convert, GST_TYPE_BIN);
|
||||
GST_ELEMENT_REGISTER_DEFINE (autovideoconvert, "autovideoconvert",
|
||||
GST_RANK_NONE, GST_TYPE_AUTO_VIDEO_CONVERT);
|
||||
|
||||
static void
|
||||
gst_auto_video_convert_class_init (GstAutoVideoConvertClass * klass)
|
||||
|
|
|
@ -50,6 +50,7 @@ struct _GstAutoVideoConvertClass
|
|||
};
|
||||
|
||||
GType gst_auto_video_convert_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (autovideoconvert);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_AUTO_VIDEO_CONVERT_H__ */
|
||||
|
|
|
@ -28,13 +28,10 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gboolean ret;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret = gst_element_register (plugin, "autoconvert",
|
||||
GST_RANK_NONE, GST_TYPE_AUTO_CONVERT);
|
||||
|
||||
ret &= gst_element_register (plugin, "autovideoconvert",
|
||||
GST_RANK_NONE, GST_TYPE_AUTO_VIDEO_CONVERT);
|
||||
ret |= GST_ELEMENT_REGISTER (autoconvert, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (autovideoconvert, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -23,19 +23,17 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
||||
GType gst_bayer2rgb_get_type (void);
|
||||
GType gst_rgb2bayer_get_type (void);
|
||||
#include "gstbayerelements.h"
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gst_element_register (plugin, "bayer2rgb", GST_RANK_NONE,
|
||||
gst_bayer2rgb_get_type ());
|
||||
gst_element_register (plugin, "rgb2bayer", GST_RANK_NONE,
|
||||
gst_rgb2bayer_get_type ());
|
||||
gboolean ret = FALSE;
|
||||
|
||||
return TRUE;
|
||||
ret |= GST_ELEMENT_REGISTER (bayer2rgb, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (rgb2bayer, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "gstbayerelements.h"
|
||||
#include "gstbayerorc.h"
|
||||
|
||||
#define GST_CAT_DEFAULT gst_bayer2rgb_debug
|
||||
|
@ -145,6 +146,8 @@ GType gst_bayer2rgb_get_type (void);
|
|||
|
||||
#define gst_bayer2rgb_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstBayer2RGB, gst_bayer2rgb, GST_TYPE_BASE_TRANSFORM);
|
||||
GST_ELEMENT_REGISTER_DEFINE (bayer2rgb, "bayer2rgb", GST_RANK_NONE,
|
||||
gst_bayer2rgb_get_type ());
|
||||
|
||||
static void gst_bayer2rgb_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
|
33
gst/bayer/gstbayerelements.h
Normal file
33
gst/bayer/gstbayerelements.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/* 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_BAYER_ELEMENT_H__
|
||||
#define __GST_BAYER_ELEMENT_H__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (bayer2rgb);
|
||||
GST_ELEMENT_REGISTER_DECLARE (rgb2bayer);
|
||||
|
||||
#endif /* __GST_BAYER_ELEMENT_H__ */
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/base/gstbasetransform.h>
|
||||
#include <gst/video/video.h>
|
||||
#include "gstbayerelements.h"
|
||||
#include "gstrgb2bayer.h"
|
||||
|
||||
#define GST_CAT_DEFAULT gst_rgb2bayer_debug
|
||||
|
@ -76,6 +77,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
#define gst_rgb2bayer_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstRGB2Bayer, gst_rgb2bayer, GST_TYPE_BASE_TRANSFORM);
|
||||
GST_ELEMENT_REGISTER_DEFINE (rgb2bayer, "rgb2bayer", GST_RANK_NONE,
|
||||
gst_rgb2bayer_get_type ());
|
||||
|
||||
static void
|
||||
gst_rgb2bayer_class_init (GstRGB2BayerClass * klass)
|
||||
|
|
|
@ -311,6 +311,11 @@ gst_camera_bin2_get_type (void)
|
|||
return gst_camera_bin_type;
|
||||
}
|
||||
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (camerabin, "camerabin", GST_RANK_NONE,
|
||||
gst_camera_bin2_get_type (), GST_DEBUG_CATEGORY_INIT (gst_camera_bin_debug,
|
||||
"camerabin", 0, "CameraBin");
|
||||
);
|
||||
|
||||
/* GObject class functions */
|
||||
static void gst_camera_bin_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
@ -2390,12 +2395,3 @@ gst_camera_bin_get_property (GObject * object, guint prop_id,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_camera_bin2_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_camera_bin_debug, "camerabin", 0, "CameraBin");
|
||||
|
||||
return gst_element_register (plugin, "camerabin", GST_RANK_NONE,
|
||||
gst_camera_bin2_get_type ());
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ struct _GstCameraBin2Class
|
|||
};
|
||||
|
||||
GType gst_camera_bin2_get_type (void);
|
||||
gboolean gst_camera_bin2_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (camerabin);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -30,14 +30,13 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
if (!gst_viewfinder_bin_plugin_init (plugin))
|
||||
return FALSE;
|
||||
if (!gst_wrapper_camera_bin_src_plugin_init (plugin))
|
||||
return FALSE;
|
||||
if (!gst_camera_bin2_plugin_init (plugin))
|
||||
return FALSE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
return TRUE;
|
||||
ret |= GST_ELEMENT_REGISTER (viewfinderbin, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (wrappercamerabinsrc, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (camerabin, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -63,6 +63,11 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
/* class initialization */
|
||||
#define gst_viewfinder_bin_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstViewfinderBin, gst_viewfinder_bin, GST_TYPE_BIN);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (viewfinderbin, "viewfinderbin",
|
||||
GST_RANK_NONE, gst_viewfinder_bin_get_type (),
|
||||
GST_DEBUG_CATEGORY_INIT (gst_viewfinder_bin_debug, "viewfinderbin", 0,
|
||||
"ViewFinderBin");
|
||||
);
|
||||
|
||||
static void gst_viewfinder_bin_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * spec);
|
||||
|
@ -358,12 +363,3 @@ gst_viewfinder_bin_get_property (GObject * object, guint prop_id,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_viewfinder_bin_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_viewfinder_bin_debug, "viewfinderbin", 0,
|
||||
"ViewFinderBin");
|
||||
return gst_element_register (plugin, "viewfinderbin", GST_RANK_NONE,
|
||||
gst_viewfinder_bin_get_type ());
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ struct _GstViewfinderBinClass
|
|||
};
|
||||
|
||||
GType gst_viewfinder_bin_get_type (void);
|
||||
gboolean gst_viewfinder_bin_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (viewfinderbin);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ GST_DEBUG_CATEGORY (wrapper_camera_bin_src_debug);
|
|||
#define gst_wrapper_camera_bin_src_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstWrapperCameraBinSrc, gst_wrapper_camera_bin_src,
|
||||
GST_TYPE_BASE_CAMERA_SRC);
|
||||
GST_ELEMENT_REGISTER_DEFINE (wrappercamerabinsrc, "wrappercamerabinsrc",
|
||||
GST_RANK_NONE, gst_wrapper_camera_bin_src_get_type ());
|
||||
|
||||
static GstStaticPadTemplate vfsrc_template =
|
||||
GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME,
|
||||
|
@ -1169,10 +1171,3 @@ gst_wrapper_camera_bin_src_init (GstWrapperCameraBinSrc * self)
|
|||
self->mode = GST_BASE_CAMERA_SRC_CAST (self)->mode;
|
||||
self->app_vid_filter = NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_wrapper_camera_bin_src_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "wrappercamerabinsrc", GST_RANK_NONE,
|
||||
gst_wrapper_camera_bin_src_get_type ());
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ struct _GstWrapperCameraBinSrcClass
|
|||
GstBaseCameraSrcClass parent;
|
||||
};
|
||||
|
||||
gboolean gst_wrapper_camera_bin_src_plugin_init (GstPlugin * plugin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (wrappercamerabinsrc);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -111,6 +111,8 @@ static void gst_chroma_hold_finalize (GObject * object);
|
|||
|
||||
#define gst_chroma_hold_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstChromaHold, gst_chroma_hold, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (chromahold, "chromahold",
|
||||
GST_RANK_NONE, gst_chroma_hold_get_type ());
|
||||
|
||||
static void
|
||||
gst_chroma_hold_class_init (GstChromaHoldClass * klass)
|
||||
|
|
|
@ -74,6 +74,7 @@ struct _GstChromaHoldClass
|
|||
};
|
||||
|
||||
GType gst_chroma_hold_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (chromahold);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_CHROMA_HOLD_H__ */
|
||||
|
|
|
@ -51,6 +51,8 @@ enum
|
|||
|
||||
#define gst_color_effects_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstColorEffects, gst_color_effects, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (coloreffects, "coloreffects",
|
||||
GST_RANK_NONE, gst_color_effects_get_type ());
|
||||
|
||||
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ " \
|
||||
"ARGB, BGRA, ABGR, RGBA, xRGB, BGRx, xBGR, RGBx, RGB, BGR, AYUV }")
|
||||
|
|
|
@ -87,6 +87,7 @@ struct _GstColorEffectsClass
|
|||
};
|
||||
|
||||
GType gst_color_effects_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (coloreffects);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_COLOR_EFFECTS_H__ */
|
||||
|
|
|
@ -26,31 +26,16 @@
|
|||
#include "gstcoloreffects.h"
|
||||
#include "gstchromahold.h"
|
||||
|
||||
struct _elements_entry
|
||||
{
|
||||
const gchar *name;
|
||||
GType (*type) (void);
|
||||
};
|
||||
|
||||
static const struct _elements_entry _elements[] = {
|
||||
{"coloreffects", gst_color_effects_get_type},
|
||||
{"chromahold", gst_chroma_hold_get_type},
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gint i = 0;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
while (_elements[i].name) {
|
||||
if (!gst_element_register (plugin, _elements[i].name,
|
||||
GST_RANK_NONE, (_elements[i].type) ()))
|
||||
return FALSE;
|
||||
i++;
|
||||
}
|
||||
ret |= GST_ELEMENT_REGISTER (coloreffects, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (chromahold, plugin);
|
||||
|
||||
return TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -23,45 +23,27 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
GType gst_checksum_sink_get_type (void);
|
||||
GType fps_display_sink_get_type (void);
|
||||
GType gst_chop_my_data_get_type (void);
|
||||
GType gst_compare_get_type (void);
|
||||
GType gst_debug_spy_get_type (void);
|
||||
GType gst_error_ignore_get_type (void);
|
||||
GType gst_watchdog_get_type (void);
|
||||
GType gst_fake_audio_sink_get_type (void);
|
||||
GType gst_fake_video_sink_get_type (void);
|
||||
GType gst_test_src_bin_get_type (void);
|
||||
GType gst_clock_select_get_type (void);
|
||||
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gst_element_register (plugin, "checksumsink", GST_RANK_NONE,
|
||||
gst_checksum_sink_get_type ());
|
||||
gst_element_register (plugin, "fpsdisplaysink", GST_RANK_NONE,
|
||||
fps_display_sink_get_type ());
|
||||
gst_element_register (plugin, "chopmydata", GST_RANK_NONE,
|
||||
gst_chop_my_data_get_type ());
|
||||
gst_element_register (plugin, "compare", GST_RANK_NONE,
|
||||
gst_compare_get_type ());
|
||||
gst_element_register (plugin, "debugspy", GST_RANK_NONE,
|
||||
gst_debug_spy_get_type ());
|
||||
gst_element_register (plugin, "watchdog", GST_RANK_NONE,
|
||||
gst_watchdog_get_type ());
|
||||
gst_element_register (plugin, "errorignore", GST_RANK_NONE,
|
||||
gst_error_ignore_get_type ());
|
||||
gst_element_register (plugin, "fakeaudiosink", GST_RANK_NONE,
|
||||
gst_fake_audio_sink_get_type ());
|
||||
gst_element_register (plugin, "fakevideosink", GST_RANK_NONE,
|
||||
gst_fake_video_sink_get_type ());
|
||||
gst_element_register (plugin, "testsrcbin", GST_RANK_NONE,
|
||||
gst_test_src_bin_get_type ());
|
||||
gst_element_register (plugin, "clockselect", GST_RANK_NONE,
|
||||
gst_clock_select_get_type ());
|
||||
gboolean ret = FALSE;
|
||||
|
||||
return TRUE;
|
||||
ret |= GST_ELEMENT_REGISTER (checksumsink, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (fpsdisplaysink, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (chopmydata, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (compare, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (debugspy, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (watchdog, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (errorignore, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (fakevideosink, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (fakeaudiosink, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (testsrcbin, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (clockselect, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "fpsdisplaysink.h"
|
||||
|
||||
#define DEFAULT_SIGNAL_FPS_MEASUREMENTS FALSE
|
||||
|
@ -723,3 +724,6 @@ fps_display_sink_get_type (void)
|
|||
|
||||
return fps_display_sink_type;
|
||||
}
|
||||
|
||||
GST_ELEMENT_REGISTER_DEFINE (fpsdisplaysink, "fpsdisplaysink",
|
||||
GST_RANK_NONE, fps_display_sink_get_type ());
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstbasesink.h>
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gstchecksumsink.h"
|
||||
|
||||
static void gst_checksum_sink_set_property (GObject * object, guint prop_id,
|
||||
|
@ -73,6 +74,8 @@ gst_checksum_sink_hash_get_type (void)
|
|||
|
||||
#define gst_checksum_sink_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstChecksumSink, gst_checksum_sink, GST_TYPE_BASE_SINK);
|
||||
GST_ELEMENT_REGISTER_DEFINE (checksumsink, "checksumsink",
|
||||
GST_RANK_NONE, gst_checksum_sink_get_type ());
|
||||
|
||||
static void
|
||||
gst_checksum_sink_class_init (GstChecksumSinkClass * klass)
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/gst.h>
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gstchopmydata.h"
|
||||
|
||||
/* prototypes */
|
||||
|
@ -95,6 +96,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
#define gst_chop_my_data_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstChopMyData, gst_chop_my_data, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE (chopmydata, "chopmydata",
|
||||
GST_RANK_NONE, gst_chop_my_data_get_type ());
|
||||
|
||||
static void
|
||||
gst_chop_my_data_class_init (GstChopMyDataClass * klass)
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/net/net.h>
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gstclockselect.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_clock_select_debug_category);
|
||||
|
@ -94,6 +95,8 @@ enum
|
|||
G_DEFINE_TYPE_WITH_CODE (GstClockSelect, gst_clock_select, GST_TYPE_PIPELINE,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_clock_select_debug_category, "clockselect", 0,
|
||||
"debug category for clockselect element"));
|
||||
GST_ELEMENT_REGISTER_DEFINE (clockselect, "clockselect",
|
||||
GST_RANK_NONE, gst_clock_select_get_type ());
|
||||
|
||||
static void
|
||||
gst_clock_select_class_init (GstClockSelectClass * klass)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <gst/base/gstcollectpads.h>
|
||||
#include <gst/video/video.h>
|
||||
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gstcompare.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (compare_debug);
|
||||
|
@ -117,6 +118,8 @@ static GstStateChangeReturn gst_compare_change_state (GstElement * element,
|
|||
|
||||
#define gst_compare_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstCompare, gst_compare, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE (compare, "compare",
|
||||
GST_RANK_NONE, gst_compare_get_type ());
|
||||
|
||||
static void
|
||||
gst_compare_finalize (GObject * object)
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gstdebugspy.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_debug_spy_debug);
|
||||
|
@ -96,6 +97,8 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
);
|
||||
|
||||
G_DEFINE_TYPE (GstDebugSpy, gst_debug_spy, GST_TYPE_BASE_TRANSFORM);
|
||||
GST_ELEMENT_REGISTER_DEFINE (debugspy, "debugspy",
|
||||
GST_RANK_NONE, gst_debug_spy_get_type ());
|
||||
|
||||
static void gst_debug_spy_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
|
43
gst/debugutils/gstdebugutilsbadelements.h
Normal file
43
gst/debugutils/gstdebugutilsbadelements.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
/* 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_DEBUGUTILSBAD_ELEMENT_H__
|
||||
#define __GST_DEBUGUTILSBAD_ELEMENT_H__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (fpsdisplaysink);
|
||||
GST_ELEMENT_REGISTER_DECLARE (checksumsink);
|
||||
GST_ELEMENT_REGISTER_DECLARE (chopmydata);
|
||||
GST_ELEMENT_REGISTER_DECLARE (clockselect);
|
||||
GST_ELEMENT_REGISTER_DECLARE (compare);
|
||||
GST_ELEMENT_REGISTER_DECLARE (debugspy);
|
||||
GST_ELEMENT_REGISTER_DECLARE (testsrcbin);
|
||||
GST_ELEMENT_REGISTER_DECLARE (errorignore);
|
||||
GST_ELEMENT_REGISTER_DECLARE (fakevideosink);
|
||||
GST_ELEMENT_REGISTER_DECLARE (fakeaudiosink);
|
||||
GST_ELEMENT_REGISTER_DECLARE (watchdog);
|
||||
|
||||
|
||||
#endif /* __GST_DEBUGUTILSBAD_PLUGIN_H__ */
|
|
@ -38,6 +38,7 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gsterrorignore.h"
|
||||
|
||||
#define GST_CAT_DEFAULT gst_error_ignore_debug
|
||||
|
@ -69,6 +70,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
#define parent_class gst_error_ignore_parent_class
|
||||
G_DEFINE_TYPE (GstErrorIgnore, gst_error_ignore, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE (errorignore, "errorignore",
|
||||
GST_RANK_NONE, gst_error_ignore_get_type ());
|
||||
|
||||
static GstFlowReturn gst_error_ignore_sink_chain (GstPad * pad,
|
||||
GstObject * parent, GstBuffer * inbuf);
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
* Since: 1.20
|
||||
*/
|
||||
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gstfakeaudiosink.h"
|
||||
|
||||
#include <gst/audio/audio.h>
|
||||
|
@ -57,6 +58,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
|
||||
G_DEFINE_TYPE_WITH_CODE (GstFakeAudioSink, gst_fake_audio_sink, GST_TYPE_BIN,
|
||||
G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL););
|
||||
GST_ELEMENT_REGISTER_DEFINE (fakeaudiosink, "fakeaudiosink",
|
||||
GST_RANK_NONE, gst_fake_audio_sink_get_type ());
|
||||
|
||||
/* TODO complete the types and make this an utility */
|
||||
static void
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
* Since 1.14
|
||||
*/
|
||||
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gstfakevideosink.h"
|
||||
|
||||
#include <gst/video/video.h>
|
||||
|
@ -84,6 +85,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
GST_VIDEO_FORMATS_ALL)));
|
||||
|
||||
G_DEFINE_TYPE (GstFakeVideoSink, gst_fake_video_sink, GST_TYPE_BIN);
|
||||
GST_ELEMENT_REGISTER_DEFINE (fakevideosink, "fakevideosink",
|
||||
GST_RANK_NONE, gst_fake_video_sink_get_type ());
|
||||
|
||||
static gboolean
|
||||
gst_fake_video_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/base/gstflowcombiner.h>
|
||||
#include <gst/app/gstappsink.h>
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
|
||||
static GstStaticPadTemplate video_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("video_src_%u",
|
||||
|
@ -377,6 +378,9 @@ G_DEFINE_TYPE_WITH_CODE (GstTestSrcBin, gst_test_src_bin, GST_TYPE_BIN,
|
|||
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_test_src_bin_uri_handler_init))
|
||||
/* *INDENT-ON* */
|
||||
|
||||
GST_ELEMENT_REGISTER_DEFINE (testsrcbin, "testsrcbin",
|
||||
GST_RANK_NONE, gst_test_src_bin_get_type ());
|
||||
|
||||
static void
|
||||
gst_test_src_bin_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstbasetransform.h>
|
||||
#include "gstdebugutilsbadelements.h"
|
||||
#include "gstwatchdog.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_watchdog_debug_category);
|
||||
|
@ -83,6 +84,8 @@ enum
|
|||
G_DEFINE_TYPE_WITH_CODE (GstWatchdog, gst_watchdog, GST_TYPE_BASE_TRANSFORM,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_watchdog_debug_category, "watchdog", 0,
|
||||
"debug category for watchdog element"));
|
||||
GST_ELEMENT_REGISTER_DEFINE (watchdog, "watchdog", GST_RANK_NONE,
|
||||
gst_watchdog_get_type ());
|
||||
|
||||
static void
|
||||
gst_watchdog_class_init (GstWatchdogClass * klass)
|
||||
|
|
|
@ -51,6 +51,10 @@ enum
|
|||
|
||||
#define gst_dvb_sub_enc_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstDvbSubEnc, gst_dvb_sub_enc, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dvbsubenc, "dvbsubenc", GST_RANK_NONE,
|
||||
GST_TYPE_DVB_SUB_ENC, GST_DEBUG_CATEGORY_INIT (gst_dvb_sub_enc_debug,
|
||||
"dvbsubenc", 0, "DVB subtitle encoder");
|
||||
);
|
||||
|
||||
static void gst_dvb_sub_enc_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec);
|
||||
|
@ -591,15 +595,7 @@ gst_dvb_sub_enc_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
if (!gst_element_register (plugin, "dvbsubenc", GST_RANK_NONE,
|
||||
GST_TYPE_DVB_SUB_ENC)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (gst_dvb_sub_enc_debug, "dvbsubenc", 0,
|
||||
"DVB subtitle encoder");
|
||||
|
||||
return TRUE;
|
||||
return GST_ELEMENT_REGISTER (dvbsubenc, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -64,6 +64,7 @@ struct _GstDvbSubEncClass
|
|||
};
|
||||
|
||||
GType gst_dvb_sub_enc_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (dvbsubenc);
|
||||
|
||||
gboolean gst_dvbsubenc_ayuv_to_ayuv8p (GstVideoFrame * src, GstVideoFrame * dest, int max_colours, guint32 *out_num_colours);
|
||||
|
||||
|
|
|
@ -107,6 +107,11 @@ static GstStateChangeReturn gst_dvbsub_overlay_change_state (GstElement *
|
|||
|
||||
#define gst_dvbsub_overlay_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstDVBSubOverlay, gst_dvbsub_overlay, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dvbsuboverlay, "dvbsuboverlay",
|
||||
GST_RANK_PRIMARY, GST_TYPE_DVBSUB_OVERLAY,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_dvbsub_overlay_debug, "dvbsuboverlay", 0,
|
||||
"DVB subtitle overlay");
|
||||
);
|
||||
|
||||
static GstCaps *gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay *
|
||||
render, GstPad * pad, GstCaps * filter);
|
||||
|
@ -1303,11 +1308,7 @@ gst_dvbsub_overlay_event_text (GstPad * pad, GstObject * parent,
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_dvbsub_overlay_debug, "dvbsuboverlay",
|
||||
0, "DVB subtitle overlay");
|
||||
|
||||
return gst_element_register (plugin, "dvbsuboverlay",
|
||||
GST_RANK_PRIMARY, GST_TYPE_DVBSUB_OVERLAY);
|
||||
return GST_ELEMENT_REGISTER (dvbsuboverlay, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -76,6 +76,7 @@ struct _GstDVBSubOverlayClass
|
|||
};
|
||||
|
||||
GType gst_dvbsub_overlay_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (dvbsuboverlay);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -75,8 +75,11 @@ static GstStaticPadTemplate subpic_sink_factory =
|
|||
GST_STATIC_CAPS ("subpicture/x-dvd; subpicture/x-pgs")
|
||||
);
|
||||
|
||||
static gboolean dvd_spu_element_init (GstPlugin * plugin);
|
||||
|
||||
#define gst_dvd_spu_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstDVDSpu, gst_dvd_spu, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (dvdspu, dvd_spu_element_init);
|
||||
|
||||
static void gst_dvd_spu_dispose (GObject * object);
|
||||
static void gst_dvd_spu_finalize (GObject * object);
|
||||
|
@ -1238,7 +1241,7 @@ gst_dvd_spu_change_state (GstElement * element, GstStateChange transition)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_dvd_spu_plugin_init (GstPlugin * plugin)
|
||||
dvd_spu_element_init (GstPlugin * plugin)
|
||||
{
|
||||
const gchar *env;
|
||||
|
||||
|
@ -1260,6 +1263,12 @@ gst_dvd_spu_plugin_init (GstPlugin * plugin)
|
|||
GST_RANK_PRIMARY, GST_TYPE_DVD_SPU);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_dvd_spu_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return GST_ELEMENT_REGISTER (dvdspu, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
dvdspu,
|
||||
|
|
|
@ -123,6 +123,7 @@ struct _GstDVDSpuClass {
|
|||
};
|
||||
|
||||
GType gst_dvd_spu_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (dvdspu);
|
||||
|
||||
typedef enum {
|
||||
GST_DVD_SPU_DEBUG_RENDER_RECTANGLE = (1 << 0),
|
||||
|
|
|
@ -89,6 +89,11 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
#define gst_face_overlay_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstFaceOverlay, gst_face_overlay, GST_TYPE_BIN);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (faceoverlay, "faceoverlay",
|
||||
GST_RANK_NONE, GST_TYPE_FACEOVERLAY,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_face_overlay_debug, "faceoverlay", 0,
|
||||
"SVG Face Overlay");
|
||||
);
|
||||
|
||||
static void gst_face_overlay_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
@ -430,13 +435,9 @@ gst_face_overlay_get_property (GObject * object, guint prop_id,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
faceoverlay_init (GstPlugin * faceoverlay)
|
||||
faceoverlay_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_face_overlay_debug, "faceoverlay",
|
||||
0, "SVG Face Overlay");
|
||||
|
||||
return gst_element_register (faceoverlay, "faceoverlay", GST_RANK_NONE,
|
||||
GST_TYPE_FACEOVERLAY);
|
||||
return GST_ELEMENT_REGISTER (faceoverlay, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -88,6 +88,7 @@ struct _GstFaceOverlayClass
|
|||
};
|
||||
|
||||
GType gst_face_overlay_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (faceoverlay);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -150,9 +150,14 @@ enum
|
|||
|
||||
/*static guint gst_festival_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
G_DEFINE_TYPE (GstFestival, gst_festival, GST_TYPE_ELEMENT)
|
||||
G_DEFINE_TYPE (GstFestival, gst_festival, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (festival, "festival", GST_RANK_NONE,
|
||||
GST_TYPE_FESTIVAL, GST_DEBUG_CATEGORY_INIT (festival_debug, "festival",
|
||||
0, "Festival text-to-speech synthesizer");
|
||||
);;
|
||||
|
||||
static void gst_festival_class_init (GstFestivalClass * klass)
|
||||
static void
|
||||
gst_festival_class_init (GstFestivalClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
|
@ -524,14 +529,7 @@ gst_festival_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (festival_debug, "festival",
|
||||
0, "Festival text-to-speech synthesizer");
|
||||
|
||||
if (!gst_element_register (plugin, "festival", GST_RANK_NONE,
|
||||
GST_TYPE_FESTIVAL))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return GST_ELEMENT_REGISTER (festival, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -116,6 +116,7 @@ struct _GstFestivalClass {
|
|||
};
|
||||
|
||||
GType gst_festival_get_type(void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (festival);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -108,6 +108,12 @@ GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
|||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{YUY2,UYVY,Y42B,I420,YV12}")));
|
||||
|
||||
G_DEFINE_TYPE (GstFieldAnalysis, gst_field_analysis, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (fieldanalysis, "fieldanalysis",
|
||||
GST_RANK_NONE, GST_TYPE_FIELDANALYSIS,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_field_analysis_debug, "fieldanalysis", 0,
|
||||
"Video field analysis");
|
||||
);
|
||||
|
||||
#define parent_class gst_field_analysis_parent_class
|
||||
|
||||
static void gst_field_analysis_set_property (GObject * object, guint prop_id,
|
||||
|
@ -1840,13 +1846,9 @@ gst_field_analysis_finalize (GObject * object)
|
|||
|
||||
|
||||
static gboolean
|
||||
fieldanalysis_init (GstPlugin * fieldanalysis)
|
||||
fieldanalysis_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_field_analysis_debug, "fieldanalysis",
|
||||
0, "Video field analysis");
|
||||
|
||||
return gst_element_register (fieldanalysis, "fieldanalysis", GST_RANK_NONE,
|
||||
GST_TYPE_FIELDANALYSIS);
|
||||
return GST_ELEMENT_REGISTER (fieldanalysis, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -143,6 +143,7 @@ struct _GstFieldAnalysisClass
|
|||
};
|
||||
|
||||
GType gst_field_analysis_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (fieldanalysis);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_FIELDANALYSIS_H__ */
|
||||
|
|
|
@ -347,6 +347,8 @@ struct _GstFreeverbPrivate
|
|||
G_DEFINE_TYPE_WITH_CODE (GstFreeverb, gst_freeverb, GST_TYPE_BASE_TRANSFORM,
|
||||
G_ADD_PRIVATE (GstFreeverb)
|
||||
G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL));
|
||||
GST_ELEMENT_REGISTER_DEFINE (freeverb, "freeverb",
|
||||
GST_RANK_NONE, GST_TYPE_FREEVERB);
|
||||
|
||||
static void
|
||||
freeverb_revmodel_init (GstFreeverb * filter)
|
||||
|
@ -928,8 +930,7 @@ gst_freeverb_transform (GstBaseTransform * base, GstBuffer * inbuf,
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "freeverb",
|
||||
GST_RANK_NONE, GST_TYPE_FREEVERB);
|
||||
return GST_ELEMENT_REGISTER (freeverb, plugin);
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -62,6 +62,7 @@ struct _GstFreeverbClass {
|
|||
};
|
||||
|
||||
GType gst_freeverb_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (freeverb);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -64,17 +64,19 @@
|
|||
#include <gst/gst.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "gstburn.h"
|
||||
|
||||
#include "gstgaudieffectsorc.h"
|
||||
|
||||
#define gst_burn_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstBurn, gst_burn, GST_TYPE_VIDEO_FILTER);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_burn_debug);
|
||||
#define GST_CAT_DEFAULT gst_burn_debug
|
||||
|
||||
#define gst_burn_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstBurn, gst_burn, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (burn, "burn", GST_RANK_NONE,
|
||||
GST_TYPE_BURN, GST_DEBUG_CATEGORY_INIT (gst_burn_debug, "burn", 0,
|
||||
"Template burn"));
|
||||
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
|
||||
#else
|
||||
|
@ -246,14 +248,3 @@ gst_burn_transform_frame (GstVideoFilter * vfilter,
|
|||
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
/* Entry point to initialize the plug-in.
|
||||
* Register the element factories and other features. */
|
||||
gboolean
|
||||
gst_burn_plugin_init (GstPlugin * burn)
|
||||
{
|
||||
/* debug category for fltering log messages */
|
||||
GST_DEBUG_CATEGORY_INIT (gst_burn_debug, "burn", 0, "Template burn");
|
||||
|
||||
return gst_element_register (burn, "burn", GST_RANK_NONE, GST_TYPE_BURN);
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ struct _GstBurnClass
|
|||
};
|
||||
|
||||
GType gst_burn_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (burn);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -64,15 +64,17 @@
|
|||
#include <math.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "gstchromium.h"
|
||||
|
||||
#define gst_chromium_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstChromium, gst_chromium, GST_TYPE_VIDEO_FILTER);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_chromium_debug);
|
||||
#define GST_CAT_DEFAULT gst_chromium_debug
|
||||
|
||||
#define gst_chromium_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstChromium, gst_chromium, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (chromium, "chromium", GST_RANK_NONE,
|
||||
GST_TYPE_CHROMIUM, GST_DEBUG_CATEGORY_INIT (gst_chromium_debug, "chromium",
|
||||
0, "Template chromium"));
|
||||
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
|
||||
#else
|
||||
|
@ -275,19 +277,6 @@ gst_chromium_transform_frame (GstVideoFilter * vfilter,
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
/* Entry point to initialize the plug-in.
|
||||
* Register the element factories and other features. */
|
||||
gboolean
|
||||
gst_chromium_plugin_init (GstPlugin * chromium)
|
||||
{
|
||||
/* debug category for fltering log messages */
|
||||
GST_DEBUG_CATEGORY_INIT (gst_chromium_debug, "chromium", 0,
|
||||
"Template chromium");
|
||||
|
||||
return gst_element_register (chromium, "chromium", GST_RANK_NONE,
|
||||
GST_TYPE_CHROMIUM);
|
||||
}
|
||||
|
||||
/*** Now the image processing work.... ***/
|
||||
/* Set up the cosine table. */
|
||||
void
|
||||
|
|
|
@ -79,6 +79,7 @@ struct _GstChromiumClass
|
|||
};
|
||||
|
||||
GType gst_chromium_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (chromium);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#include <gst/gst.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "gstdilate.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_dilate_debug);
|
||||
|
@ -78,6 +77,9 @@ GST_DEBUG_CATEGORY_STATIC (gst_dilate_debug);
|
|||
|
||||
#define gst_dilate_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstDilate, gst_dilate, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dilate, "dilate", GST_RANK_NONE,
|
||||
GST_TYPE_DILATE, GST_DEBUG_CATEGORY_INIT (gst_dilate_debug, "dilate", 0,
|
||||
"Template dilate"));
|
||||
|
||||
/* Filter signals and args. */
|
||||
enum
|
||||
|
@ -250,18 +252,6 @@ gst_dilate_transform_frame (GstVideoFilter * vfilter,
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
/* Entry point to initialize the plug-in.
|
||||
* Register the element factories and other features. */
|
||||
gboolean
|
||||
gst_dilate_plugin_init (GstPlugin * dilate)
|
||||
{
|
||||
/* debug category for fltering log messages */
|
||||
GST_DEBUG_CATEGORY_INIT (gst_dilate_debug, "dilate", 0, "Template dilate");
|
||||
|
||||
return gst_element_register (dilate, "dilate", GST_RANK_NONE,
|
||||
GST_TYPE_DILATE);
|
||||
}
|
||||
|
||||
/*** Now the image processing work.... ***/
|
||||
|
||||
/* Return luminance of the color */
|
||||
|
|
|
@ -81,6 +81,7 @@ struct _GstDilateClass
|
|||
};
|
||||
|
||||
GType gst_dilate_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (dilate);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#include <gst/gst.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "gstdodge.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_dodge_debug);
|
||||
|
@ -78,6 +77,9 @@ GST_DEBUG_CATEGORY_STATIC (gst_dodge_debug);
|
|||
|
||||
#define gst_dodge_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstDodge, gst_dodge, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dodge, "dodge", GST_RANK_NONE,
|
||||
GST_TYPE_DODGE, GST_DEBUG_CATEGORY_INIT (gst_dodge_debug, "dodge", 0,
|
||||
"Template dodge"));
|
||||
|
||||
/* Filter signals and args. */
|
||||
enum
|
||||
|
@ -223,17 +225,6 @@ gst_dodge_transform_frame (GstVideoFilter * vfilter,
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
/* Entry point to initialize the plug-in.
|
||||
* Register the element factories and other features. */
|
||||
gboolean
|
||||
gst_dodge_plugin_init (GstPlugin * dodge)
|
||||
{
|
||||
/* debug category for fltering log messages */
|
||||
GST_DEBUG_CATEGORY_INIT (gst_dodge_debug, "dodge", 0, "Template dodge");
|
||||
|
||||
return gst_element_register (dodge, "dodge", GST_RANK_NONE, GST_TYPE_DODGE);
|
||||
}
|
||||
|
||||
/*** Now the image processing work.... ***/
|
||||
|
||||
/* Transform processes each frame. */
|
||||
|
|
|
@ -78,6 +78,7 @@ struct _GstDodgeClass
|
|||
};
|
||||
|
||||
GType gst_dodge_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (dodge);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#include <gst/gst.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "gstexclusion.h"
|
||||
|
||||
#include <gst/video/video.h>
|
||||
|
@ -115,6 +114,9 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
#define gst_exclusion_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstExclusion, gst_exclusion, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (exclusion, "exclusion", GST_RANK_NONE,
|
||||
GST_TYPE_EXCLUSION, GST_DEBUG_CATEGORY_INIT (gst_exclusion_debug,
|
||||
"exclusion", 0, "Template exclusion"));
|
||||
|
||||
static void gst_exclusion_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
@ -248,19 +250,6 @@ gst_exclusion_transform_frame (GstVideoFilter * vfilter,
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
/* Entry point to initialize the plug-in.
|
||||
* Register the element factories and other features. */
|
||||
gboolean
|
||||
gst_exclusion_plugin_init (GstPlugin * exclusion)
|
||||
{
|
||||
/* debug category for fltering log messages */
|
||||
GST_DEBUG_CATEGORY_INIT (gst_exclusion_debug, "exclusion",
|
||||
0, "Template exclusion");
|
||||
|
||||
return gst_element_register (exclusion, "exclusion", GST_RANK_NONE,
|
||||
GST_TYPE_EXCLUSION);
|
||||
}
|
||||
|
||||
/*** Now the image processing work.... ***/
|
||||
|
||||
/* Transform processes each frame. */
|
||||
|
|
|
@ -81,6 +81,7 @@ struct _GstExclusionClass
|
|||
};
|
||||
|
||||
GType gst_exclusion_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (exclusion);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
#include <math.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "gstgaussblur.h"
|
||||
|
||||
static void gst_gaussianblur_finalize (GObject * object);
|
||||
|
@ -120,7 +119,10 @@ static void gaussian_smooth (GstGaussianBlur * gb, guint8 * image,
|
|||
|
||||
#define gst_gaussianblur_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstGaussianBlur, gst_gaussianblur, GST_TYPE_VIDEO_FILTER);
|
||||
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (gaussianblur, "gaussianblur",
|
||||
GST_RANK_NONE, GST_TYPE_GAUSSIANBLUR,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_gauss_blur_debug, "gaussianblur", 0,
|
||||
"Gaussian Blur video effect"));
|
||||
#define DEFAULT_SIGMA 1.2
|
||||
|
||||
/* Initialize the gaussianblur's class. */
|
||||
|
@ -452,15 +454,3 @@ gst_gaussianblur_get_property (GObject * object,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Register the element factories and other features. */
|
||||
gboolean
|
||||
gst_gauss_blur_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
/* debug category for fltering log messages */
|
||||
GST_DEBUG_CATEGORY_INIT (gst_gauss_blur_debug, "gaussianblur",
|
||||
0, "Gaussian Blur video effect");
|
||||
|
||||
return gst_element_register (plugin, "gaussianblur", GST_RANK_NONE,
|
||||
GST_TYPE_GAUSSIANBLUR);
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ struct _GstGaussianBlurClass
|
|||
};
|
||||
|
||||
GType gst_gaussianblur_get_type(void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (gaussianblur);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -49,7 +49,14 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "gstburn.h"
|
||||
#include "gstchromium.h"
|
||||
#include "gstdilate.h"
|
||||
#include "gstdodge.h"
|
||||
#include "gstexclusion.h"
|
||||
#include "gstgaussblur.h"
|
||||
#include "gstsolarize.h"
|
||||
|
||||
|
||||
/* PACKAGE: this is usually set by autotools depending on some _INIT macro
|
||||
* in configure.ac and then written into and defined in config.h, but we can
|
||||
|
@ -63,15 +70,15 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gboolean ret = TRUE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret &= gst_burn_plugin_init (plugin);
|
||||
ret &= gst_chromium_plugin_init (plugin);
|
||||
ret &= gst_dilate_plugin_init (plugin);
|
||||
ret &= gst_dodge_plugin_init (plugin);
|
||||
ret &= gst_exclusion_plugin_init (plugin);
|
||||
ret &= gst_solarize_plugin_init (plugin);
|
||||
ret &= gst_gauss_blur_plugin_init (plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (burn, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (chromium, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (dilate, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (dodge, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (exclusion, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (solarize, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (gaussianblur, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
|
||||
* Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
* Copyright (C) 2010 Luis de Bethencourt <luis@debethencourt.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the
|
||||
* GNU Lesser General Public License Version 2.1 (the "LGPL"), in
|
||||
* which case the following provisions apply instead of the ones
|
||||
* mentioned above:
|
||||
*
|
||||
* 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_GAUDI_EFFECTS_H__
|
||||
#define __GST_GAUDI_EFFECTS_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gboolean gst_burn_plugin_init (GstPlugin *plugin);
|
||||
gboolean gst_chromium_plugin_init (GstPlugin *plugin);
|
||||
gboolean gst_dilate_plugin_init (GstPlugin *plugin);
|
||||
gboolean gst_dodge_plugin_init (GstPlugin *plugin);
|
||||
gboolean gst_exclusion_plugin_init (GstPlugin *plugin);
|
||||
gboolean gst_gauss_blur_plugin_init (GstPlugin *plugin);
|
||||
gboolean gst_solarize_plugin_init (GstPlugin *plugin);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_GAUDI_EFFECTS_H__ */
|
|
@ -64,7 +64,6 @@
|
|||
#include <gst/gst.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "gstsolarize.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_solarize_debug);
|
||||
|
@ -117,6 +116,9 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
#define gst_solarize_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstSolarize, gst_solarize, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (solarize, "solarize", GST_RANK_NONE,
|
||||
GST_TYPE_SOLARIZE, GST_DEBUG_CATEGORY_INIT (gst_solarize_debug, "solarize",
|
||||
0, "Template solarize"));
|
||||
|
||||
static void gst_solarize_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
@ -278,19 +280,6 @@ gst_solarize_transform_frame (GstVideoFilter * vfilter,
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
/* Entry point to initialize the plug-in.
|
||||
* Register the element factories and other features. */
|
||||
gboolean
|
||||
gst_solarize_plugin_init (GstPlugin * solarize)
|
||||
{
|
||||
/* debug category for fltering log messages */
|
||||
GST_DEBUG_CATEGORY_INIT (gst_solarize_debug, "solarize",
|
||||
0, "Template solarize");
|
||||
|
||||
return gst_element_register (solarize, "solarize", GST_RANK_NONE,
|
||||
GST_TYPE_SOLARIZE);
|
||||
}
|
||||
|
||||
/*** Now the image processing work.... ***/
|
||||
|
||||
/* Transform processes each frame. */
|
||||
|
|
|
@ -81,6 +81,7 @@ struct _GstSolarizeClass
|
|||
};
|
||||
|
||||
GType gst_solarize_get_type (void);
|
||||
GST_ELEMENT_REGISTER_DECLARE (solarize);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -23,21 +23,17 @@
|
|||
|
||||
#include "dataprotocol.h"
|
||||
|
||||
#include "gstgdppay.h"
|
||||
#include "gstgdpdepay.h"
|
||||
#include "gstgdpelements.h"
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gst_dp_init ();
|
||||
gboolean ret = FALSE;
|
||||
|
||||
if (!gst_gdp_depay_plugin_init (plugin))
|
||||
return FALSE;
|
||||
ret |= GST_ELEMENT_REGISTER (gdpdepay, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (gdppay, plugin);
|
||||
|
||||
if (!gst_gdp_pay_plugin_init (plugin))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue