Commit cb3a7cfe authored by Ronald S. Bultje's avatar Ronald S. Bultje

More

Original commit message from CVS:
More
parent c57df85c
......@@ -32,11 +32,8 @@
GstElementDetails gst_divxdec_details = {
"Divx decoder",
"Codec/Video/Decoder",
"Commercial",
"Divx decoder based on divxdecore",
VERSION,
"Ronald Bultje <rbultje@ronald.bitfreak.net>",
"(C) 2003",
"Ronald Bultje <rbultje@ronald.bitfreak.net>"
};
GST_PAD_TEMPLATE_FACTORY(sink_template,
......@@ -94,6 +91,7 @@ enum {
};
static void gst_divxdec_base_init (GstDivxDecClass *klass);
static void gst_divxdec_class_init (GstDivxDecClass *klass);
static void gst_divxdec_init (GstDivxDec *divxdec);
static void gst_divxdec_dispose (GObject *object);
......@@ -145,7 +143,7 @@ gst_divxdec_get_type(void)
{
static const GTypeInfo divxdec_info = {
sizeof(GstDivxDecClass),
NULL,
(GBaseInitFunc) gst_divxdec_base_init,
NULL,
(GClassInitFunc) gst_divxdec_class_init,
NULL,
......@@ -162,6 +160,20 @@ gst_divxdec_get_type(void)
}
static void
gst_divxdec_base_init (GstDivxDecClass *klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_template));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_template));
gst_element_class_set_details (element_class, &gst_divxdec_details);
}
static void
gst_divxdec_class_init (GstDivxDecClass *klass)
{
......@@ -444,10 +456,8 @@ gst_divxdec_connect (GstPad *pad,
static gboolean
plugin_init (GModule *module,
GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
GstElementFactory *factory;
int lib_version;
lib_version = decore(NULL, DEC_OPT_VERSION, 0, 0);
......@@ -455,30 +465,24 @@ plugin_init (GModule *module,
g_warning("Version mismatch! This plugin was compiled for "
"DivX version %d, while your library has version %d!",
DECORE_VERSION, lib_version);
return FALSE;
}
/* create an elementfactory for the v4lmjpegsrcparse element */
factory = gst_element_factory_new("divxdec", GST_TYPE_DIVXDEC,
&gst_divxdec_details);
g_return_val_if_fail(factory != NULL, FALSE);
/* add pad templates */
gst_element_factory_add_pad_template(factory,
GST_PAD_TEMPLATE_GET(sink_template));
gst_element_factory_add_pad_template(factory,
GST_PAD_TEMPLATE_GET(src_template));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
gst_element_factory_set_rank(factory, GST_ELEMENT_RANK_PRIMARY);
return TRUE;
return gst_element_register(plugin, "divxdec",
GST_RANK_PRIMARY, GST_TYPE_DIVXDEC);
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"divxdec",
plugin_init
};
"DivX decoder",
plugin_init,
"5.03",
GST_LICENSE_UNKNOWN,
"(c) 2002 DivX Networks",
"divx4linux",
"http://www.divx.com/"
)
......@@ -33,11 +33,8 @@
GstElementDetails gst_divxenc_details = {
"Divx encoder",
"Codec/Video/Encoder",
"Commercial",
"Divx encoder based on divxencore",
VERSION,
"Ronald Bultje <rbultje@ronald.bitfreak.net>",
"(C) 2003",
"Ronald Bultje <rbultje@ronald.bitfreak.net>"
};
GST_PAD_TEMPLATE_FACTORY(sink_template,
......@@ -100,6 +97,7 @@ enum {
static void gst_divxenc_class_init (GstDivxEncClass *klass);
static void gst_divxenc_base_init (GstDivxEncClass *klass);
static void gst_divxenc_init (GstDivxEnc *divxenc);
static void gst_divxenc_dispose (GObject *object);
static void gst_divxenc_chain (GstPad *pad,
......@@ -163,7 +161,7 @@ gst_divxenc_get_type(void)
{
static const GTypeInfo divxenc_info = {
sizeof(GstDivxEncClass),
NULL,
(GBaseInitFunc) gst_divxenc_base_init,
NULL,
(GClassInitFunc) gst_divxenc_class_init,
NULL,
......@@ -180,6 +178,20 @@ gst_divxenc_get_type(void)
}
static void
gst_divxenc_base_init (GstDivxEncClass *klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (sink_template));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (src_template));
gst_element_class_set_details (element_class, &gst_divxenc_details);
}
static void
gst_divxenc_class_init (GstDivxEncClass *klass)
{
......@@ -547,10 +559,8 @@ gst_divxenc_get_property (GObject *object,
static gboolean
plugin_init (GModule *module,
GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
GstElementFactory *factory;
int lib_version;
lib_version = encore(NULL, ENC_OPT_VERSION, 0, 0);
......@@ -558,31 +568,24 @@ plugin_init (GModule *module,
g_warning("Version mismatch! This plugin was compiled for "
"DivX version %d, while your library has version %d!",
ENCORE_VERSION, lib_version);
}
if (!gst_library_load("gstvideo"))
return FALSE;
}
/* create an elementfactory for the element */
factory = gst_element_factory_new("divxenc", GST_TYPE_DIVXENC,
&gst_divxenc_details);
g_return_val_if_fail(factory != NULL, FALSE);
/* add pad templates */
gst_element_factory_add_pad_template(factory,
GST_PAD_TEMPLATE_GET(sink_template));
gst_element_factory_add_pad_template(factory,
GST_PAD_TEMPLATE_GET(src_template));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
return TRUE;
/* create an elementfactory for the v4lmjpegsrcparse element */
return gst_element_register(plugin, "divxenc",
GST_RANK_PRIMARY, GST_TYPE_DIVXENC);
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"divxenc",
plugin_init
};
"DivX encoder",
plugin_init,
"5.03",
GST_LICENSE_UNKNOWN,
"(c) 2002 DivX Networks",
"divx4linux",
"http://www.divx.com/"
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment