mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
Fixed lame too
Original commit message from CVS: Fixed lame too
This commit is contained in:
parent
783dcb7418
commit
62274a20ff
1 changed files with 24 additions and 27 deletions
|
@ -28,11 +28,8 @@ static GstElementDetails gst_lame_details =
|
||||||
{
|
{
|
||||||
"L.A.M.E. mp3 encoder",
|
"L.A.M.E. mp3 encoder",
|
||||||
"Codec/Audio/Encoder",
|
"Codec/Audio/Encoder",
|
||||||
"LGPL",
|
|
||||||
"High-quality free MP3 encoder",
|
"High-quality free MP3 encoder",
|
||||||
VERSION,
|
|
||||||
"Erik Walthinsen <omega@cse.ogi.edu>",
|
"Erik Walthinsen <omega@cse.ogi.edu>",
|
||||||
"(C) 2000",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_PAD_TEMPLATE_FACTORY (gst_lame_sink_factory,
|
GST_PAD_TEMPLATE_FACTORY (gst_lame_sink_factory,
|
||||||
|
@ -188,7 +185,7 @@ enum {
|
||||||
ARG_METADATA,
|
ARG_METADATA,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void gst_lame_base_init (gpointer g_class);
|
||||||
static void gst_lame_class_init (GstLameClass *klass);
|
static void gst_lame_class_init (GstLameClass *klass);
|
||||||
static void gst_lame_init (GstLame *gst_lame);
|
static void gst_lame_init (GstLame *gst_lame);
|
||||||
|
|
||||||
|
@ -211,7 +208,7 @@ gst_lame_get_type (void)
|
||||||
if (!gst_lame_type) {
|
if (!gst_lame_type) {
|
||||||
static const GTypeInfo gst_lame_info = {
|
static const GTypeInfo gst_lame_info = {
|
||||||
sizeof (GstLameClass),
|
sizeof (GstLameClass),
|
||||||
NULL,
|
gst_lame_base_init,
|
||||||
NULL,
|
NULL,
|
||||||
(GClassInitFunc) gst_lame_class_init,
|
(GClassInitFunc) gst_lame_class_init,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -225,6 +222,16 @@ gst_lame_get_type (void)
|
||||||
return gst_lame_type;
|
return gst_lame_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_lame_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 (gst_lame_src_factory));
|
||||||
|
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (gst_lame_sink_factory));
|
||||||
|
gst_element_class_set_details (element_class, &gst_lame_details);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_lame_class_init (GstLameClass *klass)
|
gst_lame_class_init (GstLameClass *klass)
|
||||||
{
|
{
|
||||||
|
@ -920,32 +927,22 @@ gst_lame_change_state (GstElement *element)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GModule *module, GstPlugin *plugin)
|
plugin_init (GstPlugin *plugin)
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
if (!gst_element_register (plugin, "lame", GST_RANK_NONE, GST_TYPE_LAME))
|
||||||
|
return FALSE;
|
||||||
/* create an elementfactory for the gst_lame element */
|
|
||||||
factory = gst_element_factory_new ("lame", GST_TYPE_LAME,
|
|
||||||
&gst_lame_details);
|
|
||||||
g_return_val_if_fail (factory != NULL, FALSE);
|
|
||||||
|
|
||||||
/* register the source's padtemplate */
|
|
||||||
gst_element_factory_add_pad_template (factory,
|
|
||||||
GST_PAD_TEMPLATE_GET (gst_lame_src_factory));
|
|
||||||
|
|
||||||
/* register the sink's padtemplate */
|
|
||||||
gst_element_factory_add_pad_template (factory,
|
|
||||||
GST_PAD_TEMPLATE_GET (gst_lame_sink_factory));
|
|
||||||
|
|
||||||
/* and add the gst_lame element factory to the plugin */
|
|
||||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GstPluginDesc plugin_desc = {
|
GST_PLUGIN_DEFINE (
|
||||||
GST_VERSION_MAJOR,
|
GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
"lame",
|
"lame",
|
||||||
plugin_init
|
"Encode MP3's with LAME",
|
||||||
};
|
plugin_init,
|
||||||
|
VERSION,
|
||||||
|
"LGPL",
|
||||||
|
GST_COPYRIGHT,
|
||||||
|
GST_PACKAGE,
|
||||||
|
GST_ORIGIN)
|
||||||
|
|
Loading…
Reference in a new issue