mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Sndfile compiles again
Original commit message from CVS: Sndfile compiles again
This commit is contained in:
parent
f23814b897
commit
9f4177857c
1 changed files with 39 additions and 26 deletions
|
@ -30,21 +30,15 @@
|
||||||
static GstElementDetails sfsrc_details = {
|
static GstElementDetails sfsrc_details = {
|
||||||
"Sndfile Source",
|
"Sndfile Source",
|
||||||
"Source/Audio",
|
"Source/Audio",
|
||||||
"LGPL",
|
|
||||||
"Read audio streams from disk using libsndfile",
|
"Read audio streams from disk using libsndfile",
|
||||||
VERSION,
|
|
||||||
"Andy Wingo <wingo at pobox dot com>",
|
"Andy Wingo <wingo at pobox dot com>",
|
||||||
"(C) 2003"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static GstElementDetails sfsink_details = {
|
static GstElementDetails sfsink_details = {
|
||||||
"Sndfile Sink",
|
"Sndfile Sink",
|
||||||
"Sink/Audio",
|
"Sink/Audio",
|
||||||
"LGPL",
|
|
||||||
"Write audio streams to disk using libsndfile",
|
"Write audio streams to disk using libsndfile",
|
||||||
VERSION,
|
|
||||||
"Andy Wingo <wingo at pobox dot com>",
|
"Andy Wingo <wingo at pobox dot com>",
|
||||||
"(C) 2003"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -148,6 +142,8 @@ gst_sf_minor_types_get_type (void)
|
||||||
return sf_minor_types_type;
|
return sf_minor_types_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gst_sfsrc_base_init (gpointer g_class);
|
||||||
|
static void gst_sfsink_base_init (gpointer g_class);
|
||||||
static void gst_sf_class_init (GstSFClass *klass);
|
static void gst_sf_class_init (GstSFClass *klass);
|
||||||
static void gst_sf_init (GstSF *this);
|
static void gst_sf_init (GstSF *this);
|
||||||
static void gst_sf_dispose (GObject *object);
|
static void gst_sf_dispose (GObject *object);
|
||||||
|
@ -208,7 +204,8 @@ gst_sfsrc_get_type (void)
|
||||||
|
|
||||||
if (!sfsrc_type) {
|
if (!sfsrc_type) {
|
||||||
static const GTypeInfo sfsrc_info = {
|
static const GTypeInfo sfsrc_info = {
|
||||||
sizeof (GstSFClass), NULL,
|
sizeof (GstSFClass),
|
||||||
|
gst_sfsrc_base_init,
|
||||||
NULL,
|
NULL,
|
||||||
(GClassInitFunc) gst_sf_class_init,
|
(GClassInitFunc) gst_sf_class_init,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -229,7 +226,8 @@ gst_sfsink_get_type (void)
|
||||||
|
|
||||||
if (!sfsink_type) {
|
if (!sfsink_type) {
|
||||||
static const GTypeInfo sfsink_info = {
|
static const GTypeInfo sfsink_info = {
|
||||||
sizeof (GstSFClass), NULL,
|
sizeof (GstSFClass),
|
||||||
|
gst_sfsink_base_init,
|
||||||
NULL,
|
NULL,
|
||||||
(GClassInitFunc) gst_sf_class_init,
|
(GClassInitFunc) gst_sf_class_init,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -243,6 +241,24 @@ gst_sfsink_get_type (void)
|
||||||
return sfsink_type;
|
return sfsink_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_sfsrc_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 (sf_src_factory));
|
||||||
|
gst_element_class_set_details (element_class, &sfsrc_details);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_sfsink_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 (sf_sink_factory));
|
||||||
|
gst_element_class_set_details (element_class, &sfsink_details);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_sf_class_init (GstSFClass *klass)
|
gst_sf_class_init (GstSFClass *klass)
|
||||||
{
|
{
|
||||||
|
@ -784,10 +800,8 @@ gst_sf_loop (GstElement *element)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GModule *module, GstPlugin *plugin)
|
plugin_init (GstPlugin *plugin)
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
|
||||||
|
|
||||||
if (!gst_library_load ("gstaudio"))
|
if (!gst_library_load ("gstaudio"))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -795,24 +809,23 @@ plugin_init (GModule *module, GstPlugin *plugin)
|
||||||
GST_DEBUG_FG_WHITE | GST_DEBUG_BG_GREEN | GST_DEBUG_BOLD,
|
GST_DEBUG_FG_WHITE | GST_DEBUG_BG_GREEN | GST_DEBUG_BOLD,
|
||||||
"libsndfile plugin");
|
"libsndfile plugin");
|
||||||
|
|
||||||
factory = gst_element_factory_new ("sfsrc", GST_TYPE_SFSRC,
|
if (!gst_element_register (plugin, "sfsrc", GST_RANK_NONE, GST_TYPE_SFSRC))
|
||||||
&sfsrc_details);
|
return FALSE;
|
||||||
g_return_val_if_fail (factory != NULL, FALSE);
|
|
||||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sf_src_factory));
|
|
||||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
|
||||||
|
|
||||||
factory = gst_element_factory_new ("sfsink", GST_TYPE_SFSINK,
|
if (!gst_element_register (plugin, "sfsink", GST_RANK_NONE, GST_TYPE_SFSINK))
|
||||||
&sfsink_details);
|
return FALSE;
|
||||||
g_return_val_if_fail (factory != NULL, FALSE);
|
|
||||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sf_sink_factory));
|
|
||||||
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,
|
||||||
"gstsf",
|
"gstsf",
|
||||||
plugin_init
|
"Sndfile plugin library",
|
||||||
};
|
plugin_init,
|
||||||
|
VERSION,
|
||||||
|
"LGPL",
|
||||||
|
GST_COPYRIGHT,
|
||||||
|
GST_PACKAGE,
|
||||||
|
GST_ORIGIN)
|
||||||
|
|
Loading…
Reference in a new issue