2002-03-20 21:45:03 +00:00
|
|
|
/* GStreamer
|
2001-12-23 15:41:33 +00:00
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2003-11-07 12:46:51 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2001-12-23 15:41:33 +00:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include "gstsiddec.h"
|
|
|
|
|
|
|
|
/* Sidec signals and args */
|
2004-03-14 23:20:40 +00:00
|
|
|
enum
|
|
|
|
{
|
2001-12-23 15:41:33 +00:00
|
|
|
/* FILL ME */
|
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
2003-06-03 18:23:14 +00:00
|
|
|
#define DEFAULT_BLOCKSIZE 4096
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
enum
|
|
|
|
{
|
2001-12-23 15:41:33 +00:00
|
|
|
ARG_0,
|
|
|
|
ARG_TUNE,
|
|
|
|
ARG_CLOCK,
|
|
|
|
ARG_MEMORY,
|
|
|
|
ARG_FILTER,
|
|
|
|
ARG_MEASURED_VOLUME,
|
|
|
|
ARG_MOS8580,
|
|
|
|
ARG_FORCE_SPEED,
|
2003-06-03 18:23:14 +00:00
|
|
|
ARG_BLOCKSIZE,
|
2004-05-21 23:28:57 +00:00
|
|
|
ARG_METADATA
|
|
|
|
/* FILL ME */
|
2001-12-23 15:41:33 +00:00
|
|
|
};
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink",
|
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_ALWAYS,
|
|
|
|
GST_STATIC_CAPS ("audio/x-sid")
|
|
|
|
);
|
|
|
|
|
|
|
|
static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src",
|
|
|
|
GST_PAD_SRC,
|
|
|
|
GST_PAD_ALWAYS,
|
|
|
|
GST_STATIC_CAPS ("audio/x-raw-int, "
|
2004-03-15 19:32:25 +00:00
|
|
|
"endianness = (int) BYTE_ORDER, "
|
|
|
|
"signed = (boolean) { true, false }, "
|
|
|
|
"width = (int) { 8, 16 }, "
|
|
|
|
"depth = (int) { 8, 16 }, "
|
|
|
|
"rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]")
|
2004-03-14 23:20:40 +00:00
|
|
|
);
|
|
|
|
|
2001-12-23 15:41:33 +00:00
|
|
|
|
|
|
|
#define GST_TYPE_SID_CLOCK (gst_sid_clock_get_type())
|
|
|
|
static GType
|
|
|
|
gst_sid_clock_get_type (void)
|
|
|
|
{
|
|
|
|
static GType sid_clock_type = 0;
|
|
|
|
static GEnumValue sid_clock[] = {
|
2004-03-14 23:20:40 +00:00
|
|
|
{SIDTUNE_CLOCK_PAL, "0", "PAL"},
|
|
|
|
{SIDTUNE_CLOCK_NTSC, "1", "NTSC"},
|
|
|
|
{0, NULL, NULL},
|
2001-12-23 15:41:33 +00:00
|
|
|
};
|
2004-03-15 19:32:25 +00:00
|
|
|
|
2001-12-23 15:41:33 +00:00
|
|
|
if (!sid_clock_type) {
|
|
|
|
sid_clock_type = g_enum_register_static ("GstSidClock", sid_clock);
|
|
|
|
}
|
|
|
|
return sid_clock_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define GST_TYPE_SID_MEMORY (gst_sid_memory_get_type())
|
|
|
|
static GType
|
|
|
|
gst_sid_memory_get_type (void)
|
|
|
|
{
|
|
|
|
static GType sid_memory_type = 0;
|
|
|
|
static GEnumValue sid_memory[] = {
|
2004-03-14 23:20:40 +00:00
|
|
|
{MPU_BANK_SWITCHING, "32", "Bank Switching"},
|
|
|
|
{MPU_TRANSPARENT_ROM, "33", "Transparent ROM"},
|
|
|
|
{MPU_PLAYSID_ENVIRONMENT, "34", "Playsid Environment"},
|
|
|
|
{0, NULL, NULL},
|
2001-12-23 15:41:33 +00:00
|
|
|
};
|
2004-03-15 19:32:25 +00:00
|
|
|
|
2001-12-23 15:41:33 +00:00
|
|
|
if (!sid_memory_type) {
|
|
|
|
sid_memory_type = g_enum_register_static ("GstSidMemory", sid_memory);
|
|
|
|
}
|
|
|
|
return sid_memory_type;
|
|
|
|
}
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
static void gst_siddec_base_init (gpointer g_class);
|
|
|
|
static void gst_siddec_class_init (GstSidDec * klass);
|
|
|
|
static void gst_siddec_init (GstSidDec * siddec);
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
static GstFlowReturn gst_siddec_chain (GstPad * pad, GstBuffer * buffer);
|
|
|
|
static gboolean gst_siddec_sink_event (GstPad * pad, GstEvent * event);
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
static gboolean gst_siddec_src_convert (GstPad * pad, GstFormat src_format,
|
|
|
|
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
2005-05-12 20:05:19 +00:00
|
|
|
static gboolean gst_siddec_src_query (GstPad * pad, GstQuery * query);
|
2002-06-02 20:09:43 +00:00
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
static void gst_siddec_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * pspec);
|
|
|
|
static void gst_siddec_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec);
|
2001-12-23 15:41:33 +00:00
|
|
|
|
|
|
|
static GstElementClass *parent_class = NULL;
|
2004-03-14 23:20:40 +00:00
|
|
|
|
2001-12-23 15:41:33 +00:00
|
|
|
//static guint gst_siddec_signals[LAST_SIGNAL] = { 0 };
|
|
|
|
|
|
|
|
GType
|
2004-03-14 23:20:40 +00:00
|
|
|
gst_siddec_get_type (void)
|
2001-12-23 15:41:33 +00:00
|
|
|
{
|
|
|
|
static GType siddec_type = 0;
|
|
|
|
|
|
|
|
if (!siddec_type) {
|
|
|
|
static const GTypeInfo siddec_info = {
|
2004-03-14 23:20:40 +00:00
|
|
|
sizeof (GstSidDecClass),
|
2003-11-03 20:16:05 +00:00
|
|
|
gst_siddec_base_init,
|
2001-12-23 15:41:33 +00:00
|
|
|
NULL,
|
|
|
|
(GClassInitFunc) gst_siddec_class_init,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2004-03-14 23:20:40 +00:00
|
|
|
sizeof (GstSidDec),
|
2001-12-23 15:41:33 +00:00
|
|
|
0,
|
|
|
|
(GInstanceInitFunc) gst_siddec_init,
|
|
|
|
NULL
|
|
|
|
};
|
2004-03-15 19:32:25 +00:00
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
siddec_type =
|
2004-03-15 19:32:25 +00:00
|
|
|
g_type_register_static (GST_TYPE_ELEMENT, "GstSidDec", &siddec_info,
|
|
|
|
(GTypeFlags) 0);
|
2001-12-23 15:41:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return siddec_type;
|
|
|
|
}
|
|
|
|
|
2003-11-03 20:16:05 +00:00
|
|
|
static void
|
|
|
|
gst_siddec_base_init (gpointer g_class)
|
|
|
|
{
|
2004-03-14 23:20:40 +00:00
|
|
|
static GstElementDetails gst_siddec_details =
|
|
|
|
GST_ELEMENT_DETAILS ("Sid decoder",
|
2004-05-09 14:37:15 +00:00
|
|
|
"Codec/Decoder/Audio",
|
2004-03-14 23:20:40 +00:00
|
|
|
"Use sidplay to decode SID audio tunes",
|
|
|
|
"Wim Taymans <wim.taymans@chello.be> ");
|
2003-11-03 20:16:05 +00:00
|
|
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
|
|
|
|
|
|
|
gst_element_class_set_details (element_class, &gst_siddec_details);
|
|
|
|
|
|
|
|
gst_element_class_add_pad_template (element_class,
|
2003-12-22 01:47:08 +00:00
|
|
|
gst_static_pad_template_get (&src_templ));
|
2003-11-03 20:16:05 +00:00
|
|
|
gst_element_class_add_pad_template (element_class,
|
2003-12-22 01:47:08 +00:00
|
|
|
gst_static_pad_template_get (&sink_templ));
|
2003-11-03 20:16:05 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2001-12-23 15:41:33 +00:00
|
|
|
static void
|
2004-03-14 23:20:40 +00:00
|
|
|
gst_siddec_class_init (GstSidDec * klass)
|
2001-12-23 15:41:33 +00:00
|
|
|
{
|
|
|
|
GObjectClass *gobject_class;
|
|
|
|
GstElementClass *gstelement_class;
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
gobject_class = (GObjectClass *) klass;
|
|
|
|
gstelement_class = (GstElementClass *) klass;
|
2001-12-23 15:41:33 +00:00
|
|
|
|
|
|
|
parent_class = GST_ELEMENT_CLASS (g_type_class_ref (GST_TYPE_ELEMENT));
|
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
gobject_class->set_property = gst_siddec_set_property;
|
|
|
|
gobject_class->get_property = gst_siddec_get_property;
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_TUNE,
|
|
|
|
g_param_spec_int ("tune", "tune", "tune",
|
2004-03-15 19:32:25 +00:00
|
|
|
1, 100, 1, (GParamFlags) G_PARAM_READWRITE));
|
2004-03-14 23:20:40 +00:00
|
|
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CLOCK,
|
|
|
|
g_param_spec_enum ("clock", "clock", "clock",
|
2004-03-15 19:32:25 +00:00
|
|
|
GST_TYPE_SID_CLOCK, SIDTUNE_CLOCK_PAL,
|
|
|
|
(GParamFlags) G_PARAM_READWRITE));
|
2004-03-14 23:20:40 +00:00
|
|
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MEMORY,
|
|
|
|
g_param_spec_enum ("memory", "memory", "memory", GST_TYPE_SID_MEMORY,
|
2004-03-15 19:32:25 +00:00
|
|
|
MPU_PLAYSID_ENVIRONMENT, (GParamFlags) G_PARAM_READWRITE));
|
2004-03-14 23:20:40 +00:00
|
|
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FILTER,
|
|
|
|
g_param_spec_boolean ("filter", "filter", "filter", TRUE,
|
2004-03-15 19:32:25 +00:00
|
|
|
(GParamFlags) G_PARAM_READWRITE));
|
2004-03-14 23:20:40 +00:00
|
|
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MEASURED_VOLUME,
|
|
|
|
g_param_spec_boolean ("measured_volume", "measured_volume",
|
2004-03-15 19:32:25 +00:00
|
|
|
"measured_volume", TRUE, (GParamFlags) G_PARAM_READWRITE));
|
2004-03-14 23:20:40 +00:00
|
|
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MOS8580,
|
|
|
|
g_param_spec_boolean ("mos8580", "mos8580", "mos8580", TRUE,
|
2004-03-15 19:32:25 +00:00
|
|
|
(GParamFlags) G_PARAM_READWRITE));
|
2004-03-14 23:20:40 +00:00
|
|
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FORCE_SPEED,
|
|
|
|
g_param_spec_boolean ("force_speed", "force_speed", "force_speed", TRUE,
|
2004-03-15 19:32:25 +00:00
|
|
|
(GParamFlags) G_PARAM_READWRITE));
|
2003-06-03 18:23:14 +00:00
|
|
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BLOCKSIZE,
|
2004-03-14 23:20:40 +00:00
|
|
|
g_param_spec_ulong ("blocksize", "Block size",
|
2004-03-15 19:32:25 +00:00
|
|
|
"Size in bytes to output per buffer", 1, G_MAXULONG,
|
|
|
|
DEFAULT_BLOCKSIZE, (GParamFlags) G_PARAM_READWRITE));
|
2002-12-08 01:14:59 +00:00
|
|
|
g_object_class_install_property (gobject_class, ARG_METADATA,
|
2004-03-14 23:20:40 +00:00
|
|
|
g_param_spec_boxed ("metadata", "Metadata", "Metadata", GST_TYPE_CAPS,
|
2004-03-15 19:32:25 +00:00
|
|
|
(GParamFlags) G_PARAM_READABLE));
|
2001-12-23 15:41:33 +00:00
|
|
|
}
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
static void
|
|
|
|
gst_siddec_init (GstSidDec * siddec)
|
2001-12-23 15:41:33 +00:00
|
|
|
{
|
2004-03-14 23:20:40 +00:00
|
|
|
siddec->sinkpad =
|
|
|
|
gst_pad_new_from_template (gst_static_pad_template_get (&sink_templ),
|
|
|
|
"sink");
|
2002-06-02 20:09:43 +00:00
|
|
|
gst_pad_set_query_function (siddec->sinkpad, NULL);
|
2005-05-06 17:24:44 +00:00
|
|
|
gst_pad_set_event_function (siddec->sinkpad, gst_siddec_sink_event);
|
|
|
|
gst_pad_set_chain_function (siddec->sinkpad, gst_siddec_chain);
|
|
|
|
gst_element_add_pad (GST_ELEMENT (siddec), siddec->sinkpad);
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
siddec->srcpad =
|
|
|
|
gst_pad_new_from_template (gst_static_pad_template_get (&src_templ),
|
|
|
|
"src");
|
2002-06-02 20:09:43 +00:00
|
|
|
gst_pad_set_event_function (siddec->srcpad, NULL);
|
|
|
|
gst_pad_set_query_function (siddec->srcpad, gst_siddec_src_query);
|
2001-12-23 15:41:33 +00:00
|
|
|
gst_element_add_pad (GST_ELEMENT (siddec), siddec->srcpad);
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
siddec->engine = new emuEngine ();
|
|
|
|
siddec->tune = new sidTune (0);
|
|
|
|
siddec->config = (emuConfig *) g_malloc (sizeof (emuConfig));
|
|
|
|
|
2004-03-15 19:32:25 +00:00
|
|
|
siddec->config->frequency = 44100; // frequency
|
|
|
|
siddec->config->bitsPerSample = SIDEMU_16BIT; // bits per sample
|
|
|
|
siddec->config->sampleFormat = SIDEMU_SIGNED_PCM; // sample fomat
|
|
|
|
siddec->config->channels = SIDEMU_STEREO; // channels
|
|
|
|
|
|
|
|
siddec->config->sidChips = 0; // -
|
|
|
|
siddec->config->volumeControl = SIDEMU_NONE; // volume control
|
|
|
|
siddec->config->mos8580 = TRUE; // mos8580
|
|
|
|
siddec->config->measuredVolume = TRUE; // measure volume
|
|
|
|
siddec->config->emulateFilter = TRUE; // emulate filter
|
|
|
|
siddec->config->filterFs = SIDEMU_DEFAULTFILTERFS; // filter Fs
|
|
|
|
siddec->config->filterFm = SIDEMU_DEFAULTFILTERFM; // filter Fm
|
|
|
|
siddec->config->filterFt = SIDEMU_DEFAULTFILTERFT; // filter Ft
|
|
|
|
siddec->config->memoryMode = MPU_PLAYSID_ENVIRONMENT; // memory mode
|
|
|
|
siddec->config->clockSpeed = SIDTUNE_CLOCK_PAL; // clock speed
|
|
|
|
siddec->config->forceSongSpeed = TRUE; // force song speed
|
|
|
|
siddec->config->digiPlayerScans = 0; // digi player scans
|
|
|
|
siddec->config->autoPanning = SIDEMU_NONE; // auto panning
|
2001-12-23 15:41:33 +00:00
|
|
|
|
|
|
|
siddec->engine->setConfig (*siddec->config);
|
|
|
|
siddec->engine->setDefaultFilterStrength ();
|
|
|
|
|
|
|
|
siddec->tune_buffer = (guchar *) g_malloc (maxSidtuneFileLen);
|
|
|
|
siddec->tune_len = 0;
|
|
|
|
siddec->tune_number = 1;
|
2002-06-02 20:09:43 +00:00
|
|
|
siddec->total_bytes = 0;
|
2003-06-03 18:23:14 +00:00
|
|
|
siddec->blocksize = DEFAULT_BLOCKSIZE;
|
2001-12-23 15:41:33 +00:00
|
|
|
}
|
|
|
|
|
2003-12-22 01:47:08 +00:00
|
|
|
#if 0
|
2004-03-14 23:20:40 +00:00
|
|
|
static void
|
|
|
|
update_metadata (GstSidDec * siddec)
|
2002-12-08 01:14:59 +00:00
|
|
|
{
|
|
|
|
sidTuneInfo info;
|
|
|
|
GstProps *props;
|
|
|
|
GstPropsEntry *entry;
|
|
|
|
|
|
|
|
if (siddec->tune->getInfo (info)) {
|
|
|
|
props = gst_props_empty_new ();
|
|
|
|
|
|
|
|
if (info.nameString) {
|
2003-12-22 01:47:08 +00:00
|
|
|
entry = gst_props_entry_new ("Title", G_TYPE_STRING (info.nameString));
|
2002-12-08 01:14:59 +00:00
|
|
|
gst_props_add_entry (props, entry);
|
|
|
|
}
|
|
|
|
if (info.authorString) {
|
2004-03-14 23:20:40 +00:00
|
|
|
entry =
|
2004-03-15 19:32:25 +00:00
|
|
|
gst_props_entry_new ("Composer", G_TYPE_STRING (info.authorString));
|
2002-12-08 01:14:59 +00:00
|
|
|
gst_props_add_entry (props, entry);
|
|
|
|
}
|
|
|
|
if (info.copyrightString) {
|
2004-03-14 23:20:40 +00:00
|
|
|
entry =
|
2004-03-15 19:32:25 +00:00
|
|
|
gst_props_entry_new ("Copyright",
|
|
|
|
G_TYPE_STRING (info.copyrightString));
|
2002-12-08 01:14:59 +00:00
|
|
|
gst_props_add_entry (props, entry);
|
|
|
|
}
|
|
|
|
|
2003-01-15 21:06:57 +00:00
|
|
|
siddec->metadata = gst_caps_new ("sid_metadata",
|
2004-03-15 19:32:25 +00:00
|
|
|
"application/x-gst-metadata", props);
|
2002-12-08 01:14:59 +00:00
|
|
|
|
|
|
|
g_object_notify (G_OBJECT (siddec), "metadata");
|
|
|
|
}
|
|
|
|
}
|
2003-12-22 01:47:08 +00:00
|
|
|
#endif
|
2002-12-08 01:14:59 +00:00
|
|
|
|
|
|
|
#define GET_FIXED_INT(caps, name, dest) \
|
|
|
|
G_STMT_START { \
|
|
|
|
if (gst_caps_has_fixed_property (caps, name)) \
|
2003-12-22 01:47:08 +00:00
|
|
|
gst_structure_get_int (structure, name, (gint*)dest); \
|
2002-12-08 01:14:59 +00:00
|
|
|
} G_STMT_END
|
|
|
|
#define GET_FIXED_BOOLEAN(caps, name, dest) \
|
|
|
|
G_STMT_START { \
|
|
|
|
if (gst_caps_has_fixed_property (caps, name)) \
|
2003-12-22 01:47:08 +00:00
|
|
|
gst_structure_get_boolean (structure, name, dest); \
|
2002-12-08 01:14:59 +00:00
|
|
|
} G_STMT_END
|
|
|
|
|
|
|
|
static gboolean
|
2004-03-14 23:20:40 +00:00
|
|
|
siddec_negotiate (GstSidDec * siddec)
|
2002-12-08 01:14:59 +00:00
|
|
|
{
|
|
|
|
GstCaps *allowed;
|
|
|
|
gboolean sign = TRUE;
|
2004-06-18 11:46:32 +00:00
|
|
|
gint width = 16, depth = 16;
|
2003-12-22 01:47:08 +00:00
|
|
|
GstStructure *structure;
|
2004-06-18 11:46:32 +00:00
|
|
|
int rate = 22050;
|
|
|
|
int channels = 2;
|
2002-12-08 01:14:59 +00:00
|
|
|
|
|
|
|
allowed = gst_pad_get_allowed_caps (siddec->srcpad);
|
2005-10-20 08:30:33 +00:00
|
|
|
if (!allowed) {
|
|
|
|
GST_DEBUG_OBJECT (siddec, "could not get allowed caps");
|
2002-12-08 01:14:59 +00:00
|
|
|
return FALSE;
|
2005-10-20 08:30:33 +00:00
|
|
|
}
|
|
|
|
GST_DEBUG_OBJECT (siddec, "allowed caps: " GST_PTR_FORMAT, allowed);
|
2002-12-08 01:14:59 +00:00
|
|
|
|
2003-12-22 01:47:08 +00:00
|
|
|
structure = gst_caps_get_structure (allowed, 0);
|
|
|
|
|
|
|
|
gst_structure_get_int (structure, "width", &width);
|
|
|
|
gst_structure_get_int (structure, "depth", &depth);
|
2002-12-08 01:14:59 +00:00
|
|
|
|
|
|
|
if (width && depth && width != depth) {
|
2005-10-20 08:30:33 +00:00
|
|
|
GST_DEBUG_OBJECT (siddec, "width %d and depth %d are different",
|
|
|
|
width, depth);
|
2002-12-08 01:14:59 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
width = width | depth;
|
2004-03-14 23:20:40 +00:00
|
|
|
|
2002-12-08 01:14:59 +00:00
|
|
|
if (width) {
|
|
|
|
siddec->config->bitsPerSample = width;
|
|
|
|
}
|
|
|
|
|
2003-12-22 01:47:08 +00:00
|
|
|
gst_structure_get_boolean (structure, "signed", &sign);
|
|
|
|
gst_structure_get_int (structure, "rate", &rate);
|
|
|
|
siddec->config->frequency = rate;
|
|
|
|
gst_structure_get_int (structure, "channels", &channels);
|
|
|
|
siddec->config->channels = channels;
|
2002-12-08 01:14:59 +00:00
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
siddec->config->sampleFormat =
|
|
|
|
(sign ? SIDEMU_SIGNED_PCM : SIDEMU_UNSIGNED_PCM);
|
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
gst_pad_set_caps (siddec->srcpad,
|
|
|
|
gst_caps_new_simple ("audio/x-raw-int",
|
|
|
|
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
|
|
|
"signed", G_TYPE_BOOLEAN, sign,
|
|
|
|
"width", G_TYPE_INT, siddec->config->bitsPerSample,
|
|
|
|
"depth", G_TYPE_INT, siddec->config->bitsPerSample,
|
|
|
|
"rate", G_TYPE_INT, siddec->config->frequency,
|
|
|
|
"channels", G_TYPE_INT, siddec->config->channels, NULL));
|
2002-12-08 01:14:59 +00:00
|
|
|
|
|
|
|
siddec->engine->setConfig (*siddec->config);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
static void
|
2005-05-06 17:24:44 +00:00
|
|
|
play_loop (GstPad * pad)
|
2001-12-23 15:41:33 +00:00
|
|
|
{
|
2005-05-06 17:24:44 +00:00
|
|
|
GstFlowReturn ret;
|
2001-12-23 15:41:33 +00:00
|
|
|
GstSidDec *siddec;
|
2005-05-06 17:24:44 +00:00
|
|
|
GstBuffer *out;
|
|
|
|
gint64 value, offset, time;
|
2005-05-12 20:05:19 +00:00
|
|
|
GstFormat format;
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
siddec = GST_SIDDEC (GST_PAD_PARENT (pad));
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
out = gst_buffer_new_and_alloc (siddec->blocksize);
|
|
|
|
gst_buffer_set_caps (out, GST_PAD_CAPS (pad));
|
2003-10-09 02:23:01 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
sidEmuFillBuffer (*siddec->engine, *siddec->tune,
|
|
|
|
GST_BUFFER_DATA (out), GST_BUFFER_SIZE (out));
|
2004-03-14 23:20:40 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
/* get offset in samples */
|
|
|
|
format = GST_FORMAT_DEFAULT;
|
2005-05-12 20:05:19 +00:00
|
|
|
gst_siddec_src_convert (siddec->srcpad,
|
|
|
|
GST_FORMAT_BYTES, siddec->total_bytes, &format, &offset);
|
2005-05-06 17:24:44 +00:00
|
|
|
GST_BUFFER_OFFSET (out) = offset;
|
2002-07-08 19:38:26 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
/* get current timestamp */
|
2005-10-20 08:30:33 +00:00
|
|
|
format = GST_FORMAT_TIME;
|
2005-05-12 20:05:19 +00:00
|
|
|
gst_siddec_src_convert (siddec->srcpad,
|
|
|
|
GST_FORMAT_BYTES, siddec->total_bytes, &format, &time);
|
2005-05-06 17:24:44 +00:00
|
|
|
GST_BUFFER_TIMESTAMP (out) = time;
|
2003-10-09 02:23:01 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
/* update position and get new timestamp to calculate duration */
|
|
|
|
siddec->total_bytes += siddec->blocksize;
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
/* get offset in samples */
|
|
|
|
format = GST_FORMAT_DEFAULT;
|
2005-05-12 20:05:19 +00:00
|
|
|
gst_siddec_src_convert (siddec->srcpad,
|
|
|
|
GST_FORMAT_BYTES, siddec->total_bytes, &format, &value);
|
2005-05-06 17:24:44 +00:00
|
|
|
GST_BUFFER_OFFSET_END (out) = value;
|
|
|
|
|
|
|
|
format = GST_FORMAT_TIME;
|
2005-05-12 20:05:19 +00:00
|
|
|
gst_siddec_src_convert (siddec->srcpad,
|
|
|
|
GST_FORMAT_BYTES, siddec->total_bytes, &format, &value);
|
2005-05-06 17:24:44 +00:00
|
|
|
GST_BUFFER_DURATION (out) = value - time;
|
|
|
|
|
|
|
|
if ((ret = gst_pad_push (siddec->srcpad, out)) != GST_FLOW_OK)
|
|
|
|
goto pause;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
pause:
|
|
|
|
{
|
2005-05-25 12:58:23 +00:00
|
|
|
gst_pad_pause_task (pad);
|
2001-12-23 23:00:59 +00:00
|
|
|
}
|
2005-05-06 17:24:44 +00:00
|
|
|
}
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
static gboolean
|
|
|
|
start_play_tune (GstSidDec * siddec)
|
|
|
|
{
|
|
|
|
gboolean res;
|
2002-12-08 01:14:59 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
if (!siddec->tune->load (siddec->tune_buffer, siddec->tune_len))
|
|
|
|
goto could_not_load;
|
|
|
|
|
|
|
|
//update_metadata (siddec);
|
2002-12-08 01:14:59 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
if (!siddec_negotiate (siddec))
|
|
|
|
goto could_not_negotiate;
|
|
|
|
|
|
|
|
if (!sidEmuInitializeSong (*siddec->engine, *siddec->tune,
|
|
|
|
siddec->tune_number))
|
|
|
|
goto could_not_init;
|
|
|
|
|
2005-10-20 08:30:33 +00:00
|
|
|
gst_pad_push_event (siddec->srcpad,
|
|
|
|
gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_TIME, 0, -1, 0));
|
|
|
|
|
2005-05-25 12:58:23 +00:00
|
|
|
res = gst_pad_start_task (siddec->srcpad,
|
|
|
|
(GstTaskFunction) play_loop, siddec->srcpad);
|
2005-05-06 17:24:44 +00:00
|
|
|
return res;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
could_not_load:
|
|
|
|
{
|
2005-10-20 08:30:33 +00:00
|
|
|
GST_ELEMENT_ERROR (siddec, LIBRARY, INIT,
|
|
|
|
("Could not load tune"), ("Could not load tune"));
|
2005-05-06 17:24:44 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
could_not_negotiate:
|
|
|
|
{
|
2005-10-20 08:30:33 +00:00
|
|
|
GST_ELEMENT_ERROR (siddec, CORE, NEGOTIATION,
|
|
|
|
("Could not negotiate format"), ("Could not negotiate format"));
|
2005-05-06 17:24:44 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
could_not_init:
|
|
|
|
{
|
2005-10-20 08:30:33 +00:00
|
|
|
GST_ELEMENT_ERROR (siddec, LIBRARY, INIT,
|
|
|
|
("Could not initialize song"), ("Could not initialize song"));
|
2005-05-06 17:24:44 +00:00
|
|
|
return FALSE;
|
2001-12-23 23:00:59 +00:00
|
|
|
}
|
2005-05-06 17:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gst_siddec_sink_event (GstPad * pad, GstEvent * event)
|
|
|
|
{
|
|
|
|
GstSidDec *siddec;
|
|
|
|
gboolean res;
|
|
|
|
|
|
|
|
siddec = GST_SIDDEC (GST_PAD_PARENT (pad));
|
|
|
|
|
|
|
|
switch (GST_EVENT_TYPE (event)) {
|
|
|
|
case GST_EVENT_EOS:
|
|
|
|
GST_STREAM_LOCK (pad);
|
|
|
|
res = start_play_tune (siddec);
|
|
|
|
GST_STREAM_UNLOCK (pad);
|
|
|
|
break;
|
Various event updates and cleanups.
Original commit message from CVS:
* ext/amrnb/amrnbparse.c: (gst_amrnbparse_event),
(gst_amrnbparse_loop):
* ext/dv/gstdvdec.c: (gst_dvdec_handle_sink_event),
(gst_dvdec_handle_src_event), (gst_dvdec_decode_frame):
* ext/mad/gstid3tag.c: (gst_id3_tag_src_event),
(gst_id3_tag_sink_event), (gst_id3_tag_chain):
* ext/mad/gstmad.c: (gst_mad_src_query), (index_seek),
(normal_seek), (gst_mad_sink_event), (gst_mad_chain):
* ext/mpeg2dec/gstmpeg2dec.c:
* ext/shout2/gstshout2.c: (gst_shout2send_event):
* ext/sidplay/gstsiddec.cc:
* gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_event),
(gst_avi_demux_send_event), (gst_avi_demux_stream_header),
(gst_avi_demux_handle_seek), (gst_avi_demux_process_next_entry):
* gst/goom/gstgoom.c: (gst_goom_event):
* gst/realmedia/rmdemux.c: (gst_rmdemux_sink_event),
(gst_rmdemux_chain), (gst_rmdemux_send_event),
(gst_rmdemux_add_stream):
* gst/wavparse/gstwavparse.c: (gst_wavparse_handle_seek),
(gst_wavparse_stream_headers), (gst_wavparse_stream_data),
(gst_wavparse_loop), (gst_wavparse_srcpad_event):
Various event updates and cleanups.
2005-07-27 18:37:25 +00:00
|
|
|
case GST_EVENT_NEWSEGMENT:
|
2005-05-06 17:24:44 +00:00
|
|
|
res = FALSE;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
res = FALSE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
gst_event_unref (event);
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstFlowReturn
|
|
|
|
gst_siddec_chain (GstPad * pad, GstBuffer * buffer)
|
|
|
|
{
|
|
|
|
GstSidDec *siddec;
|
|
|
|
guint64 size;
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
siddec = GST_SIDDEC (GST_PAD_PARENT (pad));
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
size = GST_BUFFER_SIZE (buffer);
|
|
|
|
if (siddec->tune_len + size > maxSidtuneFileLen)
|
|
|
|
goto overflow;
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
memcpy (siddec->tune_buffer + siddec->tune_len, GST_BUFFER_DATA (buffer),
|
|
|
|
size);
|
|
|
|
siddec->tune_len += size;
|
2002-06-02 20:09:43 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
gst_buffer_unref (buffer);
|
2004-06-18 11:46:32 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
return GST_FLOW_OK;
|
2002-06-02 20:09:43 +00:00
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
overflow:
|
|
|
|
{
|
|
|
|
return GST_FLOW_ERROR;
|
2001-12-23 23:00:59 +00:00
|
|
|
}
|
2001-12-23 15:41:33 +00:00
|
|
|
}
|
|
|
|
|
2002-06-02 20:09:43 +00:00
|
|
|
static gboolean
|
2004-03-14 23:20:40 +00:00
|
|
|
gst_siddec_src_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
|
|
|
|
GstFormat * dest_format, gint64 * dest_value)
|
2002-06-02 20:09:43 +00:00
|
|
|
{
|
|
|
|
gboolean res = TRUE;
|
|
|
|
guint scale = 1;
|
|
|
|
GstSidDec *siddec;
|
|
|
|
gint bytes_per_sample;
|
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
siddec = GST_SIDDEC (GST_PAD_PARENT (pad));
|
2002-06-02 20:09:43 +00:00
|
|
|
|
2005-05-12 20:05:19 +00:00
|
|
|
if (src_format == *dest_format) {
|
|
|
|
*dest_value = src_value;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
bytes_per_sample =
|
|
|
|
(siddec->config->bitsPerSample >> 3) * siddec->config->channels;
|
2002-06-02 20:09:43 +00:00
|
|
|
|
|
|
|
switch (src_format) {
|
|
|
|
case GST_FORMAT_BYTES:
|
|
|
|
switch (*dest_format) {
|
2004-03-15 19:32:25 +00:00
|
|
|
case GST_FORMAT_DEFAULT:
|
|
|
|
if (bytes_per_sample == 0)
|
|
|
|
return FALSE;
|
|
|
|
*dest_value = src_value / bytes_per_sample;
|
|
|
|
break;
|
|
|
|
case GST_FORMAT_TIME:
|
|
|
|
{
|
|
|
|
gint byterate = bytes_per_sample * siddec->config->frequency;
|
|
|
|
|
|
|
|
if (byterate == 0)
|
|
|
|
return FALSE;
|
|
|
|
*dest_value = src_value * GST_SECOND / byterate;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
res = FALSE;
|
2002-06-02 20:09:43 +00:00
|
|
|
}
|
|
|
|
break;
|
2003-05-24 10:41:58 +00:00
|
|
|
case GST_FORMAT_DEFAULT:
|
2002-06-02 20:09:43 +00:00
|
|
|
switch (*dest_format) {
|
2004-03-15 19:32:25 +00:00
|
|
|
case GST_FORMAT_BYTES:
|
|
|
|
*dest_value = src_value * bytes_per_sample;
|
|
|
|
break;
|
|
|
|
case GST_FORMAT_TIME:
|
|
|
|
if (siddec->config->frequency == 0)
|
|
|
|
return FALSE;
|
|
|
|
*dest_value = src_value * GST_SECOND / siddec->config->frequency;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
res = FALSE;
|
2002-06-02 20:09:43 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case GST_FORMAT_TIME:
|
|
|
|
switch (*dest_format) {
|
2004-03-15 19:32:25 +00:00
|
|
|
case GST_FORMAT_BYTES:
|
|
|
|
scale = bytes_per_sample;
|
|
|
|
/* fallthrough */
|
|
|
|
case GST_FORMAT_DEFAULT:
|
|
|
|
*dest_value =
|
|
|
|
src_value * scale * siddec->config->frequency / GST_SECOND;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
res = FALSE;
|
2002-06-02 20:09:43 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
res = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2005-05-12 20:05:19 +00:00
|
|
|
gst_siddec_src_query (GstPad * pad, GstQuery * query)
|
2002-06-02 20:09:43 +00:00
|
|
|
{
|
|
|
|
gboolean res = TRUE;
|
|
|
|
GstSidDec *siddec;
|
|
|
|
|
2005-05-06 17:24:44 +00:00
|
|
|
siddec = GST_SIDDEC (GST_PAD_PARENT (pad));
|
2002-06-02 20:09:43 +00:00
|
|
|
|
2005-05-12 20:05:19 +00:00
|
|
|
switch (GST_QUERY_TYPE (query)) {
|
2002-12-30 17:53:18 +00:00
|
|
|
case GST_QUERY_POSITION:
|
2005-05-12 20:05:19 +00:00
|
|
|
{
|
|
|
|
GstFormat format;
|
|
|
|
gint64 current;
|
|
|
|
|
2005-10-19 16:01:35 +00:00
|
|
|
gst_query_parse_position (query, &format, NULL);
|
2005-05-12 20:05:19 +00:00
|
|
|
|
2002-06-02 20:09:43 +00:00
|
|
|
/* we only know about our bytes, convert to requested format */
|
2004-06-18 11:46:32 +00:00
|
|
|
res &= gst_siddec_src_convert (pad,
|
2005-05-12 20:05:19 +00:00
|
|
|
GST_FORMAT_BYTES, siddec->total_bytes, &format, ¤t);
|
|
|
|
if (res) {
|
2005-10-19 16:01:35 +00:00
|
|
|
gst_query_set_position (query, format, current);
|
2005-05-12 20:05:19 +00:00
|
|
|
}
|
2002-06-02 20:09:43 +00:00
|
|
|
break;
|
2005-05-12 20:05:19 +00:00
|
|
|
}
|
2002-06-02 20:09:43 +00:00
|
|
|
default:
|
|
|
|
res = FALSE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
static void
|
|
|
|
gst_siddec_set_property (GObject * object, guint prop_id, const GValue * value,
|
|
|
|
GParamSpec * pspec)
|
2001-12-23 15:41:33 +00:00
|
|
|
{
|
|
|
|
GstSidDec *siddec;
|
|
|
|
|
|
|
|
/* it's not null if we got it, but it might not be ours */
|
2004-03-14 23:20:40 +00:00
|
|
|
g_return_if_fail (GST_IS_SIDDEC (object));
|
|
|
|
siddec = GST_SIDDEC (object);
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
switch (prop_id) {
|
2001-12-23 15:41:33 +00:00
|
|
|
case ARG_TUNE:
|
|
|
|
siddec->tune_number = g_value_get_int (value);
|
|
|
|
break;
|
|
|
|
case ARG_CLOCK:
|
|
|
|
siddec->config->clockSpeed = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case ARG_MEMORY:
|
|
|
|
siddec->config->memoryMode = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case ARG_FILTER:
|
|
|
|
siddec->config->emulateFilter = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case ARG_MEASURED_VOLUME:
|
|
|
|
siddec->config->measuredVolume = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case ARG_MOS8580:
|
|
|
|
siddec->config->mos8580 = g_value_get_boolean (value);
|
|
|
|
break;
|
2003-06-03 18:23:14 +00:00
|
|
|
case ARG_BLOCKSIZE:
|
|
|
|
siddec->blocksize = g_value_get_ulong (value);
|
|
|
|
break;
|
2001-12-23 15:41:33 +00:00
|
|
|
case ARG_FORCE_SPEED:
|
|
|
|
siddec->config->forceSongSpeed = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
/* G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
siddec->engine->setConfig (*siddec->config);
|
|
|
|
}
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
static void
|
|
|
|
gst_siddec_get_property (GObject * object, guint prop_id, GValue * value,
|
|
|
|
GParamSpec * pspec)
|
2001-12-23 15:41:33 +00:00
|
|
|
{
|
|
|
|
GstSidDec *siddec;
|
|
|
|
|
|
|
|
/* it's not null if we got it, but it might not be ours */
|
2004-03-14 23:20:40 +00:00
|
|
|
g_return_if_fail (GST_IS_SIDDEC (object));
|
|
|
|
siddec = GST_SIDDEC (object);
|
2001-12-23 15:41:33 +00:00
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
switch (prop_id) {
|
2001-12-23 15:41:33 +00:00
|
|
|
case ARG_TUNE:
|
|
|
|
g_value_set_int (value, siddec->tune_number);
|
|
|
|
break;
|
|
|
|
case ARG_CLOCK:
|
|
|
|
g_value_set_enum (value, siddec->config->clockSpeed);
|
|
|
|
break;
|
|
|
|
case ARG_MEMORY:
|
|
|
|
g_value_set_enum (value, siddec->config->memoryMode);
|
|
|
|
break;
|
|
|
|
case ARG_FILTER:
|
|
|
|
g_value_set_boolean (value, siddec->config->emulateFilter);
|
|
|
|
break;
|
|
|
|
case ARG_MEASURED_VOLUME:
|
|
|
|
g_value_set_boolean (value, siddec->config->measuredVolume);
|
|
|
|
break;
|
|
|
|
case ARG_MOS8580:
|
|
|
|
g_value_set_boolean (value, siddec->config->mos8580);
|
|
|
|
break;
|
|
|
|
case ARG_FORCE_SPEED:
|
|
|
|
g_value_set_boolean (value, siddec->config->forceSongSpeed);
|
|
|
|
break;
|
2003-06-03 18:23:14 +00:00
|
|
|
case ARG_BLOCKSIZE:
|
|
|
|
g_value_set_ulong (value, siddec->blocksize);
|
|
|
|
break;
|
2002-12-08 01:14:59 +00:00
|
|
|
case ARG_METADATA:
|
|
|
|
g_value_set_boxed (value, siddec->metadata);
|
|
|
|
break;
|
2001-12-23 15:41:33 +00:00
|
|
|
default:
|
|
|
|
/* G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2004-03-14 23:20:40 +00:00
|
|
|
plugin_init (GstPlugin * plugin)
|
2001-12-23 15:41:33 +00:00
|
|
|
{
|
2003-11-03 20:16:05 +00:00
|
|
|
return gst_element_register (plugin, "siddec", GST_RANK_PRIMARY,
|
|
|
|
GST_TYPE_SIDDEC);
|
2001-12-23 15:41:33 +00:00
|
|
|
}
|
|
|
|
|
2004-03-14 23:20:40 +00:00
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
|
|
GST_VERSION_MINOR,
|
|
|
|
"siddec",
|
|
|
|
"Uses libsid to decode .sid files",
|
|
|
|
plugin_init, VERSION, "GPL", GST_PACKAGE, GST_ORIGIN)
|