jack: 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-good/-/merge_requests/876>
This commit is contained in:
Stéphane Cerveau 2021-02-12 09:56:36 +01:00
parent f86147cb6d
commit a633f4b12e
4 changed files with 12 additions and 9 deletions

View file

@ -22,8 +22,6 @@
#endif
#include "gstjack.h"
#include "gstjackaudiosrc.h"
#include "gstjackaudiosink.h"
GType
gst_jack_connect_get_type (void)
@ -100,14 +98,12 @@ gst_jack_client_get_type (void)
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "jackaudiosrc", GST_RANK_PRIMARY,
GST_TYPE_JACK_AUDIO_SRC))
return FALSE;
if (!gst_element_register (plugin, "jackaudiosink", GST_RANK_PRIMARY,
GST_TYPE_JACK_AUDIO_SINK))
return FALSE;
gboolean ret = FALSE;
return TRUE;
ret |= GST_ELEMENT_REGISTER (jackaudiosrc, plugin);
ret |= GST_ELEMENT_REGISTER (jackaudiosink, plugin);
return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -25,6 +25,9 @@
#include <jack/jack.h>
#include <gst/audio/audio.h>
GST_ELEMENT_REGISTER_DECLARE (jackaudiosrc);
GST_ELEMENT_REGISTER_DECLARE (jackaudiosink);
/**
* GstJackConnect:
* @GST_JACK_CONNECT_NONE: Don't automatically connect to physical ports.

View file

@ -700,6 +700,8 @@ enum
#define gst_jack_audio_sink_parent_class parent_class
G_DEFINE_TYPE (GstJackAudioSink, gst_jack_audio_sink, GST_TYPE_AUDIO_BASE_SINK);
GST_ELEMENT_REGISTER_DEFINE (jackaudiosink, "jackaudiosink",
GST_RANK_PRIMARY, GST_TYPE_JACK_AUDIO_SINK);
static void gst_jack_audio_sink_dispose (GObject * object);
static void gst_jack_audio_sink_set_property (GObject * object, guint prop_id,

View file

@ -715,6 +715,8 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
#define gst_jack_audio_src_parent_class parent_class
G_DEFINE_TYPE (GstJackAudioSrc, gst_jack_audio_src, GST_TYPE_AUDIO_BASE_SRC);
GST_ELEMENT_REGISTER_DEFINE (jackaudiosrc, "jackaudiosrc",
GST_RANK_PRIMARY, GST_TYPE_JACK_AUDIO_SRC);
static void gst_jack_audio_src_dispose (GObject * object);
static void gst_jack_audio_src_set_property (GObject * object, guint prop_id,