mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
dash: 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/2038>
This commit is contained in:
parent
7c1fc06919
commit
8864382897
5 changed files with 32 additions and 20 deletions
|
@ -443,6 +443,8 @@ G_DEFINE_TYPE_WITH_CODE (GstDashDemux, gst_dash_demux, GST_TYPE_ADAPTIVE_DEMUX,
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_dash_demux_debug, "dashdemux", 0,
|
GST_DEBUG_CATEGORY_INIT (gst_dash_demux_debug, "dashdemux", 0,
|
||||||
"dashdemux element")
|
"dashdemux element")
|
||||||
);
|
);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (dashdemux, "dashdemux", GST_RANK_PRIMARY,
|
||||||
|
GST_TYPE_DASH_DEMUX);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dash_demux_dispose (GObject * obj)
|
gst_dash_demux_dispose (GObject * obj)
|
||||||
|
|
|
@ -155,6 +155,8 @@ struct _GstDashDemuxClass
|
||||||
|
|
||||||
GType gst_dash_demux_get_type (void);
|
GType gst_dash_demux_get_type (void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (dashdemux);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_DASH_DEMUX_H__ */
|
#endif /* __GST_DASH_DEMUX_H__ */
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,10 @@ GST_STATIC_PAD_TEMPLATE ("subtitle_%u",
|
||||||
GST_STATIC_CAPS_ANY);
|
GST_STATIC_CAPS_ANY);
|
||||||
|
|
||||||
#define gst_dash_sink_parent_class parent_class
|
#define gst_dash_sink_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstDashSink, gst_dash_sink, GST_TYPE_BIN);
|
G_DEFINE_TYPE_WITH_CODE (GstDashSink, gst_dash_sink, GST_TYPE_BIN,
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_dash_sink_debug, "dashsink", 0, "DashSink"););
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (dashsink, "dashsink", GST_RANK_NONE,
|
||||||
|
gst_dash_sink_get_type ());
|
||||||
|
|
||||||
static void gst_dash_sink_set_property (GObject * object, guint prop_id,
|
static void gst_dash_sink_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * spec);
|
const GValue * value, GParamSpec * spec);
|
||||||
|
@ -981,11 +984,3 @@ gst_dash_sink_get_property (GObject * object, guint prop_id,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_dash_sink_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_dash_sink_debug, "dashsink", 0, "DashSink");
|
|
||||||
return gst_element_register (plugin, "dashsink", GST_RANK_NONE,
|
|
||||||
gst_dash_sink_get_type ());
|
|
||||||
}
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ G_BEGIN_DECLS
|
||||||
#define GST_TYPE_DASH_SINK gst_dash_sink_get_type ()
|
#define GST_TYPE_DASH_SINK gst_dash_sink_get_type ()
|
||||||
G_DECLARE_FINAL_TYPE (GstDashSink, gst_dash_sink, GST, DASH_SINK, GstBin)
|
G_DECLARE_FINAL_TYPE (GstDashSink, gst_dash_sink, GST, DASH_SINK, GstBin)
|
||||||
|
|
||||||
gboolean gst_dash_sink_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (dashsink);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,38 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) <2020> Stéphane Cerveau <scerveau@collabora.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
#include "gstdashdemux.h"
|
#include "gstdashdemux.h"
|
||||||
#include "gstdashsink.h"
|
#include "gstdashsink.h"
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
dash_init (GstPlugin * plugin)
|
dash_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "dashdemux", GST_RANK_PRIMARY,
|
gboolean ret = FALSE;
|
||||||
GST_TYPE_DASH_DEMUX))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!gst_dash_sink_plugin_init (plugin))
|
ret |= GST_ELEMENT_REGISTER (dashdemux, plugin);
|
||||||
return FALSE;
|
ret |= GST_ELEMENT_REGISTER (dashsink, plugin);
|
||||||
|
|
||||||
return TRUE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
Loading…
Reference in a new issue