mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
Update all the audiofile stuff
Original commit message from CVS: Update all the audiofile stuff
This commit is contained in:
parent
c9b2638183
commit
6d5504f649
8 changed files with 72 additions and 63 deletions
|
@ -22,25 +22,30 @@
|
||||||
#include "gstafsink.h"
|
#include "gstafsink.h"
|
||||||
#include "gstafparse.h"
|
#include "gstafparse.h"
|
||||||
|
|
||||||
gboolean gst_aftypes_plugin_init (GModule *module, GstPlugin *plugin);
|
gboolean gst_aftypes_plugin_init (GstPlugin *plugin);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GModule *module, GstPlugin *plugin)
|
plugin_init (GstPlugin *plugin)
|
||||||
{
|
{
|
||||||
if (!gst_library_load ("gstbytestream"))
|
if (!gst_library_load ("gstbytestream"))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
gst_afsink_plugin_init (module, plugin);
|
gst_afsink_plugin_init (plugin);
|
||||||
gst_afsrc_plugin_init (module, plugin);
|
gst_afsrc_plugin_init (plugin);
|
||||||
gst_afparse_plugin_init (module, plugin);
|
gst_afparse_plugin_init (plugin);
|
||||||
gst_aftypes_plugin_init (module, plugin);
|
gst_aftypes_plugin_init (plugin);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GstPluginDesc plugin_desc = {
|
GST_PLUGIN_DEFINE (
|
||||||
GST_VERSION_MAJOR,
|
GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
"gstaf",
|
"gstaf",
|
||||||
plugin_init
|
"Audiofile plugin",
|
||||||
};
|
plugin_init,
|
||||||
|
VERSION,
|
||||||
|
"LGPL",
|
||||||
|
GST_COPYRIGHT,
|
||||||
|
GST_PACKAGE,
|
||||||
|
GST_ORIGIN)
|
||||||
|
|
|
@ -33,11 +33,8 @@
|
||||||
static GstElementDetails afparse_details = {
|
static GstElementDetails afparse_details = {
|
||||||
"Audiofile Parse",
|
"Audiofile Parse",
|
||||||
"Codec/Parser",
|
"Codec/Parser",
|
||||||
"LGPL",
|
|
||||||
"Audiofile parser for audio/raw",
|
"Audiofile parser for audio/raw",
|
||||||
VERSION,
|
|
||||||
"Steve Baker <stevebaker_org@yahoo.co.uk>",
|
"Steve Baker <stevebaker_org@yahoo.co.uk>",
|
||||||
"(C) 2002"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,6 +87,7 @@ GST_PAD_TEMPLATE_FACTORY (afparse_sink_factory,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
static void gst_afparse_base_init (gpointer g_class);
|
||||||
static void gst_afparse_class_init(GstAFParseClass *klass);
|
static void gst_afparse_class_init(GstAFParseClass *klass);
|
||||||
static void gst_afparse_init (GstAFParse *afparse);
|
static void gst_afparse_init (GstAFParse *afparse);
|
||||||
|
|
||||||
|
@ -113,7 +111,8 @@ gst_afparse_get_type (void)
|
||||||
|
|
||||||
if (!afparse_type) {
|
if (!afparse_type) {
|
||||||
static const GTypeInfo afparse_info = {
|
static const GTypeInfo afparse_info = {
|
||||||
sizeof (GstAFParseClass), NULL,
|
sizeof (GstAFParseClass),
|
||||||
|
gst_afparse_base_init,
|
||||||
NULL,
|
NULL,
|
||||||
(GClassInitFunc) gst_afparse_class_init,
|
(GClassInitFunc) gst_afparse_class_init,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -127,6 +126,17 @@ gst_afparse_get_type (void)
|
||||||
return afparse_type;
|
return afparse_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_afparse_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 (afparse_src_factory));
|
||||||
|
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (afparse_sink_factory));
|
||||||
|
|
||||||
|
gst_element_class_set_details (element_class, &afparse_details);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_afparse_class_init (GstAFParseClass *klass)
|
gst_afparse_class_init (GstAFParseClass *klass)
|
||||||
{
|
{
|
||||||
|
@ -320,24 +330,15 @@ gst_afparse_get_property (GObject *object, guint prop_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_afparse_plugin_init (GModule *module, GstPlugin *plugin)
|
gst_afparse_plugin_init (GstPlugin *plugin)
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
/* load audio support library */
|
||||||
|
|
||||||
factory = gst_element_factory_new ("afparse", GST_TYPE_AFPARSE,
|
|
||||||
&afparse_details);
|
|
||||||
g_return_val_if_fail (factory != NULL, FALSE);
|
|
||||||
|
|
||||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afparse_src_factory));
|
|
||||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afparse_sink_factory));
|
|
||||||
/* gst_element_factory_set_rank (factory, GST_ELEMENT_RANK_PRIMARY);*/
|
|
||||||
|
|
||||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
|
||||||
|
|
||||||
/* load audio support library */
|
|
||||||
if (!gst_library_load ("gstaudio"))
|
if (!gst_library_load ("gstaudio"))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!gst_element_register (plugin, "afparse", GST_RANK_NONE, GST_TYPE_AFPARSE))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ struct _GstAFParseClass {
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean gst_afparse_plugin_init (GModule *module, GstPlugin *plugin);
|
gboolean gst_afparse_plugin_init (GstPlugin *plugin);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,11 +31,8 @@
|
||||||
static GstElementDetails afsink_details = {
|
static GstElementDetails afsink_details = {
|
||||||
"Audiofile Sink",
|
"Audiofile Sink",
|
||||||
"Sink/Audio",
|
"Sink/Audio",
|
||||||
"LGPL",
|
|
||||||
"Write audio streams to disk using libaudiofile",
|
"Write audio streams to disk using libaudiofile",
|
||||||
VERSION,
|
|
||||||
"Thomas <thomas@apestaart.org>",
|
"Thomas <thomas@apestaart.org>",
|
||||||
"(C) 2001"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,6 +95,7 @@ gst_afsink_types_get_type (void)
|
||||||
return afsink_types_type;
|
return afsink_types_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gst_afsink_base_init (gpointer g_class);
|
||||||
static void gst_afsink_class_init (GstAFSinkClass *klass);
|
static void gst_afsink_class_init (GstAFSinkClass *klass);
|
||||||
static void gst_afsink_init (GstAFSink *afsink);
|
static void gst_afsink_init (GstAFSink *afsink);
|
||||||
|
|
||||||
|
@ -125,7 +123,8 @@ gst_afsink_get_type (void)
|
||||||
|
|
||||||
if (!afsink_type) {
|
if (!afsink_type) {
|
||||||
static const GTypeInfo afsink_info = {
|
static const GTypeInfo afsink_info = {
|
||||||
sizeof (GstAFSinkClass), NULL,
|
sizeof (GstAFSinkClass),
|
||||||
|
gst_afsink_base_init,
|
||||||
NULL,
|
NULL,
|
||||||
(GClassInitFunc) gst_afsink_class_init,
|
(GClassInitFunc) gst_afsink_class_init,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -139,6 +138,15 @@ gst_afsink_get_type (void)
|
||||||
return afsink_type;
|
return afsink_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_afsink_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 (afsink_sink_factory));
|
||||||
|
gst_element_class_set_details (element_class, &afsink_details);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_afsink_class_init (GstAFSinkClass *klass)
|
gst_afsink_class_init (GstAFSinkClass *klass)
|
||||||
{
|
{
|
||||||
|
@ -263,17 +271,10 @@ gst_afsink_get_property (GObject *object, guint prop_id, GValue *value, GParamSp
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_afsink_plugin_init (GModule *module, GstPlugin *plugin)
|
gst_afsink_plugin_init (GstPlugin *plugin)
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
if (!gst_element_register (plugin, "afsink", GST_RANK_NONE, GST_TYPE_AFSINK))
|
||||||
|
return FALSE;
|
||||||
factory = gst_element_factory_new ("afsink", GST_TYPE_AFSINK,
|
|
||||||
&afsink_details);
|
|
||||||
g_return_val_if_fail (factory != NULL, FALSE);
|
|
||||||
|
|
||||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afsink_sink_factory));
|
|
||||||
|
|
||||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ struct _GstAFSinkClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_afsink_get_type (void);
|
GType gst_afsink_get_type (void);
|
||||||
gboolean gst_afsink_plugin_init (GModule *module, GstPlugin *plugin);
|
gboolean gst_afsink_plugin_init (GstPlugin *plugin);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,8 @@
|
||||||
static GstElementDetails afsrc_details = {
|
static GstElementDetails afsrc_details = {
|
||||||
"Audiofile Src",
|
"Audiofile Src",
|
||||||
"Source/Audio",
|
"Source/Audio",
|
||||||
"LGPL",
|
|
||||||
"Read audio files from disk using libaudiofile",
|
"Read audio files from disk using libaudiofile",
|
||||||
VERSION,
|
|
||||||
"Thomas <thomas@apestaart.org>",
|
"Thomas <thomas@apestaart.org>",
|
||||||
"(C) 2001"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,6 +96,7 @@ gst_afsrc_types_get_type (void)
|
||||||
return afsrc_types_type;
|
return afsrc_types_type;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
static void gst_afsrc_base_init (gpointer g_class);
|
||||||
static void gst_afsrc_class_init (GstAFSrcClass *klass);
|
static void gst_afsrc_class_init (GstAFSrcClass *klass);
|
||||||
static void gst_afsrc_init (GstAFSrc *afsrc);
|
static void gst_afsrc_init (GstAFSrc *afsrc);
|
||||||
|
|
||||||
|
@ -124,7 +122,8 @@ gst_afsrc_get_type (void)
|
||||||
|
|
||||||
if (!afsrc_type) {
|
if (!afsrc_type) {
|
||||||
static const GTypeInfo afsrc_info = {
|
static const GTypeInfo afsrc_info = {
|
||||||
sizeof (GstAFSrcClass), NULL,
|
sizeof (GstAFSrcClass),
|
||||||
|
gst_afsrc_base_init,
|
||||||
NULL,
|
NULL,
|
||||||
(GClassInitFunc) gst_afsrc_class_init,
|
(GClassInitFunc) gst_afsrc_class_init,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -138,6 +137,15 @@ gst_afsrc_get_type (void)
|
||||||
return afsrc_type;
|
return afsrc_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_afsrc_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 (afsrc_src_factory));
|
||||||
|
gst_element_class_set_details (element_class, &afsrc_details);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_afsrc_class_init (GstAFSrcClass *klass)
|
gst_afsrc_class_init (GstAFSrcClass *klass)
|
||||||
{
|
{
|
||||||
|
@ -274,21 +282,14 @@ gst_afsrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_afsrc_plugin_init (GModule *module, GstPlugin *plugin)
|
gst_afsrc_plugin_init (GstPlugin *plugin)
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
|
||||||
|
|
||||||
factory = gst_element_factory_new ("afsrc", GST_TYPE_AFSRC,
|
|
||||||
&afsrc_details);
|
|
||||||
g_return_val_if_fail (factory != NULL, FALSE);
|
|
||||||
|
|
||||||
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afsrc_src_factory));
|
|
||||||
|
|
||||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
|
||||||
|
|
||||||
/* load audio support library */
|
/* load audio support library */
|
||||||
if (!gst_library_load ("gstaudio"))
|
if (!gst_library_load ("gstaudio"))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!gst_element_register (plugin, "afsrc", GST_RANK_NONE, GST_TYPE_AFSRC))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ struct _GstAFSrcClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_afsrc_get_type (void);
|
GType gst_afsrc_get_type (void);
|
||||||
gboolean gst_afsrc_plugin_init (GModule *module, GstPlugin *plugin);
|
gboolean gst_afsrc_plugin_init (GstPlugin *plugin);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -106,13 +106,14 @@ gst_aftypes_type_find(GstTypeFind *tf, gpointer private)
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_aftypes_plugin_init (GModule *module, GstPlugin *plugin)
|
gst_aftypes_plugin_init (GstPlugin *plugin)
|
||||||
{
|
{
|
||||||
static gchar * af_exts[] = { "aiff", "aif", "aifc", "wav", "au", "snd", NULL };
|
static gchar * af_exts[] = { "aiff", "aif", "aifc", "wav", "au", "snd", NULL };
|
||||||
|
|
||||||
gst_type_find_factory_register (plugin, "audio/x-mod",
|
gst_type_find_register (plugin, "audio/x-mod",
|
||||||
GST_ELEMENT_RANK_MARGINAL, gst_aftypes_type_find, af_exts,
|
GST_RANK_MARGINAL,
|
||||||
GST_CAPS_ANY, NULL);
|
gst_aftypes_type_find, af_exts,
|
||||||
|
GST_CAPS_ANY, NULL);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue