diff options
author | Andy Wingo <wingo@pobox.com> | 2002-04-20 21:42:51 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2002-04-20 21:42:51 +0000 |
commit | 6863dd92408eb5bd758e6c297324e6b2dc81042b (patch) | |
tree | ff4c1f7d2bb3e04cd8f3d7e4e2324b8c96fb260f | |
parent | 826f1e165fc6b301735e9861fdae2be3544abe0b (diff) | |
download | gst-plugins-bad-6863dd92408eb5bd758e6c297324e6b2dc81042b.tar.gz gst-plugins-bad-6863dd92408eb5bd758e6c297324e6b2dc81042b.tar.bz2 gst-plugins-bad-6863dd92408eb5bd758e6c297324e6b2dc81042b.zip |
a hack to work around intltool's brokenness a current check for mpeg2dec details->klass reorganizations an element br...
Original commit message from CVS:
* a hack to work around intltool's brokenness
* a current check for mpeg2dec
* details->klass reorganizations
* an element browser that uses details->klass
* separated cdxa parse out from the avi directory
33 files changed, 505 insertions, 48 deletions
diff --git a/configure.ac b/configure.ac index 3ebe17d3..99d8e14a 100644 --- a/configure.ac +++ b/configure.ac @@ -166,7 +166,7 @@ GST_PLUGIN_LDFLAGS='-module -avoid-version' AC_SUBST(GST_PLUGIN_LDFLAGS) GST_PLUGINS_ALL="\ - ac3parse adder audioscale auparse avi chart\ + ac3parse adder audioscale auparse avi cdxaparse chart\ cutter deinterlace flx goom intfloat law level\ median mpeg1enc mpeg1sys mpeg1videoparse mpeg2enc mpeg2sub\ mpegaudio mpegaudioparse mpegstream mpegtypes modplug\ @@ -744,6 +744,7 @@ gst/adder/Makefile gst/audioscale/Makefile gst/auparse/Makefile gst/avi/Makefile +gst/cdxaparse/Makefile gst/chart/Makefile gst/cutter/Makefile gst/deinterlace/Makefile diff --git a/ext/arts/gst_arts.c b/ext/arts/gst_arts.c index f3b45b41..f85214a0 100644 --- a/ext/arts/gst_arts.c +++ b/ext/arts/gst_arts.c @@ -29,10 +29,10 @@ static GstElementDetails gst_arts_details = { "aRts plugin", "Filter/Audio", - "aRts plugin", + "aRts wrapper filter", VERSION, - "Erik Walthinsen <omega@temple-baptist.com, -Stefan Westerfeld <stefan@space.twc.de>", + "Erik Walthinsen <omega@temple-baptist.com,\n" + "Stefan Westerfeld <stefan@space.twc.de>", "(C) 2000", }; diff --git a/ext/artsd/gstartsdsink.c b/ext/artsd/gstartsdsink.c index 1933c312..81a06a30 100644 --- a/ext/artsd/gstartsdsink.c +++ b/ext/artsd/gstartsdsink.c @@ -25,7 +25,7 @@ /* elementfactory information */ static GstElementDetails artsdsink_details = { "aRtsd audio sink", - "Sink/Artsdsink", + "Sink/Audio", "Plays audio to an aRts server", VERSION, "Richard Boulton <richard-gst@tartarus.org>", diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c index 5a307377..77e1637d 100644 --- a/ext/audiofile/gstafsink.c +++ b/ext/audiofile/gstafsink.c @@ -27,8 +27,8 @@ static GstElementDetails afsink_details = { "Audiofile Sink", - "Sink", - "Audiofile sink for audio/raw", + "Sink/Audio", + "Write audio streams to disk using libaudiofile", VERSION, "Thomas <thomas@apestaart.org>", "(C) 2001" diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c index 92483179..751b3cec 100644 --- a/ext/audiofile/gstafsrc.c +++ b/ext/audiofile/gstafsrc.c @@ -28,8 +28,8 @@ static GstElementDetails afsrc_details = { "Audiofile Src", - "Src", - "Audiofile src for audio/raw", + "Source/Audio", + "Read audio files from disk using libaudiofile", VERSION, "Thomas <thomas@apestaart.org>", "(C) 2001" diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c index 0e2f4168..35207618 100644 --- a/ext/gsm/gstgsmdec.c +++ b/ext/gsm/gstgsmdec.c @@ -27,7 +27,7 @@ extern GstPadTemplate *gsmdec_src_template, *gsmdec_sink_template; /* elementfactory information */ GstElementDetails gst_gsmdec_details = { "gsm audio decoder", - "Filter/Decoder/Audio", + "Codec/Audio/Decoder", ".gsm", VERSION, "Wim Taymans <wim.taymans@chello.be>", diff --git a/ext/gsm/gstgsmenc.c b/ext/gsm/gstgsmenc.c index e9a61cde..633863c1 100644 --- a/ext/gsm/gstgsmenc.c +++ b/ext/gsm/gstgsmenc.c @@ -27,7 +27,7 @@ extern GstPadTemplate *gsmenc_src_template, *gsmenc_sink_template; /* elementfactory information */ GstElementDetails gst_gsmenc_details = { "gsm audio encoder", - "Filter/Encoder/Audio", + "Codec/Audio/Encoder", ".gsm", VERSION, "Wim Taymans <wim.taymans@chello.be>", diff --git a/ext/hermes/gstcolorspace.c b/ext/hermes/gstcolorspace.c index 5e081a79..9cdaf3bb 100644 --- a/ext/hermes/gstcolorspace.c +++ b/ext/hermes/gstcolorspace.c @@ -25,8 +25,8 @@ static GstElementDetails colorspace_details = { "Colorspace converter", - "Filter/Effect", - "Converts video from one colorspace to another", + "Filter/Video", + "Converts video from one colorspace to another using libhermes", VERSION, "Wim Taymans <wim.taymans@chello.be>", "(C) 2001", diff --git a/ext/jack/gstjack.c b/ext/jack/gstjack.c index fc297750..87ce638c 100644 --- a/ext/jack/gstjack.c +++ b/ext/jack/gstjack.c @@ -37,7 +37,7 @@ static GstElementDetails gst_jack_bin_details = { "Jack Bin", - "Bin/Audio", + "Generic/Bin", "Jack processing bin: see README for more info", VERSION, "Andy Wingo <wingo@pobox.com>", @@ -451,6 +451,7 @@ plugin_init (GModule *module, GstPlugin *plugin) factory = gst_element_factory_new ("jackbin", GST_TYPE_JACK_BIN, &gst_jack_bin_details); g_return_val_if_fail (factory != NULL, FALSE); + gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); factory = gst_element_factory_new ("jacksrc", GST_TYPE_JACK_SRC, &gst_jack_src_details); g_return_val_if_fail (factory != NULL, FALSE); diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index 081f03d8..4ad7d3fd 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -398,6 +398,7 @@ gst_ladspa_init (GstLADSPA *ladspa) ladspa->newcaps = FALSE; ladspa->activated = FALSE; ladspa->bufpool = NULL; + ladspa->inplace_broken = LADSPA_IS_INPLACE_BROKEN(ladspa->descriptor->Properties); if (sinkcount==0 && srccount == 1) { /* get mode (no sink pads) */ @@ -719,7 +720,6 @@ gst_ladspa_loop(GstElement *element) GstBuffer **buffers_in, **buffers_out; GstBufferPool *bufpool; GstByteStream **bytestreams; - gboolean inplace_broken; GstLADSPA *ladspa = (GstLADSPA *)element; GstLADSPAClass *oclass = (GstLADSPAClass*)(G_OBJECT_GET_CLASS (ladspa)); @@ -799,7 +799,7 @@ gst_ladspa_loop(GstElement *element) /* we now have a full set of buffers_in. * now share or create the buffers_out */ for (i=0 ; i<numsrcpads ; i++){ - if (i <= numsinkpads && !inplace_broken){ + if (i <= numsinkpads && !ladspa->inplace_broken){ /* we can share buffers */ buffers_out[i] = buffers_in[i]; data_out[i] = data_in[i]; @@ -845,7 +845,7 @@ gst_ladspa_loop(GstElement *element) buffers_out[i] = NULL; } for (i=0 ; i<numsinkpads ; i++) { - if (i > numsrcpads || inplace_broken){ + if (i > numsrcpads || ladspa->inplace_broken){ /* we have some buffers to unref */ gst_buffer_unref(buffers_in[i]); } @@ -873,11 +873,10 @@ static void gst_ladspa_chain (GstPad *pad, GstBuffer *buf) { LADSPA_Descriptor *desc; - LADSPA_Data *data_in, **data_out; - GstBuffer **buffers_out; + LADSPA_Data *data_in, **data_out = NULL; + GstBuffer **buffers_out = NULL; unsigned long num_samples; - gboolean inplace_broken; guint num_to_process, num_processed, i, numsrcpads; GstLADSPA *ladspa; @@ -909,13 +908,12 @@ gst_ladspa_chain (GstPad *pad, GstBuffer *buf) desc = ladspa->descriptor; - inplace_broken = LADSPA_IS_INPLACE_BROKEN(desc->Properties); if (numsrcpads > 0){ guint num_created_buffers = 0; buffers_out = g_new(GstBuffer*, numsrcpads); data_out = g_new(LADSPA_Data*, numsrcpads); - if (inplace_broken){ + if (ladspa->inplace_broken){ num_created_buffers = numsrcpads; } else { @@ -1077,7 +1075,7 @@ ladspa_describe_plugin(const char *pcFullFilename, /* construct the element details struct */ details = g_new0(GstElementDetails,1); details->longname = g_strdup(desc->Name); - details->klass = "Filter/LADSPA"; + details->klass = "Filter/Audio/LADSPA"; details->description = details->longname; details->version = g_strdup_printf("%ld",desc->UniqueID); details->author = g_strdup(desc->Maker); diff --git a/ext/ladspa/gstladspa.h b/ext/ladspa/gstladspa.h index 18357585..c7021a62 100644 --- a/ext/ladspa/gstladspa.h +++ b/ext/ladspa/gstladspa.h @@ -66,7 +66,7 @@ struct _GstLADSPA { gint samplerate, buffersize, numbuffers; gint64 timestamp; - + gboolean inplace_broken; }; struct _GstLADSPAClass { diff --git a/gst/cdxaparse/Makefile.am b/gst/cdxaparse/Makefile.am new file mode 100644 index 00000000..43d82004 --- /dev/null +++ b/gst/cdxaparse/Makefile.am @@ -0,0 +1,13 @@ +plugindir = $(libdir)/gst + +plugin_LTLIBRARIES = \ + libgstcdxaparse.la + +libgstcdxaparse_la_SOURCES = gstcdxaparse.c + +noinst_HEADERS = \ + gstcdxaparse.h + +libgstcdxaparse_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) +libgstcdxaparse_la_LIBADD = +libgstcdxaparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c new file mode 100644 index 00000000..b26ae051 --- /dev/null +++ b/gst/cdxaparse/gstcdxaparse.c @@ -0,0 +1,363 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> + * <2002> Wim Taymans <wim.taymans@chello.be> + * + * 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. + */ + + +#include <string.h> + +#include "gstcdxaparse.h" + +#define MAKE_FOUR_CC(a,b,c,d) ( ((guint32)a) | (((guint32)b)<< 8) | \ + ((guint32)c)<<16 | (((guint32)d)<<24) ) + + +/* RIFF types */ +#define GST_RIFF_TAG_RIFF MAKE_FOUR_CC('R','I','F','F') +#define GST_RIFF_RIFF_CDXA MAKE_FOUR_CC('C','D','X','A') + + +#define GST_RIFF_TAG_fmt MAKE_FOUR_CC('f','m','t',' ') +#define GST_RIFF_TAG_data MAKE_FOUR_CC('d','a','t','a') + + +/* elementfactory information */ +static GstElementDetails gst_cdxa_parse_details = { + ".dat parser", + "Codec/Parser", + "Parse a .dat file (VCD) into raw mpeg1", + VERSION, + "Wim Taymans <wim.taymans@tvd.be>", + "(C) 2002", +}; + +static GstCaps* cdxa_type_find (GstBuffer *buf, gpointer private); + +/* typefactory for 'cdxa' */ +static GstTypeDefinition cdxadefinition = { + "cdxaparse_video/avi", + "video/avi", + ".dat", + cdxa_type_find, +}; + +/* CDXAParse signals and args */ +enum { + /* FILL ME */ + LAST_SIGNAL +}; + +enum { + ARG_0, + /* FILL ME */ +}; + +GST_PAD_TEMPLATE_FACTORY (sink_templ, + "sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_CAPS_NEW ( + "cdxaparse_sink", + "video/avi", + "format", GST_PROPS_STRING ("CDXA") + ) +) + +GST_PAD_TEMPLATE_FACTORY (src_templ, + "src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_CAPS_NEW ( + "cdxaparse_src", + "video/mpeg", + "mpegversion", GST_PROPS_INT (1), + "systemstream", GST_PROPS_BOOLEAN (TRUE) + ) +) + +static void gst_cdxa_parse_class_init (GstCDXAParseClass *klass); +static void gst_cdxa_parse_init (GstCDXAParse *cdxa_parse); + +static void gst_cdxa_parse_loop (GstElement *element); + +static GstElementStateReturn + gst_cdxa_parse_change_state (GstElement *element); + + +static GstElementClass *parent_class = NULL; +/*static guint gst_cdxa_parse_signals[LAST_SIGNAL] = { 0 }; */ + +GType +gst_cdxa_parse_get_type(void) +{ + static GType cdxa_parse_type = 0; + + if (!cdxa_parse_type) { + static const GTypeInfo cdxa_parse_info = { + sizeof(GstCDXAParseClass), + NULL, + NULL, + (GClassInitFunc)gst_cdxa_parse_class_init, + NULL, + NULL, + sizeof(GstCDXAParse), + 0, + (GInstanceInitFunc)gst_cdxa_parse_init, + }; + cdxa_parse_type = g_type_register_static(GST_TYPE_ELEMENT, "GstCDXAParse", &cdxa_parse_info, 0); + } + return cdxa_parse_type; +} + +static void +gst_cdxa_parse_class_init (GstCDXAParseClass *klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + + gobject_class = (GObjectClass*)klass; + gstelement_class = (GstElementClass*)klass; + + parent_class = g_type_class_ref (GST_TYPE_ELEMENT); + + gstelement_class->change_state = gst_cdxa_parse_change_state; +} + +static void +gst_cdxa_parse_init (GstCDXAParse *cdxa_parse) +{ + GST_FLAG_SET (cdxa_parse, GST_ELEMENT_EVENT_AWARE); + + cdxa_parse->sinkpad = gst_pad_new_from_template ( + GST_PAD_TEMPLATE_GET (sink_templ), "sink"); + gst_element_add_pad (GST_ELEMENT (cdxa_parse), cdxa_parse->sinkpad); + + cdxa_parse->srcpad = gst_pad_new_from_template ( + GST_PAD_TEMPLATE_GET (src_templ), "src"); + gst_element_add_pad (GST_ELEMENT (cdxa_parse), cdxa_parse->srcpad); + + gst_element_set_loop_function (GST_ELEMENT (cdxa_parse), gst_cdxa_parse_loop); + +} + +static GstCaps* +cdxa_type_find (GstBuffer *buf, + gpointer private) +{ + gchar *data = GST_BUFFER_DATA (buf); + GstCaps *new; + + GST_DEBUG (0,"cdxa_parse: typefind"); + + if (GUINT32_FROM_LE (((guint32 *)data)[0]) != GST_RIFF_TAG_RIFF) + return NULL; + if (GUINT32_FROM_LE (((guint32 *)data)[2]) != GST_RIFF_RIFF_CDXA) + return NULL; + + new = GST_CAPS_NEW ("cdxa_type_find", + "video/avi", + "RIFF", GST_PROPS_STRING ("CDXA")); + + return new; +} + +static gboolean +gst_cdxa_parse_handle_event (GstCDXAParse *cdxa_parse) +{ + guint32 remaining; + GstEvent *event; + GstEventType type; + + gst_bytestream_get_status (cdxa_parse->bs, &remaining, &event); + + type = event? GST_EVENT_TYPE (event) : GST_EVENT_UNKNOWN; + + switch (type) { + case GST_EVENT_EOS: + gst_pad_event_default (cdxa_parse->sinkpad, event); + break; + case GST_EVENT_SEEK: + g_warning ("seek event\n"); + break; + case GST_EVENT_FLUSH: + g_warning ("flush event\n"); + break; + case GST_EVENT_DISCONTINUOUS: + g_warning ("discont event\n"); + break; + default: + g_warning ("unhandled event %d\n", type); + break; + } + + return TRUE; +} + +/* + +CDXA starts with the following header: + +! RIFF:4 ! size:4 ! "CDXA" ! "fmt " ! size:4 ! (size+1)&~1 bytes of crap ! +! "data" ! data_size:4 ! (data_size/2352) sectors... + +*/ + +typedef struct +{ + gchar RIFF_tag[4]; + guint32 riff_size; + gchar CDXA_tag[4]; + gchar fmt_tag[4]; + guint32 fmt_size; +} CDXAParseHeader; + +/* +A sectors is 2352 bytes long and is composed of: + +! sync ! header ! subheader ! data ... ! edc ! +! 12 bytes ! 4 bytes ! 8 bytes ! 2324 bytes ! 4 bytes ! +!-------------------------------------------------------! + +We parse the data out of it and send it to the srcpad. +*/ + +static void +gst_cdxa_parse_loop (GstElement *element) +{ + GstCDXAParse *cdxa_parse; + CDXAParseHeader *header; + + g_return_if_fail (element != NULL); + g_return_if_fail (GST_IS_CDXA_PARSE (element)); + + cdxa_parse = GST_CDXA_PARSE (element); + + if (cdxa_parse->state == CDXA_PARSE_HEADER) { + guint32 fmt_size; + guint8 *buf; + + header = (CDXAParseHeader *) gst_bytestream_peek_bytes (cdxa_parse->bs, 20); + if (!header) + return; + + cdxa_parse->riff_size = GUINT32_FROM_LE (header->riff_size); + fmt_size = (GUINT32_FROM_LE (header->fmt_size) + 1)&~1; + + /* flush the header + fmt_size bytes + 4 bytes "data" */ + if (!gst_bytestream_flush (cdxa_parse->bs, 20 + fmt_size + 4)) + return; + + /* get the data size */ + buf = gst_bytestream_peek_bytes (cdxa_parse->bs, 4); + if (!buf) + return; + cdxa_parse->data_size = GUINT32_FROM_LE (*((guint32 *)buf)); + + /* flush the data size */ + if (!gst_bytestream_flush (cdxa_parse->bs, 4)) + return; + + if (cdxa_parse->data_size % CDXA_SECTOR_SIZE) + g_warning ("cdxa_parse: size not multiple of %d bytes", CDXA_SECTOR_SIZE); + + cdxa_parse->sectors = cdxa_parse->data_size / CDXA_SECTOR_SIZE; + + cdxa_parse->state = CDXA_PARSE_DATA; + } + else { + GstBuffer *buf; + GstBuffer *outbuf; + + buf = gst_bytestream_read (cdxa_parse->bs, CDXA_SECTOR_SIZE); + if (!buf) { + gst_cdxa_parse_handle_event (cdxa_parse); + return; + } + + outbuf = gst_buffer_create_sub (buf, 24, CDXA_DATA_SIZE); + gst_buffer_unref (buf); + + gst_pad_push (cdxa_parse->srcpad, outbuf); + } +} + +static GstElementStateReturn +gst_cdxa_parse_change_state (GstElement *element) +{ + GstCDXAParse *cdxa_parse = GST_CDXA_PARSE (element); + + switch (GST_STATE_TRANSITION (element)) { + case GST_STATE_NULL_TO_READY: + break; + case GST_STATE_READY_TO_PAUSED: + cdxa_parse->state = CDXA_PARSE_HEADER; + cdxa_parse->bs = gst_bytestream_new (cdxa_parse->sinkpad); + break; + case GST_STATE_PAUSED_TO_PLAYING: + break; + case GST_STATE_PLAYING_TO_PAUSED: + break; + case GST_STATE_PAUSED_TO_READY: + gst_bytestream_destroy (cdxa_parse->bs); + break; + case GST_STATE_READY_TO_NULL: + break; + default: + break; + } + + parent_class->change_state (element); + + return GST_STATE_SUCCESS; +} + +static gboolean +plugin_init (GModule *module, GstPlugin *plugin) +{ + GstElementFactory *factory; + GstTypeFactory *type; + + /* this filter needs the riff parser */ + if (!gst_library_load ("gstbytestream")) { + gst_info("cdxaparse: could not load support library: 'gstbytestream'\n"); + return FALSE; + } + + /* create an elementfactory for the cdxa_parse element */ + factory = gst_element_factory_new ("cdxaparse", GST_TYPE_CDXA_PARSE, + &gst_cdxa_parse_details); + g_return_val_if_fail (factory != NULL, FALSE); + + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_templ)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_templ)); + + type = gst_type_factory_new (&cdxadefinition); + gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); + + gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); + + return TRUE; +} + +GstPluginDesc plugin_desc = { + GST_VERSION_MAJOR, + GST_VERSION_MINOR, + "cdxaparse", + plugin_init +}; + diff --git a/gst/cdxaparse/gstcdxaparse.h b/gst/cdxaparse/gstcdxaparse.h new file mode 100644 index 00000000..fcf77107 --- /dev/null +++ b/gst/cdxaparse/gstcdxaparse.h @@ -0,0 +1,81 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> + * <2002> Wim Tayans <wim.taymans@chello.be> + * + * 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. + */ + + +#ifndef __GST_CDXA_PARSE_H__ +#define __GST_CDXA_PARSE_H__ + +#include <config.h> +#include <gst/gst.h> +#include <gst/bytestream/bytestream.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define GST_TYPE_CDXA_PARSE \ + (gst_cdxa_parse_get_type()) +#define GST_CDXA_PARSE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDXA_PARSE,GstCDXAParse)) +#define GST_CDXA_PARSE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDXA_PARSE,GstCDXAParse)) +#define GST_IS_CDXA_PARSE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDXA_PARSE)) +#define GST_IS_CDXA_PARSE_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDXA_PARSE)) + +#define CDXA_SECTOR_SIZE 2352 +#define CDXA_DATA_SIZE 2324 + +typedef enum +{ + CDXA_PARSE_HEADER, + CDXA_PARSE_DATA, +} GstCDXAParseState; + +typedef struct _GstCDXAParse GstCDXAParse; +typedef struct _GstCDXAParseClass GstCDXAParseClass; + +struct _GstCDXAParse { + GstElement element; + + /* pads */ + GstPad *sinkpad, *srcpad; + + GstByteStream *bs; + + GstCDXAParseState state; + + guint32 riff_size; + guint32 data_size; + guint32 sectors; +}; + +struct _GstCDXAParseClass { + GstElementClass parent_class; +}; + +GType gst_cdxa_parse_get_type (void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GST_CDXA_PARSE_H__ */ diff --git a/gst/chart/gstchart.c b/gst/chart/gstchart.c index 268c92c3..e1c106ae 100644 --- a/gst/chart/gstchart.c +++ b/gst/chart/gstchart.c @@ -62,7 +62,7 @@ GType gst_chart_get_type(void); /* elementfactory information */ static GstElementDetails gst_chart_details = { "chart drawer", - "Filter/Visualization", + "Visualization", "Takes frames of data and outputs video frames of a chart of data", VERSION, "Richard Boulton <richard@tartarus.org>", diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 12f85126..11543844 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -24,8 +24,8 @@ #include "gstdeinterlace.h" static GstElementDetails deinterlace_details = { - "DeInterlace", - "Filter/Effect", + "Deinterlace", + "Filter/Video", "Deinterlace video", VERSION, "Wim Taymans <wim.taymans@chello.be>", diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index 8aeb5532..66079ab3 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -29,7 +29,7 @@ static GstCaps* flxdec_type_find(GstBuffer *buf, gpointer private); /* flx element information */ static GstElementDetails flxdec_details = { "FLX Decoder", - "flxdec", + "Codec/Audio/Decoder", "FLX decoder", VERSION, "Sepp Wijnands <mrrazz@garbage-coderz.net>" diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc index da3061d5..d12123ac 100644 --- a/gst/modplug/gstmodplug.cc +++ b/gst/modplug/gstmodplug.cc @@ -35,7 +35,7 @@ GstElementDetails modplug_details = { "ModPlug", - "Audio/Module", + "Codec/Audio/Decoder", "Module decoder based on modplug engine", VERSION, "Jeremy SIMON <jsimon13@yahoo.fr> " diff --git a/gst/mpeg1sys/gstmpeg1systemencode.c b/gst/mpeg1sys/gstmpeg1systemencode.c index ebd38666..e76be2eb 100644 --- a/gst/mpeg1sys/gstmpeg1systemencode.c +++ b/gst/mpeg1sys/gstmpeg1systemencode.c @@ -30,7 +30,7 @@ /* elementfactory information */ static GstElementDetails system_encode_details = { "MPEG1 Multiplexer", - "Filter/Multiplexer/System", + "Codec/Muxer", "Multiplexes MPEG-1 Streams", VERSION, "Wim Taymans <wim.taymans@chello.be>", diff --git a/gst/mpeg1videoparse/gstmp1videoparse.c b/gst/mpeg1videoparse/gstmp1videoparse.c index ea608208..74efd0d9 100644 --- a/gst/mpeg1videoparse/gstmp1videoparse.c +++ b/gst/mpeg1videoparse/gstmp1videoparse.c @@ -34,7 +34,7 @@ /* elementfactory information */ static GstElementDetails mp1videoparse_details = { "MPEG 1 Video Parser", - "Filter/Parser/Video", + "Codec/Parser", "Parses and frames MPEG 1 video streams, provides seek", VERSION, "Wim Taymans <wim.taymans@chello.be>", diff --git a/gst/mpeg2sub/gstmpeg2subt.c b/gst/mpeg2sub/gstmpeg2subt.c index 29cad3d9..d227b8d8 100644 --- a/gst/mpeg2sub/gstmpeg2subt.c +++ b/gst/mpeg2sub/gstmpeg2subt.c @@ -35,7 +35,7 @@ static void gst_mpeg2subt_get_property (GObject *object, guint prop_id, GValue /* elementfactory information */ static GstElementDetails mpeg2subt_details = { "MPEG2 subtitle Decoder", - "Filter/Decoder/Video", + "Codec/Video/Decoder", "Decodes and merges MPEG2 subtitles into a video frame", VERSION, "Samuel Hocevar <sam@via.ecp.fr>\n" diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index 151aec0c..177a5d3d 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -23,9 +23,9 @@ /* elementfactory information */ static GstElementDetails mp3parse_details = { - "MP3 Parser", - "Filter/Parser/Audio", - "Parses and frames MP3 audio streams, provides seek", + "MPEG1 Audio Parser", + "Codec/Parser", + "Parses and frames mpeg1 audio streams (levels 1-3), provides seek", VERSION, "Erik Walthinsen <omega@cse.ogi.edu>", "(C) 1999", diff --git a/gst/passthrough/gstpassthrough.c b/gst/passthrough/gstpassthrough.c index 8f6f42ae..870e6be9 100644 --- a/gst/passthrough/gstpassthrough.c +++ b/gst/passthrough/gstpassthrough.c @@ -28,7 +28,7 @@ static GstElementDetails passthrough_details = { "Passthrough", - "Filter/Effect", + "Filter/Audio/Effect", "Transparent filter for audio/raw (boilerplate for effects)", VERSION, "Thomas <thomas@apestaart.org>, "\ diff --git a/gst/playondemand/gstplayondemand.c b/gst/playondemand/gstplayondemand.c index 300f9664..87a840de 100644 --- a/gst/playondemand/gstplayondemand.c +++ b/gst/playondemand/gstplayondemand.c @@ -34,7 +34,7 @@ static GstElementDetails play_on_demand_details = { "Play On Demand", - "Filter/Effect", + "Filter/Audio/Effect", "Plays a stream whenever it receives a certain signal", VERSION, "Leif Morgan Johnson <lmjohns3@eos.ncsu.edu>", diff --git a/gst/rtjpeg/gstrtjpegdec.c b/gst/rtjpeg/gstrtjpegdec.c index 9dd7362d..425fc55d 100644 --- a/gst/rtjpeg/gstrtjpegdec.c +++ b/gst/rtjpeg/gstrtjpegdec.c @@ -25,7 +25,7 @@ /* elementfactory information */ GstElementDetails gst_rtjpegdec_details = { "RTjpeg decoder", - "Filter/Video/Decoder", + "Codec/Video/Decoder", "Decodes video in RTjpeg format", VERSION, "Erik Walthinsen <omega@cse.ogi.edu>", diff --git a/gst/rtjpeg/gstrtjpegenc.c b/gst/rtjpeg/gstrtjpegenc.c index 4a476204..5f7c3a75 100644 --- a/gst/rtjpeg/gstrtjpegenc.c +++ b/gst/rtjpeg/gstrtjpegenc.c @@ -23,7 +23,7 @@ /* elementfactory information */ GstElementDetails gst_rtjpegenc_details = { "RTjpeg encoder", - "Filter/Video/Encoder", + "Codec/Video/Encoder", "Encodes video in RTjpeg format", VERSION, "Erik Walthinsen <omega@cse.ogi.edu>", diff --git a/gst/smooth/gstsmooth.c b/gst/smooth/gstsmooth.c index 69871230..be66748d 100644 --- a/gst/smooth/gstsmooth.c +++ b/gst/smooth/gstsmooth.c @@ -23,8 +23,8 @@ static GstElementDetails smooth_details = { "Smooth effect", - "Filter/Effect", - "apply a smooth filter to an image", + "Filter/Video", + "Apply a smooth filter to an image", VERSION, "Wim Taymans <wim.taymans@chello.be>", "(C) 2000", diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c index 8c84ee55..4cd32836 100644 --- a/gst/spectrum/gstspectrum.c +++ b/gst/spectrum/gstspectrum.c @@ -23,7 +23,7 @@ static GstElementDetails gst_spectrum_details = { "Spectrum analyzer", - "Filter/Analysis", + "Filter/Audio/Analysis", "Run an FFT on the audio signal, output spectrum data", VERSION, "Erik Walthinsen <omega@cse.ogi.edu>", diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c index fc737e92..5dea3374 100644 --- a/gst/speed/gstspeed.c +++ b/gst/speed/gstspeed.c @@ -32,7 +32,7 @@ static GstElementDetails speed_details = { "Speed", - "Filter/Effect", + "Filter/Audio/Effect", "Set speed/pitch on audio/raw streams (resampler)", VERSION, "Andy Wingo <apwingo@eos.ncsu.edu>", diff --git a/gst/stereo/gststereo.c b/gst/stereo/gststereo.c index 6b243db0..0d84c84f 100644 --- a/gst/stereo/gststereo.c +++ b/gst/stereo/gststereo.c @@ -22,7 +22,7 @@ static GstElementDetails stereo_details = { "Stereo effect", - "Filter/Effect", + "Filter/Audio/Effect", "Muck with the stereo signal, enhance it's 'stereo-ness'", VERSION, "Erik Walthinsen <omega@cse.ogi.edu>", diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index f691212d..3a913b72 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -23,7 +23,7 @@ static GstElementDetails lavencode_details = { "LavEncode", - "Filter/LAV/Encoder", + "Codec/Video/Encoder", "Encodes a YUV frame into the lav format (mjpeg_tools)", VERSION, "Wim Taymans <wim.taymans@chello.be>", diff --git a/m4/mpeg2dec.m4 b/m4/mpeg2dec.m4 index 5b72fefd..47422cd9 100644 --- a/m4/mpeg2dec.m4 +++ b/m4/mpeg2dec.m4 @@ -57,12 +57,12 @@ AC_ARG_WITH(mpeg2dec-prefix, if test x$mpeg2dec_config_prefix = x ; then MPEG2DEC_CHECK_LIBHEADER(MPEG2DEC, mpeg2, mpeg2_init, mpeg2dec/mpeg2.h, - MPEG2DEC_LIBS="-lmpeg2 -lcpuaccel") + MPEG2DEC_LIBS="-lmpeg2 -lcpuaccel",, -lcpuaccel) else MPEG2DEC_CHECK_LIBHEADER(MPEG2DEC, mpeg2, mpeg2_init, mpeg2dec/mpeg2.h, [ MPEG2DEC_LIBS="-lmpeg2 -lcpuaccel -L$mpeg2dec_config_prefix/lib" MPEG2DEC_CFLAGS="-I$mpeg2dec_config_prefix/include" - ], , -L$mpeg2dec_config_prefix/lib, -I$mpeg2dec_config_prefix/include) + ], , -L$mpeg2dec_config_prefix/lib -lcpuaccel, -I$mpeg2dec_config_prefix/include) fi if test "x$HAVE_MPEG2DEC" = "xyes"; then diff --git a/sys/vcd/vcdsrc.c b/sys/vcd/vcdsrc.c index d69f07a1..0037b8df 100644 --- a/sys/vcd/vcdsrc.c +++ b/sys/vcd/vcdsrc.c @@ -36,7 +36,7 @@ static GstElementDetails vcdsrc_details = { "VCD Source", - "Source/File/VCD", + "Source/File", "Asynchronous read from VCD disk", VERSION, "Erik Walthinsen <omega@cse.ogi.edu>", |