mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-06 07:28:48 +00:00
dvdread: 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-ugly/-/merge_requests/79>
This commit is contained in:
parent
3a42409898
commit
afa744b218
2 changed files with 11 additions and 7 deletions
|
@ -91,11 +91,13 @@ static gint gst_dvd_read_src_get_sector_from_time (GstDvdReadSrc * src,
|
||||||
|
|
||||||
static void gst_dvd_read_src_uri_handler_init (gpointer g_iface,
|
static void gst_dvd_read_src_uri_handler_init (gpointer g_iface,
|
||||||
gpointer iface_data);
|
gpointer iface_data);
|
||||||
|
static gboolean dvdread_element_init (GstPlugin * plugin);
|
||||||
|
|
||||||
#define gst_dvd_read_src_parent_class parent_class
|
#define gst_dvd_read_src_parent_class parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstDvdReadSrc, gst_dvd_read_src, GST_TYPE_PUSH_SRC,
|
G_DEFINE_TYPE_WITH_CODE (GstDvdReadSrc, gst_dvd_read_src, GST_TYPE_PUSH_SRC,
|
||||||
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER,
|
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER,
|
||||||
gst_dvd_read_src_uri_handler_init));
|
gst_dvd_read_src_uri_handler_init));
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (dvdreadsrc, dvdread_element_init);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dvd_read_src_finalize (GObject * object)
|
gst_dvd_read_src_finalize (GObject * object)
|
||||||
|
@ -1789,7 +1791,7 @@ gst_dvd_read_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
dvdread_element_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (gstgst_dvd_read_src_debug, "dvdreadsrc", 0,
|
GST_DEBUG_CATEGORY_INIT (gstgst_dvd_read_src_debug, "dvdreadsrc", 0,
|
||||||
"DVD reader element based on dvdreadsrc");
|
"DVD reader element based on dvdreadsrc");
|
||||||
|
@ -1800,13 +1802,14 @@ plugin_init (GstPlugin * plugin)
|
||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
#endif /* ENABLE_NLS */
|
#endif /* ENABLE_NLS */
|
||||||
|
return gst_element_register (plugin, "dvdreadsrc", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DVD_READ_SRC);
|
||||||
|
}
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "dvdreadsrc", GST_RANK_NONE,
|
static gboolean
|
||||||
GST_TYPE_DVD_READ_SRC)) {
|
plugin_init (GstPlugin * plugin)
|
||||||
return FALSE;
|
{
|
||||||
}
|
return GST_ELEMENT_REGISTER (dvdreadsrc, plugin);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -95,6 +95,7 @@ struct _GstDvdReadSrcClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_dvd_read_src_get_type (void);
|
GType gst_dvd_read_src_get_type (void);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (dvdreadsrc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue