mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
dvdsub: 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
df2452e8ef
commit
f2a9ea9d7b
4 changed files with 22 additions and 11 deletions
|
@ -26,8 +26,14 @@
|
||||||
#include "gstdvdsubparse.h"
|
#include "gstdvdsubparse.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY_STATIC (gst_dvd_sub_dec_debug);
|
||||||
|
#define GST_CAT_DEFAULT (gst_dvd_sub_dec_debug)
|
||||||
|
|
||||||
#define gst_dvd_sub_dec_parent_class parent_class
|
#define gst_dvd_sub_dec_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstDvdSubDec, gst_dvd_sub_dec, GST_TYPE_ELEMENT);
|
G_DEFINE_TYPE (GstDvdSubDec, gst_dvd_sub_dec, GST_TYPE_ELEMENT);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dvdsubdec, "dvdsubdec", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DVD_SUB_DEC, GST_DEBUG_CATEGORY_INIT (gst_dvd_sub_dec_debug,
|
||||||
|
"dvdsubdec", 0, "DVD subtitle decoder"));
|
||||||
|
|
||||||
static gboolean gst_dvd_sub_dec_src_event (GstPad * srcpad, GstObject * parent,
|
static gboolean gst_dvd_sub_dec_src_event (GstPad * srcpad, GstObject * parent,
|
||||||
GstEvent * event);
|
GstEvent * event);
|
||||||
|
@ -61,8 +67,6 @@ static GstStaticPadTemplate subtitle_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_STATIC_CAPS ("subpicture/x-dvd")
|
GST_STATIC_CAPS ("subpicture/x-dvd")
|
||||||
);
|
);
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_dvd_sub_dec_debug);
|
|
||||||
#define GST_CAT_DEFAULT (gst_dvd_sub_dec_debug)
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -1145,17 +1149,12 @@ not_handled:
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "dvdsubdec", GST_RANK_NONE,
|
gboolean ret = FALSE;
|
||||||
GST_TYPE_DVD_SUB_DEC) ||
|
|
||||||
!gst_element_register (plugin, "dvdsubparse", GST_RANK_NONE,
|
|
||||||
GST_TYPE_DVD_SUB_PARSE)) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_dvd_sub_dec_debug, "dvdsubdec", 0,
|
ret |= GST_ELEMENT_REGISTER (dvdsubdec, plugin);
|
||||||
"DVD subtitle decoder");
|
ret |= GST_ELEMENT_REGISTER (dvdsubparse, plugin);
|
||||||
|
|
||||||
return TRUE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -17,10 +17,14 @@
|
||||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
#ifndef __GST_DVDSUBDEC_H__
|
||||||
|
#define __GST_DVDSUBDEC_H__
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_DVD_SUB_DEC (gst_dvd_sub_dec_get_type())
|
#define GST_TYPE_DVD_SUB_DEC (gst_dvd_sub_dec_get_type())
|
||||||
#define GST_DVD_SUB_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVD_SUB_DEC,GstDvdSubDec))
|
#define GST_DVD_SUB_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVD_SUB_DEC,GstDvdSubDec))
|
||||||
#define GST_DVD_SUB_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVD_SUB_DEC,GstDvdSubDecClass))
|
#define GST_DVD_SUB_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVD_SUB_DEC,GstDvdSubDecClass))
|
||||||
|
@ -100,3 +104,8 @@ struct _GstDvdSubDecClass
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_dvd_sub_dec_get_type (void);
|
GType gst_dvd_sub_dec_get_type (void);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (dvdsubdec);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GST_DVDSUBDEC_H__ */
|
||||||
|
|
|
@ -54,6 +54,8 @@ static GstStateChangeReturn gst_dvd_sub_parse_change_state (GstElement *
|
||||||
|
|
||||||
#define gst_dvd_sub_parse_parent_class parent_class
|
#define gst_dvd_sub_parse_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstDvdSubParse, gst_dvd_sub_parse, GST_TYPE_ELEMENT);
|
G_DEFINE_TYPE (GstDvdSubParse, gst_dvd_sub_parse, GST_TYPE_ELEMENT);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (dvdsubparse, "dvdsubparse", GST_RANK_NONE,
|
||||||
|
GST_TYPE_DVD_SUB_PARSE);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dvd_sub_parse_class_init (GstDvdSubParseClass * klass)
|
gst_dvd_sub_parse_class_init (GstDvdSubParseClass * klass)
|
||||||
|
|
|
@ -58,6 +58,7 @@ struct _GstDvdSubParseClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_dvd_sub_parse_get_type (void);
|
GType gst_dvd_sub_parse_get_type (void);
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (dvdsubparse);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue