mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
More
Original commit message from CVS: More
This commit is contained in:
parent
c57df85cd9
commit
cb3a7cfe5d
2 changed files with 61 additions and 54 deletions
|
@ -32,11 +32,8 @@
|
||||||
GstElementDetails gst_divxdec_details = {
|
GstElementDetails gst_divxdec_details = {
|
||||||
"Divx decoder",
|
"Divx decoder",
|
||||||
"Codec/Video/Decoder",
|
"Codec/Video/Decoder",
|
||||||
"Commercial",
|
|
||||||
"Divx decoder based on divxdecore",
|
"Divx decoder based on divxdecore",
|
||||||
VERSION,
|
"Ronald Bultje <rbultje@ronald.bitfreak.net>"
|
||||||
"Ronald Bultje <rbultje@ronald.bitfreak.net>",
|
|
||||||
"(C) 2003",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_PAD_TEMPLATE_FACTORY(sink_template,
|
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_class_init (GstDivxDecClass *klass);
|
||||||
static void gst_divxdec_init (GstDivxDec *divxdec);
|
static void gst_divxdec_init (GstDivxDec *divxdec);
|
||||||
static void gst_divxdec_dispose (GObject *object);
|
static void gst_divxdec_dispose (GObject *object);
|
||||||
|
@ -145,7 +143,7 @@ gst_divxdec_get_type(void)
|
||||||
{
|
{
|
||||||
static const GTypeInfo divxdec_info = {
|
static const GTypeInfo divxdec_info = {
|
||||||
sizeof(GstDivxDecClass),
|
sizeof(GstDivxDecClass),
|
||||||
NULL,
|
(GBaseInitFunc) gst_divxdec_base_init,
|
||||||
NULL,
|
NULL,
|
||||||
(GClassInitFunc) gst_divxdec_class_init,
|
(GClassInitFunc) gst_divxdec_class_init,
|
||||||
NULL,
|
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
|
static void
|
||||||
gst_divxdec_class_init (GstDivxDecClass *klass)
|
gst_divxdec_class_init (GstDivxDecClass *klass)
|
||||||
{
|
{
|
||||||
|
@ -444,10 +456,8 @@ gst_divxdec_connect (GstPad *pad,
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GModule *module,
|
plugin_init (GstPlugin *plugin)
|
||||||
GstPlugin *plugin)
|
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
|
||||||
int lib_version;
|
int lib_version;
|
||||||
|
|
||||||
lib_version = decore(NULL, DEC_OPT_VERSION, 0, 0);
|
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 "
|
g_warning("Version mismatch! This plugin was compiled for "
|
||||||
"DivX version %d, while your library has version %d!",
|
"DivX version %d, while your library has version %d!",
|
||||||
DECORE_VERSION, lib_version);
|
DECORE_VERSION, lib_version);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create an elementfactory for the v4lmjpegsrcparse element */
|
/* create an elementfactory for the v4lmjpegsrcparse element */
|
||||||
factory = gst_element_factory_new("divxdec", GST_TYPE_DIVXDEC,
|
return gst_element_register(plugin, "divxdec",
|
||||||
&gst_divxdec_details);
|
GST_RANK_PRIMARY, GST_TYPE_DIVXDEC);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GstPluginDesc plugin_desc = {
|
GST_PLUGIN_DEFINE (
|
||||||
GST_VERSION_MAJOR,
|
GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
"divxdec",
|
"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 = {
|
GstElementDetails gst_divxenc_details = {
|
||||||
"Divx encoder",
|
"Divx encoder",
|
||||||
"Codec/Video/Encoder",
|
"Codec/Video/Encoder",
|
||||||
"Commercial",
|
|
||||||
"Divx encoder based on divxencore",
|
"Divx encoder based on divxencore",
|
||||||
VERSION,
|
"Ronald Bultje <rbultje@ronald.bitfreak.net>"
|
||||||
"Ronald Bultje <rbultje@ronald.bitfreak.net>",
|
|
||||||
"(C) 2003",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_PAD_TEMPLATE_FACTORY(sink_template,
|
GST_PAD_TEMPLATE_FACTORY(sink_template,
|
||||||
|
@ -100,6 +97,7 @@ enum {
|
||||||
|
|
||||||
|
|
||||||
static void gst_divxenc_class_init (GstDivxEncClass *klass);
|
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_init (GstDivxEnc *divxenc);
|
||||||
static void gst_divxenc_dispose (GObject *object);
|
static void gst_divxenc_dispose (GObject *object);
|
||||||
static void gst_divxenc_chain (GstPad *pad,
|
static void gst_divxenc_chain (GstPad *pad,
|
||||||
|
@ -163,7 +161,7 @@ gst_divxenc_get_type(void)
|
||||||
{
|
{
|
||||||
static const GTypeInfo divxenc_info = {
|
static const GTypeInfo divxenc_info = {
|
||||||
sizeof(GstDivxEncClass),
|
sizeof(GstDivxEncClass),
|
||||||
NULL,
|
(GBaseInitFunc) gst_divxenc_base_init,
|
||||||
NULL,
|
NULL,
|
||||||
(GClassInitFunc) gst_divxenc_class_init,
|
(GClassInitFunc) gst_divxenc_class_init,
|
||||||
NULL,
|
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
|
static void
|
||||||
gst_divxenc_class_init (GstDivxEncClass *klass)
|
gst_divxenc_class_init (GstDivxEncClass *klass)
|
||||||
{
|
{
|
||||||
|
@ -547,10 +559,8 @@ gst_divxenc_get_property (GObject *object,
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GModule *module,
|
plugin_init (GstPlugin *plugin)
|
||||||
GstPlugin *plugin)
|
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
|
||||||
int lib_version;
|
int lib_version;
|
||||||
|
|
||||||
lib_version = encore(NULL, ENC_OPT_VERSION, 0, 0);
|
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 "
|
g_warning("Version mismatch! This plugin was compiled for "
|
||||||
"DivX version %d, while your library has version %d!",
|
"DivX version %d, while your library has version %d!",
|
||||||
ENCORE_VERSION, lib_version);
|
ENCORE_VERSION, lib_version);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_library_load("gstvideo"))
|
/* create an elementfactory for the v4lmjpegsrcparse element */
|
||||||
return FALSE;
|
return gst_element_register(plugin, "divxenc",
|
||||||
|
GST_RANK_PRIMARY, GST_TYPE_DIVXENC);
|
||||||
/* 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GstPluginDesc plugin_desc = {
|
GST_PLUGIN_DEFINE (
|
||||||
GST_VERSION_MAJOR,
|
GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
"divxenc",
|
"divxenc",
|
||||||
plugin_init
|
"DivX encoder",
|
||||||
};
|
plugin_init,
|
||||||
|
"5.03",
|
||||||
|
GST_LICENSE_UNKNOWN,
|
||||||
|
"(c) 2002 DivX Networks",
|
||||||
|
"divx4linux",
|
||||||
|
"http://www.divx.com/"
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue