gs: 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/2115>
This commit is contained in:
Stéphane Cerveau 2021-03-26 11:41:50 +01:00 committed by GStreamer Marge Bot
parent 5bcfb2dda0
commit d73ed3891a
5 changed files with 9 additions and 7 deletions

View file

@ -34,18 +34,15 @@
#include "gstgssink.h"
#include "gstgssrc.h"
GST_DEBUG_CATEGORY (gst_gs_src_debug);
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "gssrc", GST_RANK_NONE, GST_TYPE_GS_SRC))
return FALSE;
gboolean ret = FALSE;
if (!gst_element_register (plugin, "gssink", GST_RANK_NONE, GST_TYPE_GS_SINK))
return FALSE;
ret |= GST_ELEMENT_REGISTER (gssrc, plugin);
ret |= GST_ELEMENT_REGISTER (gssink, plugin);
return TRUE;
return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -168,6 +168,7 @@ static GType gst_gs_sink_next_get_type(void) {
#define gst_gs_sink_parent_class parent_class
G_DEFINE_TYPE(GstGsSink, gst_gs_sink, GST_TYPE_BASE_SINK);
GST_ELEMENT_REGISTER_DEFINE (gssink, "gssink", GST_RANK_NONE, GST_TYPE_GS_SINK)
class GSWriteStream {
public:

View file

@ -43,5 +43,7 @@ typedef enum {
GST_GS_SINK_NEXT_NONE,
} GstGsSinkNext;
GST_ELEMENT_REGISTER_DECLARE (gssink);
G_END_DECLS
#endif // __GST_GS_SINK_H__

View file

@ -109,6 +109,7 @@ static void gst_gs_src_uri_handler_init(gpointer g_iface, gpointer iface_data);
GST_DEBUG_CATEGORY_INIT(gst_gs_src_debug, "gssrc", 0, "gssrc element");
#define gst_gs_src_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE(GstGsSrc, gst_gs_src, GST_TYPE_BASE_SRC, _do_init);
GST_ELEMENT_REGISTER_DEFINE (gssrc, "gssrc", GST_RANK_NONE, GST_TYPE_GS_SRC)
namespace gcs = google::cloud::storage;

View file

@ -29,6 +29,7 @@ G_BEGIN_DECLS
#define GST_TYPE_GS_SRC (gst_gs_src_get_type())
G_DECLARE_FINAL_TYPE(GstGsSrc, gst_gs_src, GST, GS_SRC, GstBaseSrc)
GST_ELEMENT_REGISTER_DECLARE (gssrc);
G_END_DECLS
#endif // __GST_GS_SRC_H__