ac3parse adder audioscale auparse avi \
asfdemux audioconvert cdxaparse chart \
cutter debug deinterlace effectv festival \
- filter flx goom intfloat law level median mixmatrix \
+ filter flx goom id3 intfloat law level median mixmatrix \
mpeg1sys mpeg1videoparse mpeg2enc mpeg2sub \
mpegaudio mpegaudioparse mpegstream mpegtypes \
monoscope oneton overlay passthrough playondemand qtdemux \
gst/filter/Makefile
gst/flx/Makefile
gst/goom/Makefile
+gst/id3/Makefile
gst/intfloat/Makefile
gst/law/Makefile
gst/level/Makefile
$(ARTS_DIR) $(ARTSC_DIR) $(AUDIOFILE_DIR) \
$(CDPARANOIA_DIR) $(DIVX_DIR) \
$(DVDREAD_DIR) $(DVDNAV_DIR) $(ESD_DIR) $(MAS_DIR) \
- $(FFMPEG_DIR) $(FLAC_DIR) $(GDK_PIXBUF_DIR) $(GNOMEVFS_DIR) $(GSM_DIR) \
- $(HERMES_DIR) $(JACK_DIR) $(JPEG_DIR) \
+ $(FFMPEG_DIR) $(FLAC_DIR) $(GDK_PIXBUF_DIR) \
+ $(GNOMEVFS_DIR) $(GSM_DIR) $(HERMES_DIR) \
+ $(JACK_DIR) $(JPEG_DIR) \
$(LADSPA_DIR) $(LAME_DIR) $(LCS_DIR) \
$(LIBDV_DIR) $(LIBFAME_DIR) $(LIBPNG_DIR) \
$(MAD_DIR) $(MATROSKA_DIR) $(MIKMOD_DIR) \
/* typefind stuff */
static GstCaps*
-dv_type_find (GstBuffer *buf, gpointer private)
+dv_type_find (GstByteStream *bs, gpointer private)
{
- guint32 head;
+ GstBuffer *buf = NULL;
GstCaps *new = NULL;
- if (GST_BUFFER_SIZE (buf) < 5)
- return NULL;
+ if (gst_bytestream_peek (bs, &buf, 5) == 5) {
+ guint32 head = GUINT32_FROM_BE (*((guint32 *) GST_BUFFER_DATA (buf)));
- head = GUINT32_FROM_BE(*((guint32 *)GST_BUFFER_DATA(buf)));
+ /* check for DIF and DV flag */
+ if ((head & 0xffffff00) == 0x1f070000 &&
+ !(GST_BUFFER_DATA (buf)[4] & 0x01)) {
+ gchar *format;
- /* check for DIF and DV flag */
- if ((head & 0xffffff00) == 0x1f070000 && !(GST_BUFFER_DATA(buf)[4] & 0x01)) {
- gchar *format;
-
- if ((head & 0x000000ff) & 0x80)
- format = "PAL";
- else
- format = "NTSC";
+ if ((head & 0x000000ff) & 0x80)
+ format = "PAL";
+ else
+ format = "NTSC";
- new = GST_CAPS_NEW ("dv_type_find",
- "video/x-dv",
- "systemstream", GST_PROPS_BOOLEAN (TRUE)
- );
+ new = GST_CAPS_NEW ("dv_type_find",
+ "video/x-dv",
+ "systemstream", GST_PROPS_BOOLEAN (TRUE));
+ }
+ }
+
+ if (buf != NULL) {
+ gst_buffer_unref (buf);
}
+
return new;
}
GstElementFactory *factory;
GstTypeFactory *type;
- if (!gst_library_load ("gstbytestream"))
- return FALSE;
-
/* We need to create an ElementFactory for each element we provide.
* This consists of the name of the element, the GType identifier,
* and a pointer to the details structure at the top of the file.
#include <libdv/dv.h>
-#include <gst/bytestream/bytestream.h>
+#include <gst/gstbytestream.h>
/* This is the definition of the element's object structure. */
extern GstElementDetails flacenc_details;
extern GstElementDetails flacdec_details;
-static GstCaps* flac_type_find (GstBuffer *buf, gpointer private);
+static GstCaps* flac_type_find (GstByteStream *bs, gpointer private);
GstPadTemplate *gst_flacdec_src_template, *gst_flacdec_sink_template;
GstPadTemplate *gst_flacenc_src_template, *gst_flacenc_sink_template;
static GstCaps*
-flac_type_find (GstBuffer *buf, gpointer private)
+flac_type_find (GstByteStream *bs, gpointer private)
{
- gint offset;
- guint8 *data;
- gint size;
- guint32 head;
-
- if (GST_BUFFER_SIZE (buf) < 4)
- return NULL;
+ GstBuffer *buf = NULL;
+ GstCaps *new = NULL;
- data = GST_BUFFER_DATA (buf);
- size = GST_BUFFER_SIZE (buf);
-
- head = GUINT32_FROM_BE (*((guint32 *)GST_BUFFER_DATA (buf)));
-
- if (head == 0x664C6143)
- return gst_caps_new ("flac_type_find", "application/x-flac", NULL);
- else {
- /* checks for existance of flac identification header in case
- * there's an ID3 tag */
- for (offset = 0; offset < size-4; offset++) {
- if (data[offset] == 'f' &&
- data[offset+1] == 'L' &&
- data[offset+2] == 'a' &&
- data[offset+3] == 'C' ) {
- return gst_caps_new ("flac_type_find", "application/x-flac", NULL);
- }
+ if (gst_bytestream_peek (bs, &buf, 4) == 4) {
+ guint32 head = GUINT32_FROM_BE (*((guint32 *) GST_BUFFER_DATA (buf)));
+
+ if (head == 0x664C6143) {
+ new = GST_CAPS_NEW ("flac_type_find",
+ "application/x-flac",
+ NULL);
}
}
- return NULL;
+ if (buf != NULL) {
+ gst_buffer_unref (buf);
+ }
+
+ return new;
}
GstTypeFactory *type;
GstCaps *raw_caps, *flac_caps;
- /* this filter needs the bytestream package */
- if (!gst_library_load ("gstbytestream"))
- return FALSE;
-
gst_plugin_set_longname (plugin, "The FLAC Lossless compressor Codec");
/* create an elementfactory for the flacenc element */
#include <config.h>
#include <gst/gst.h>
-#include <gst/bytestream/bytestream.h>
+#include <gst/gstbytestream.h>
#include <FLAC/all.h>
LADSPAPluginSearch(ladspa_describe_plugin);
- if (! gst_library_load ("gstbytestream"))
- return FALSE;
-
/* initialize dparam support library */
gst_control_init(NULL,NULL);
#include <config.h>
#include <gst/gst.h>
-#include <gst/bytestream/bytestream.h>
+#include <gst/gstbytestream.h>
#include "ladspa.h"
};
static GstCaps*
-au_type_find (GstBuffer *buf, gpointer private)
+au_type_find (GstByteStream *bs, gpointer private)
{
+ GstBuffer *buf = NULL;
GstCaps *new = NULL;
- gulong *head = (gulong *) GST_BUFFER_DATA (buf);
- if (GST_BUFFER_SIZE (buf) < 4)
- return NULL;
+ if (gst_bytestream_peek (bs, &buf, 4) == 4) {
+ guint32 head = * (guint32 *) GST_BUFFER_DATA (buf);
+ if (head == 0x2e736e64 || head == 0x646e732e) {
+ new = gst_caps_new ("au_type_find",
+ "audio/x-au",
+ NULL);
+ }
+ }
- if (*head == 0x2e736e64 || *head == 0x646e732e)
- new = gst_caps_new ("au_type_find", "audio/x-au", NULL);
+ if (buf != NULL) {
+ gst_buffer_unref (buf);
+ }
return new;
}
"(C) 1999",
};
-static GstCaps* avi_type_find (GstBuffer *buf, gpointer private);
+static GstCaps* avi_type_find (GstByteStream *bs, gpointer private);
/* typefactory for 'avi' */
static GstTypeDefinition avidefinition = {
}
static GstCaps*
-avi_type_find (GstBuffer *buf,
- gpointer private)
+avi_type_find (GstByteStream *bs,
+ gpointer private)
{
- gchar *data = GST_BUFFER_DATA (buf);
- GstCaps *new;
+ GstBuffer *buf = NULL;
+ GstCaps *new = NULL;
GST_DEBUG ("avi_demux: typefind");
- if (GST_BUFFER_SIZE (buf) < 12)
- return NULL;
+ if (gst_bytestream_peek (bs, &buf, 12) == 12) {
+ guint32 head1 = GUINT32_FROM_LE (((guint32 *) GST_BUFFER_DATA (buf))[0]),
+ head2 = GUINT32_FROM_LE (((guint32 *) GST_BUFFER_DATA (buf))[2]);
- if (GUINT32_FROM_LE (((guint32 *)data)[0]) != GST_RIFF_TAG_RIFF)
- return NULL;
- if (GUINT32_FROM_LE (((guint32 *)data)[2]) != GST_RIFF_RIFF_AVI)
- return NULL;
+ if (head1 == GST_RIFF_TAG_RIFF && head2 == GST_RIFF_RIFF_AVI) {
+ new = GST_CAPS_NEW ("avi_type_find",
+ "video/avi",
+ NULL);
+ }
+ }
+
+ if (buf != NULL) {
+ gst_buffer_unref (buf);
+ }
- new = GST_CAPS_NEW ("avi_type_find",
- "video/avi",
- NULL);
return new;
}
-1 /* end */
};
- /* this filter needs the riff parser */
- if (!gst_library_load ("gstbytestream"))
- return FALSE;
-
if (!gst_library_load ("gstriff"))
return FALSE;
#include <config.h>
#include <gst/gst.h>
-#include <gst/bytestream/bytestream.h>
+#include <gst/gstbytestream.h>
#include <gst/riff/riff.h>
#ifdef __cplusplus
#define JIFFIE (GST_SECOND/70)
-static GstCaps* flxdec_type_find(GstBuffer *buf, gpointer private);
+static GstCaps* flxdec_type_find (GstByteStream *bs, gpointer private);
/* flx element information */
static GstElementDetails flxdec_details = {
static GstElementClass *parent_class = NULL;
static GstCaps*
-flxdec_type_find (GstBuffer *buf, gpointer private)
+flxdec_type_find (GstByteStream *bs, gpointer private)
{
- guchar *data = GST_BUFFER_DATA(buf);
- GstCaps *new;
+ GstBuffer *buf = NULL;
+ GstCaps *new = NULL;
- if (GST_BUFFER_SIZE(buf) < 134){
- return NULL;
- }
+ if (gst_bytestream_peek (bs, &buf, 134) == 134) {
+ guint8 *data = GST_BUFFER_DATA (buf);
- /* check magic */
- if ((data[4] == 0x11 || data[4] == 0x12
- || data[4] == 0x30 || data[4] == 0x44) && data[5] == 0xaf) {
+ /* check magic */
+ if ((data[4] == 0x11 || data[4] == 0x12 ||
+ data[4] == 0x30 || data[4] == 0x44) &&
+ data[5] == 0xaf) {
/* check the frame type of the first frame */
if ((data[132] == 0x00 || data[132] == 0xfa) && data[133] == 0xf1) {
GST_DEBUG ("GstFlxDec: found supported flx format");
- new = gst_caps_new("flxdec_type_find","video/x-fli", NULL);
- return new;
+ new = gst_caps_new ("flxdec_type_find",
+ "video/x-fli",
+ NULL);
}
+ }
}
-
- return NULL;
+
+ if (buf != NULL) {
+ gst_buffer_unref (buf);
+ }
+
+ return new;
}
GstElementFactory *factory;
GstTypeFactory *type;
- /* this filter needs the bytestream package */
- if (!gst_library_load ("gstbytestream"))
- return FALSE;
-
factory = gst_element_factory_new("flxdec", GST_TYPE_FLXDEC, &flxdec_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_element_factory_set_rank (factory, GST_ELEMENT_RANK_PRIMARY);
#include <gst/gst.h>
#include "flx_color.h"
-#include <gst/bytestream/bytestream.h>
+#include <gst/gstbytestream.h>
#ifdef __cplusplus
"(C) 2003",
};
-static GstCaps* quicktime_type_find (GstBuffer *buf, gpointer private);
+static GstCaps* quicktime_type_find (GstByteStream *bs, gpointer private);
static GstTypeDefinition quicktimedefinition = {
"qtdemux_video/quicktime",
}
static GstCaps*
-quicktime_type_find (GstBuffer *buf, gpointer private)
+quicktime_type_find (GstByteStream *bs, gpointer private)
{
- gchar *data = GST_BUFFER_DATA (buf);
-
- g_return_val_if_fail (data != NULL, NULL);
-
- if(GST_BUFFER_SIZE(buf) < 8){
- return NULL;
+ GstBuffer *buf = NULL;
+ GstCaps *new = NULL;
+
+ if (gst_bytestream_peek (bs, &buf, 8) == 8) {
+ gchar *data = GST_BUFFER_DATA (buf);
+
+ if (!strncmp (&data[4], "wide", 4) ||
+ !strncmp (&data[4], "moov", 4) ||
+ !strncmp (&data[4], "mdat", 4) ||
+ !strncmp (&data[4], "free", 4)) {
+ new = GST_CAPS_NEW ("quicktime_type_find",
+ "video/quicktime",
+ NULL);
+ }
}
- if (strncmp (&data[4], "wide", 4)==0 ||
- strncmp (&data[4], "moov", 4)==0 ||
- strncmp (&data[4], "mdat", 4)==0 ||
- strncmp (&data[4], "free", 4)==0) {
- return gst_caps_new ("quicktime_type_find",
- "video/quicktime",
- NULL);
+
+ if (buf != NULL) {
+ gst_buffer_unref (buf);
}
- return NULL;
+
+ return new;
}
static gboolean
};
gint i;
- if (!gst_library_load ("gstbytestream"))
- return FALSE;
-
factory = gst_element_factory_new ("qtdemux", GST_TYPE_QTDEMUX,
&gst_qtdemux_details);
g_return_val_if_fail(factory != NULL, FALSE);
#define __GST_QTDEMUX_H__
#include <gst/gst.h>
-#include <gst/bytestream/bytestream.h>
+#include <gst/gstbytestream.h>
#ifdef __cplusplus
extern "C" {
static GstElementStateReturn
gst_wavparse_change_state (GstElement *element);
-static GstCaps* wav_type_find (GstBuffer *buf, gpointer private);
+static GstCaps* wav_type_find (GstByteStream *bs,
+ gpointer private);
static const GstFormat* gst_wavparse_get_formats (GstPad *pad);
static const GstQueryType *
}
static GstCaps*
-wav_type_find (GstBuffer *buf, gpointer private)
+wav_type_find (GstByteStream *bs, gpointer private)
{
- gchar *data = GST_BUFFER_DATA (buf);
+ GstCaps *new = NULL;
+ GstBuffer *buf = NULL;
- if (GST_BUFFER_SIZE (buf) < 12) return NULL;
- if (strncmp (&data[0], "RIFF", 4)) return NULL;
- if (strncmp (&data[8], "WAVE", 4)) return NULL;
+ if (gst_bytestream_peek (bs, &buf, 12) == 12) {
+ gchar *data = GST_BUFFER_DATA (buf);
- return gst_caps_new ("wav_type_find", "audio/x-wav", NULL);
+ if (!strncmp (&data[0], "RIFF", 4) &&
+ !strncmp (&data[8], "WAVE", 4)) {
+ new = GST_CAPS_NEW ("wav_type_find",
+ "audio/x-wav",
+ NULL);
+ }
+ }
+
+ if (buf != NULL) {
+ gst_buffer_unref (buf);
+ }
+
+ return new;
}
static void wav_new_chunk_callback(GstRiffChunk *chunk, gpointer data)