mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
CDXAParse and chart ported to new style
Original commit message from CVS: CDXAParse and chart ported to new style
This commit is contained in:
parent
8d74428b85
commit
0cc17ce52c
2 changed files with 51 additions and 43 deletions
|
@ -43,11 +43,8 @@
|
|||
static GstElementDetails gst_cdxa_parse_details = {
|
||||
".dat parser",
|
||||
"Codec/Parser",
|
||||
"LGPL",
|
||||
"Parse a .dat file (VCD) into raw mpeg1",
|
||||
VERSION,
|
||||
"Wim Taymans <wim.taymans@tvd.be>",
|
||||
"(C) 2002",
|
||||
};
|
||||
|
||||
/* CDXAParse signals and args */
|
||||
|
@ -83,6 +80,7 @@ GST_PAD_TEMPLATE_FACTORY (src_templ,
|
|||
)
|
||||
)
|
||||
|
||||
static void gst_cdxa_parse_base_init (gpointer g_class);
|
||||
static void gst_cdxa_parse_class_init (GstCDXAParseClass *klass);
|
||||
static void gst_cdxa_parse_init (GstCDXAParse *cdxa_parse);
|
||||
|
||||
|
@ -103,7 +101,7 @@ gst_cdxa_parse_get_type(void)
|
|||
if (!cdxa_parse_type) {
|
||||
static const GTypeInfo cdxa_parse_info = {
|
||||
sizeof(GstCDXAParseClass),
|
||||
NULL,
|
||||
gst_cdxa_parse_base_init,
|
||||
NULL,
|
||||
(GClassInitFunc)gst_cdxa_parse_class_init,
|
||||
NULL,
|
||||
|
@ -117,6 +115,16 @@ gst_cdxa_parse_get_type(void)
|
|||
return cdxa_parse_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_cdxa_parse_base_init (gpointer g_class)
|
||||
{
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (src_templ));
|
||||
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (sink_templ));
|
||||
gst_element_class_set_details (element_class, &gst_cdxa_parse_details);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_cdxa_parse_class_init (GstCDXAParseClass *klass)
|
||||
{
|
||||
|
@ -303,30 +311,26 @@ gst_cdxa_parse_change_state (GstElement *element)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
plugin_init (GstPlugin *plugin)
|
||||
{
|
||||
GstElementFactory *factory;
|
||||
|
||||
if (!gst_library_load ("gstbytestream"))
|
||||
return FALSE;
|
||||
|
||||
/* create an elementfactory for the cdxa_parse element */
|
||||
factory = gst_element_factory_new ("cdxaparse", GST_TYPE_CDXA_PARSE,
|
||||
&gst_cdxa_parse_details);
|
||||
g_return_val_if_fail (factory != NULL, FALSE);
|
||||
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_templ));
|
||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_templ));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
if (!gst_element_register (plugin, "cdxaparse", GST_RANK_NONE, GST_TYPE_CDXA_PARSE))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_PLUGIN_DEFINE (
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"cdxaparse",
|
||||
plugin_init
|
||||
};
|
||||
"Parse a .dat file (VCD) into raw mpeg1",
|
||||
plugin_init,
|
||||
VERSION,
|
||||
"LGPL",
|
||||
GST_COPYRIGHT,
|
||||
GST_PACKAGE,
|
||||
GST_ORIGIN)
|
||||
|
||||
|
|
|
@ -66,11 +66,8 @@ GType gst_chart_get_type(void);
|
|||
static GstElementDetails gst_chart_details = {
|
||||
"chart drawer",
|
||||
"Visualization",
|
||||
"LGPL",
|
||||
"Takes frames of data and outputs video frames of a chart of data",
|
||||
VERSION,
|
||||
"Richard Boulton <richard@tartarus.org>",
|
||||
"(C) 2001",
|
||||
};
|
||||
|
||||
/* signals and args */
|
||||
|
@ -109,7 +106,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory,
|
|||
)
|
||||
);
|
||||
|
||||
|
||||
static void gst_chart_base_init (gpointer g_class);
|
||||
static void gst_chart_class_init (GstChartClass *klass);
|
||||
static void gst_chart_init (GstChart *chart);
|
||||
|
||||
|
@ -132,7 +129,10 @@ gst_chart_get_type (void)
|
|||
|
||||
if (!type) {
|
||||
static const GTypeInfo info = {
|
||||
sizeof(GstChartClass), NULL, NULL, (GClassInitFunc)gst_chart_class_init,
|
||||
sizeof(GstChartClass),
|
||||
gst_chart_base_init,
|
||||
NULL,
|
||||
(GClassInitFunc)gst_chart_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(GstChart),
|
||||
|
@ -144,6 +144,16 @@ gst_chart_get_type (void)
|
|||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_chart_base_init (gpointer g_class)
|
||||
{
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (src_factory));
|
||||
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (sink_factory));
|
||||
gst_element_class_set_details (element_class, &gst_chart_details);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_chart_class_init(GstChartClass *klass)
|
||||
{
|
||||
|
@ -423,28 +433,22 @@ gst_chart_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe
|
|||
}
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
plugin_init (GstPlugin *plugin)
|
||||
{
|
||||
GstElementFactory *factory;
|
||||
|
||||
/* create an elementfactory for the chart element */
|
||||
factory = gst_element_factory_new("chart",GST_TYPE_CHART,
|
||||
&gst_chart_details);
|
||||
g_return_val_if_fail(factory != NULL, FALSE);
|
||||
|
||||
gst_element_factory_add_pad_template (factory,
|
||||
GST_PAD_TEMPLATE_GET (src_factory));
|
||||
gst_element_factory_add_pad_template (factory,
|
||||
GST_PAD_TEMPLATE_GET (sink_factory));
|
||||
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
||||
|
||||
if (!gst_element_register (plugin, "chart", GST_RANK_NONE, GST_TYPE_CHART))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_PLUGIN_DEFINE (
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"chart",
|
||||
plugin_init
|
||||
};
|
||||
"Takes frames of data and outputs video frames of a chart of data",
|
||||
plugin_init,
|
||||
VERSION,
|
||||
"LGPL",
|
||||
GST_COPYRIGHT,
|
||||
GST_PACKAGE,
|
||||
GST_ORIGIN)
|
||||
|
|
Loading…
Reference in a new issue