+2006-04-26 Stefan Kost <ensonic@users.sf.net>
+
+ * ext/aalib/gstaasink.c:
+ * ext/annodex/gstcmmldec.c:
+ * ext/annodex/gstcmmlenc.c:
+ * ext/cairo/gsttextoverlay.c:
+ * ext/cairo/gsttimeoverlay.c:
+ * ext/cdio/gstcdiocddasrc.c:
+ * ext/dv/gstdvdec.c:
+ * ext/dv/gstdvdemux.c:
+ * ext/esd/esdmon.c:
+ * ext/esd/esdsink.c:
+ * ext/flac/gstflacenc.c:
+ * ext/flac/gstflactag.c:
+ * ext/gconf/gstgconfaudiosink.c: (gst_gconf_audio_sink_base_init):
+ * ext/gconf/gstgconfaudiosrc.c: (gst_gconf_audio_src_base_init):
+ * ext/gconf/gstgconfvideosink.c: (gst_gconf_video_sink_base_init):
+ * ext/gconf/gstgconfvideosrc.c: (gst_gconf_video_src_base_init):
+ * ext/gdk_pixbuf/pixbufscale.c:
+ * ext/hal/gsthalaudiosink.c: (gst_hal_audio_sink_base_init):
+ * ext/hal/gsthalaudiosrc.c: (gst_hal_audio_src_base_init):
+ * ext/jpeg/gstjpegdec.c:
+ * ext/jpeg/gstjpegenc.c:
+ * ext/jpeg/gstsmokedec.c:
+ * ext/jpeg/gstsmokeenc.c:
+ * ext/libcaca/gstcacasink.c:
+ * ext/libmng/gstmngdec.c:
+ * ext/libmng/gstmngenc.c:
+ * ext/libpng/gstpngdec.c:
+ * ext/libpng/gstpngenc.c:
+ * ext/mikmod/gstmikmod.c:
+ * ext/raw1394/gstdv1394src.c:
+ * ext/shout2/gstshout2.c: (gst_shout2send_init):
+ * ext/shout2/gstshout2.h:
+ * ext/speex/gstspeexdec.c:
+ * ext/speex/gstspeexenc.c:
+ * gst/alpha/gstalpha.c:
+ * gst/alpha/gstalphacolor.c:
+ * gst/apetag/gstapedemux.c:
+ * gst/auparse/gstauparse.c:
+ * gst/autodetect/gstautoaudiosink.c:
+ (gst_auto_audio_sink_base_init):
+ * gst/autodetect/gstautovideosink.c:
+ (gst_auto_video_sink_base_init):
+ * gst/avi/gstavidemux.c: (gst_avi_demux_base_init):
+ * gst/avi/gstavimux.c: (gst_avimux_base_init):
+ * gst/cutter/gstcutter.c:
+ * gst/debug/breakmydata.c:
+ * gst/debug/efence.c:
+ * gst/debug/gstnavigationtest.c:
+ * gst/debug/gstnavseek.c:
+ * gst/debug/negotiation.c:
+ * gst/debug/progressreport.c:
+ * gst/debug/testplugin.c:
+ * gst/effectv/gstaging.c:
+ * gst/effectv/gstdice.c:
+ * gst/effectv/gstedge.c:
+ * gst/effectv/gstquark.c:
+ * gst/effectv/gstrev.c:
+ * gst/effectv/gstshagadelic.c:
+ * gst/effectv/gstvertigo.c:
+ * gst/effectv/gstwarp.c:
+ * gst/flx/gstflxdec.c:
+ * gst/goom/gstgoom.c:
+ * gst/icydemux/gsticydemux.c:
+ * gst/id3demux/gstid3demux.c:
+ * gst/interleave/deinterleave.c:
+ * gst/interleave/interleave.c:
+ * gst/law/alaw-decode.c: (gst_alawdec_base_init):
+ * gst/law/alaw-encode.c: (gst_alawenc_base_init):
+ * gst/law/mulaw-decode.c: (gst_mulawdec_base_init):
+ * gst/law/mulaw-encode.c: (gst_mulawenc_base_init):
+ * gst/level/gstlevel.c:
+ * gst/matroska/matroska-demux.c: (gst_matroska_demux_base_init):
+ * gst/matroska/matroska-mux.c: (gst_matroska_mux_base_init):
+ * gst/median/gstmedian.c:
+ * gst/monoscope/gstmonoscope.c:
+ * gst/multipart/multipartdemux.c:
+ * gst/multipart/multipartmux.c:
+ * gst/oldcore/gstaggregator.c:
+ * gst/oldcore/gstfdsink.c:
+ * gst/oldcore/gstmd5sink.c:
+ * gst/oldcore/gstmultifilesrc.c:
+ * gst/oldcore/gstpipefilter.c:
+ * gst/oldcore/gstshaper.c:
+ * gst/oldcore/gststatistics.c:
+ * gst/rtp/gstasteriskh263.c:
+ * gst/rtp/gstrtpL16depay.c:
+ * gst/rtp/gstrtpL16pay.c:
+ * gst/rtp/gstrtpamrdepay.c:
+ * gst/rtp/gstrtpamrpay.c:
+ * gst/rtp/gstrtpdepay.c:
+ * gst/rtp/gstrtpgsmpay.c:
+ * gst/rtp/gstrtph263pay.c:
+ * gst/rtp/gstrtph263pdepay.c:
+ * gst/rtp/gstrtph263ppay.c:
+ * gst/rtp/gstrtpilbcdepay.c:
+ * gst/rtp/gstrtpmp4gpay.c:
+ * gst/rtp/gstrtpmp4vdepay.c:
+ * gst/rtp/gstrtpmp4vpay.c:
+ * gst/rtp/gstrtpmpadepay.c:
+ * gst/rtp/gstrtpmpapay.c:
+ * gst/rtp/gstrtppcmadepay.c:
+ * gst/rtp/gstrtppcmapay.c:
+ * gst/rtp/gstrtppcmudepay.c:
+ * gst/rtp/gstrtppcmupay.c:
+ * gst/rtp/gstrtpspeexdepay.c:
+ * gst/rtp/gstrtpspeexpay.c:
+ * gst/rtsp/gstrtpdec.c:
+ * gst/rtsp/gstrtspsrc.c:
+ * gst/smpte/gstsmpte.c:
+ * gst/udp/gstdynudpsink.c:
+ * gst/udp/gstmultiudpsink.c:
+ * gst/udp/gstudpsink.c:
+ * gst/udp/gstudpsrc.c:
+ * gst/videobox/gstvideobox.c:
+ * gst/videofilter/gstgamma.c: (gst_gamma_base_init):
+ * gst/videofilter/gstvideobalance.c:
+ * gst/videofilter/gstvideoflip.c:
+ * gst/videofilter/gstvideotemplate.c:
+ (gst_videotemplate_base_init):
+ * gst/videomixer/videomixer.c:
+ * gst/wavparse/gstwavparse.c: (gst_wavparse_base_init),
+ (gst_wavparse_class_init), (gst_wavparse_dispose),
+ (gst_wavparse_reset), (gst_wavparse_init),
+ (gst_wavparse_perform_seek), (gst_wavparse_peek_chunk_info),
+ (gst_wavparse_peek_chunk), (gst_wavparse_stream_headers),
+ (gst_wavparse_parse_stream_init), (gst_wavparse_send_event),
+ (gst_wavparse_add_src_pad), (gst_wavparse_stream_data),
+ (gst_wavparse_chain), (gst_wavparse_srcpad_event),
+ (gst_wavparse_sink_activate), (gst_wavparse_sink_activate_pull),
+ (gst_wavparse_change_state):
+ * gst/wavparse/gstwavparse.h:
+ * sys/oss/gstossmixerelement.c:
+ * sys/oss/gstosssink.c:
+ * sys/oss/gstosssrc.c:
+ * sys/osxaudio/gstosxaudioelement.c:
+ * sys/osxaudio/gstosxaudiosink.c:
+ * sys/osxaudio/gstosxaudiosrc.c:
+ * sys/sunaudio/gstsunaudiomixer.c:
+ * sys/sunaudio/gstsunaudiosink.c:
+ Define GstElementDetails as const and also static (when defined as
+ global)
+
2006-04-25 Tim-Philipp Müller <tim at centricular dot net>
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain):
#include <gst/video/video.h>
/* elementfactory information */
-static GstElementDetails gst_aasink_details =
+static const GstElementDetails gst_aasink_details =
GST_ELEMENT_DETAILS ("ASCII art video sink",
"Sink/Video",
"An ASCII art videosink",
LAST_SIGNAL
};
-static GstElementDetails gst_cmml_dec_details =
+static const GstElementDetails gst_cmml_dec_details =
GST_ELEMENT_DETAILS ("CMML stream decoder",
"Codec/Decoder",
"Decodes CMML streams",
LAST_SIGNAL
};
-static GstElementDetails gst_cmml_enc_details =
+static const GstElementDetails gst_cmml_enc_details =
GST_ELEMENT_DETAILS ("CMML streams encoder",
"Codec/Encoder",
"Encodes CMML streams",
GST_DEBUG_CATEGORY_EXTERN (cairo_debug);
#define GST_CAT_DEFAULT cairo_debug
-static GstElementDetails cairo_text_overlay_details =
+static const GstElementDetails cairo_text_overlay_details =
GST_ELEMENT_DETAILS ("Text overlay",
"Filter/Editor/Video",
"Adds text strings on top of a video buffer",
#include <gst/video/video.h>
-static GstElementDetails cairo_time_overlay_details =
+static const GstElementDetails cairo_time_overlay_details =
GST_ELEMENT_DETAILS ("Time overlay",
"Filter/Editor/Video",
"Overlays the time on a video stream",
PROP_READ_SPEED
};
-static GstElementDetails gst_cdio_cdda_src_details =
+static const GstElementDetails gst_cdio_cdda_src_details =
GST_ELEMENT_DETAILS ("CD audio source (CDDA)",
"Source/File",
"Read audio from CD using libcdio",
#include "gstdvdec.h"
-static GstElementDetails dvdec_details =
+static const GstElementDetails dvdec_details =
GST_ELEMENT_DETAILS ("DV video decoder",
"Codec/Decoder/Video",
"Uses libdv to decode DV video (smpte314) (libdv.sourceforge.net)",
GST_DEBUG_CATEGORY (dvdemux_debug);
#define GST_CAT_DEFAULT dvdemux_debug
-static GstElementDetails dvdemux_details =
+static const GstElementDetails dvdemux_details =
GST_ELEMENT_DETAILS ("DV system stream demuxer",
"Codec/Demuxer",
"Uses libdv to separate DV audio from DV video (libdv.sourceforge.net)",
/* elementfactory information */
-static GstElementDetails esdmon_details =
+static const GstElementDetails esdmon_details =
GST_ELEMENT_DETAILS ("Esound audio monitor",
"Source/Audio",
"Monitors audio from an esound server",
#define GST_CAT_DEFAULT esd_debug
/* elementfactory information */
-static GstElementDetails esdsink_details =
+static const GstElementDetails esdsink_details =
GST_ELEMENT_DETAILS ("Esound audio sink",
"Sink/Audio",
"Plays audio to an esound server",
#include "flac_compat.h"
-GstElementDetails flacenc_details = GST_ELEMENT_DETAILS ("FLAC audio encoder",
+static const GstElementDetails flacenc_details =
+GST_ELEMENT_DETAILS ("FLAC audio encoder",
"Codec/Encoder/Audio",
"Encodes audio with the FLAC lossless audio encoder",
"Wim Taymans <wim.taymans@chello.be>");
};
/* elementfactory information */
-static GstElementDetails gst_flac_tag_details =
+static const GstElementDetails gst_flac_tag_details =
GST_ELEMENT_DETAILS ("FLAC tagger",
"Tag",
"Rewrite tags in a FLAC file",
gst_gconf_audio_sink_base_init (gpointer klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
- GstElementDetails gst_gconf_audio_sink_details =
+ static const GstElementDetails gst_gconf_audio_sink_details =
GST_ELEMENT_DETAILS ("GConf audio sink",
"Sink/Audio",
"Audio sink embedding the GConf-settings for audio output",
gst_gconf_audio_src_base_init (gpointer klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
- GstElementDetails gst_gconf_audio_src_details =
+ static const GstElementDetails gst_gconf_audio_src_details =
GST_ELEMENT_DETAILS ("GConf audio source",
"Source/Audio",
"Audio source embedding the GConf-settings for audio input",
gst_gconf_video_sink_base_init (gpointer klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
- GstElementDetails gst_gconf_video_sink_details =
+ static const GstElementDetails gst_gconf_video_sink_details =
GST_ELEMENT_DETAILS ("GConf video sink",
"Sink/Video",
"Video sink embedding the GConf-settings for video output",
gst_gconf_video_src_base_init (gpointer klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
- GstElementDetails gst_gconf_video_src_details =
+ static const GstElementDetails gst_gconf_video_src_details =
GST_ELEMENT_DETAILS ("GConf video source",
"Source/Video",
"Video source embedding the GConf-settings for video input",
#define GST_CAT_DEFAULT pixbufscale_debug
/* elementfactory information */
-static GstElementDetails pixbufscale_details =
+static const GstElementDetails pixbufscale_details =
GST_ELEMENT_DETAILS ("GdkPixbuf image scaler",
"Filter/Effect/Video",
"Resizes video",
gst_hal_audio_sink_base_init (gpointer klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
- GstElementDetails gst_hal_audio_sink_details =
+ static const GstElementDetails gst_hal_audio_sink_details =
GST_ELEMENT_DETAILS ("HAL audio sink",
"Sink/Audio",
"Audio sink for sound device access via HAL",
gst_hal_audio_src_base_init (gpointer klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
- GstElementDetails gst_hal_audio_src_details =
+ static const GstElementDetails gst_hal_audio_src_details =
GST_ELEMENT_DETAILS ("HAL audio source",
"Source/Audio",
"Audio source for sound device access via HAL",
#include "gst/gst-i18n-plugin.h"
#include <jerror.h>
-GstElementDetails gst_jpeg_dec_details =
+static const GstElementDetails gst_jpeg_dec_details =
GST_ELEMENT_DETAILS ("JPEG image decoder",
"Codec/Decoder/Image",
"Decode images from JPEG format",
#include <gst/video/video.h>
/* elementfactory information */
-GstElementDetails gst_jpegenc_details =
+static const GstElementDetails gst_jpegenc_details =
GST_ELEMENT_DETAILS ("JPEG image encoder",
"Codec/Encoder/Image",
"Encode images in JPEG format",
#include <gst/video/video.h>
/* elementfactory information */
-GstElementDetails gst_smokedec_details =
+static const GstElementDetails gst_smokedec_details =
GST_ELEMENT_DETAILS ("Smoke video decoder",
"Codec/Decoder/Video",
"Decode video from Smoke format",
#include <gst/video/video.h>
/* elementfactory information */
-GstElementDetails gst_smokeenc_details =
+static const GstElementDetails gst_smokeenc_details =
GST_ELEMENT_DETAILS ("Smoke video encoder",
"Codec/Encoder/Video",
"Encode images into the Smoke format",
#include "gstcacasink.h"
/* elementfactory information */
-static GstElementDetails gst_cacasink_details =
+static const GstElementDetails gst_cacasink_details =
GST_ELEMENT_DETAILS ("A colored ASCII art video sink",
"Sink/Video",
"A colored ASCII art videosink",
#include "gstmngdec.h"
#include <gst/video/video.h>
-static GstElementDetails gst_mngdec_details =
+static const GstElementDetails gst_mngdec_details =
GST_ELEMENT_DETAILS ("MNG video decoder",
"Codec/Decoder/Video",
"Decode a mng video to raw images",
#define MAX_HEIGHT 4096
-GstElementDetails gst_mngenc_details = GST_ELEMENT_DETAILS ("MNG video encoder",
+static const GstElementDetails gst_mngenc_details =
+GST_ELEMENT_DETAILS ("MNG video encoder",
"Codec/Encoder/Video",
"Encode a video frame to an .mng video",
"Wim Taymans <wim@fluendo.com>");
#include <gst/video/video.h>
#include <gst/gst-i18n-plugin.h>
-static GstElementDetails gst_pngdec_details =
+static const GstElementDetails gst_pngdec_details =
GST_ELEMENT_DETAILS ("PNG image decoder",
"Codec/Decoder/Image",
"Decode a png video frame to a raw image",
#define MAX_HEIGHT 4096
-static GstElementDetails gst_pngenc_details =
+static const GstElementDetails gst_pngenc_details =
GST_ELEMENT_DETAILS ("PNG image encoder",
"Codec/Encoder/Image",
"Encode a video frame to a .png image",
#include <stdlib.h>
/* elementfactory information */
-GstElementDetails mikmod_details = GST_ELEMENT_DETAILS ("MikMod audio decoder",
+static const GstElementDetails mikmod_details =
+GST_ELEMENT_DETAILS ("MikMod audio decoder",
"Codec/Decoder/Audio",
"Module decoder based on libmikmod",
"Jeremy SIMON <jsimon13@yahoo.fr>");
PROP_GUID
};
-static GstElementDetails gst_dv1394src_details =
+static const GstElementDetails gst_dv1394src_details =
GST_ELEMENT_DETAILS ("Firewire (1394) DV video source",
"Source/Video",
"Source for DV video data from firewire port",
GST_DEBUG_CATEGORY_STATIC (speexdec_debug);
#define GST_CAT_DEFAULT speexdec_debug
-static GstElementDetails speex_dec_details =
+static const GstElementDetails speex_dec_details =
GST_ELEMENT_DETAILS ("Speex audio decoder",
"Codec/Decoder/Audio",
"decode speex streams to audio",
static GstPadTemplate *gst_speexenc_src_template, *gst_speexenc_sink_template;
/* elementfactory information */
-GstElementDetails speexenc_details = GST_ELEMENT_DETAILS ("Speex audio encoder",
+static const GstElementDetails speexenc_details =
+GST_ELEMENT_DETAILS ("Speex audio encoder",
"Codec/Encoder/Audio",
"Encodes audio in Speex format",
"Wim Taymans <wim@fluendo.com>");
};
/* elementfactory information */
-static GstElementDetails gst_alpha_details =
+static const GstElementDetails gst_alpha_details =
GST_ELEMENT_DETAILS ("Alpha filter",
"Filter/Effect/Video",
"Adds an alpha channel to video",
};
/* elementfactory information */
-static GstElementDetails gst_alpha_color_details =
+static const GstElementDetails gst_alpha_color_details =
GST_ELEMENT_DETAILS ("Alpha color filter",
"Filter/Effect/Video",
"RGB->YUV colorspace conversion preserving the alpha channels",
GST_DEBUG_CATEGORY (apedemux_debug);
#define GST_CAT_DEFAULT (apedemux_debug)
-static GstElementDetails gst_ape_demux_details =
+static const GstElementDetails gst_ape_demux_details =
GST_ELEMENT_DETAILS ("APE tag demuxer",
"Codec/Demuxer/Metadata",
"Read and output APE tags while demuxing the contents",
#include <gst/audio/audio.h>
/* elementfactory information */
-static GstElementDetails gst_au_parse_details =
+static const GstElementDetails gst_au_parse_details =
GST_ELEMENT_DETAILS ("AU audio demuxer",
"Codec/Demuxer/Audio",
"Parse an .au file into raw audio",
gst_auto_audio_sink_base_init (gpointer klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
- GstElementDetails gst_auto_audio_sink_details =
+ const GstElementDetails gst_auto_audio_sink_details =
GST_ELEMENT_DETAILS ("Auto audio sink",
"Sink/Audio",
"Wrapper audio sink for automatically detected audio sink",
gst_auto_video_sink_base_init (gpointer klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
- GstElementDetails gst_auto_video_sink_details =
+ const GstElementDetails gst_auto_video_sink_details =
GST_ELEMENT_DETAILS ("Auto video sink",
"Sink/Video",
"Wrapper video sink for automatically detected video sink",
static void
gst_avi_demux_base_init (GstAviDemuxClass * klass)
{
- static GstElementDetails gst_avi_demux_details =
+ static const GstElementDetails gst_avi_demux_details =
GST_ELEMENT_DETAILS ("Avi demuxer",
"Codec/Demuxer",
"Demultiplex an avi file into audio and video",
gst_avimux_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- static GstElementDetails gst_avimux_details =
+ static const GstElementDetails gst_avimux_details =
GST_ELEMENT_DETAILS ("Avi muxer",
"Codec/Muxer",
"Muxes audio and video into an avi stream",
#define CUTTER_DEFAULT_THRESHOLD_LENGTH (500 * GST_MSECOND)
#define CUTTER_DEFAULT_PRE_LENGTH (200 * GST_MSECOND)
-static GstElementDetails cutter_details = GST_ELEMENT_DETAILS ("Audio cutter",
+static const GstElementDetails cutter_details =
+GST_ELEMENT_DETAILS ("Audio cutter",
"Filter/Editor/Audio",
"Audio Cutter to split audio into non-silent bits",
"Thomas <thomas@apestaart.org>");
static gboolean gst_break_my_data_stop (GstBaseTransform * trans);
static gboolean gst_break_my_data_start (GstBaseTransform * trans);
-static GstElementDetails details = GST_ELEMENT_DETAILS ("Break my data",
+static const GstElementDetails details = GST_ELEMENT_DETAILS ("Break my data",
"Testing",
"randomly change data in the stream",
"Benjamin Otte <otte@gnome>");
GST_DEBUG_CATEGORY_STATIC (gst_efence_debug);
#define GST_CAT_DEFAULT gst_efence_debug
-static GstElementDetails plugin_details = GST_ELEMENT_DETAILS ("Electric Fence",
+static const GstElementDetails plugin_details =
+GST_ELEMENT_DETAILS ("Electric Fence",
"Testing",
"This element converts a stream of normal GStreamer buffers into a "
"stream of buffers that are allocated in such a way that out-of-bounds "
GST_DEBUG_CATEGORY (navigationtest_debug);
#define GST_CAT_DEFAULT navigationtest_debug
-static GstElementDetails navigationtest_details =
+static const GstElementDetails navigationtest_details =
GST_ELEMENT_DETAILS ("Video navigation test",
"Filter/Effect/Video",
"Handle navigation events showing a black square following mouse pointer",
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-static GstElementDetails navseek_details =
+static const GstElementDetails navseek_details =
GST_ELEMENT_DETAILS ("Seek based on left-right arrows",
"Filter/Video",
"Seek based on navigation keys left-right",
GType gst_gst_negotiation_get_type (void);
-static GstElementDetails plugin_details = GST_ELEMENT_DETAILS ("Negotiation",
+static const GstElementDetails plugin_details =
+GST_ELEMENT_DETAILS ("Negotiation",
"Testing",
"This element acts like identity, except that one can control how "
"negotiation works",
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-static GstElementDetails progress_report_details =
+static const GstElementDetails progress_report_details =
GST_ELEMENT_DETAILS ("Progress report",
"Testing",
"Periodically query and report on processing progress",
GST_STATIC_CAPS_ANY);
-static GstElementDetails details = GST_ELEMENT_DETAILS ("Test plugin",
+static const GstElementDetails details = GST_ELEMENT_DETAILS ("Test plugin",
"Testing",
"perform a number of tests",
"Benjamin Otte <otte@gnome>");
GType gst_agingtv_get_type (void);
-static GstElementDetails agingtv_details =
+static const GstElementDetails agingtv_details =
GST_ELEMENT_DETAILS ("AgingTV effect",
"Filter/Effect/Video",
"AgingTV adds age to video input using scratches and dust",
static void gst_dicetv_create_map (GstDiceTV * filter);
-static GstElementDetails gst_dicetv_details =
+static const GstElementDetails gst_dicetv_details =
GST_ELEMENT_DETAILS ("DiceTV effect",
"Filter/Effect/Video",
"'Dices' the screen up into many small squares",
GType gst_edgetv_get_type (void);
-static GstElementDetails gst_edgetv_details =
+static const GstElementDetails gst_edgetv_details =
GST_ELEMENT_DETAILS ("EdgeTV effect",
"Filter/Effect/Video",
"Apply edge detect on video",
static void gst_quarktv_planetable_clear (GstQuarkTV * filter);
-static GstElementDetails quarktv_details =
+static const GstElementDetails quarktv_details =
GST_ELEMENT_DETAILS ("QuarkTV effect",
"Filter/Effect/Video",
"Motion dissolver",
GType gst_revtv_get_type (void);
-static GstElementDetails gst_revtv_details =
+static const GstElementDetails gst_revtv_details =
GST_ELEMENT_DETAILS ("RevTV effect",
"Filter/Effect/Video",
"A video waveform monitor for each line of video processed",
static void gst_shagadelic_initialize (GstShagadelicTV * filter);
-static GstElementDetails shagadelictv_details =
+static const GstElementDetails shagadelictv_details =
GST_ELEMENT_DETAILS ("ShagadelicTV",
"Filter/Effect/Video",
"Oh behave, ShagedelicTV makes images shagadelic!",
ARG_ZOOM_SPEED
};
-static GstElementDetails vertigotv_details =
+static const GstElementDetails vertigotv_details =
GST_ELEMENT_DETAILS ("VertigoTV effect",
"Filter/Effect/Video",
"A loopback alpha blending effector with rotating and scaling",
static void initOffsTable (GstWarpTV * filter);
static void initDistTable (GstWarpTV * filter);
-static GstElementDetails warptv_details = GST_ELEMENT_DETAILS ("WarpTV effect",
+static const GstElementDetails warptv_details =
+GST_ELEMENT_DETAILS ("WarpTV effect",
"Filter/Effect/Video",
"WarpTV does realtime goo'ing of the video input",
"Sam Lantinga <slouken@devolution.com>");
#define GST_CAT_DEFAULT flxdec_debug
/* flx element information */
-static GstElementDetails flxdec_details =
+static const GstElementDetails flxdec_details =
GST_ELEMENT_DETAILS ("FLX audio decoder",
"Codec/Decoder/Audio",
"FLX decoder",
#define GST_CAT_DEFAULT goom_debug
/* elementfactory information */
-static GstElementDetails gst_goom_details =
+static const GstElementDetails gst_goom_details =
GST_ELEMENT_DETAILS ("GOOM: what a GOOM!",
"Visualization",
"Takes frames of data and outputs video frames using the GOOM filter",
#include <string.h>
-static GstElementDetails gst_icydemux_details =
+static const GstElementDetails gst_icydemux_details =
GST_ELEMENT_DETAILS ("ICY tag demuxer",
"Codec/Demuxer/Metadata",
"Read and output ICY tags while demuxing the contents",
#include "gstid3demux.h"
#include "id3tags.h"
-static GstElementDetails gst_id3demux_details =
+static const GstElementDetails gst_id3demux_details =
GST_ELEMENT_DETAILS ("ID3 tag demuxer",
"Codec/Demuxer/Metadata",
"Read and output ID3v1 and ID3v2 tags while demuxing the contents",
gst_alawdec_base_init (GstALawDecClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- GstElementDetails alawdec_details =
+ const GstElementDetails alawdec_details =
GST_ELEMENT_DETAILS ("A Law audio decoder",
"Codec/Decoder/Audio",
"Convert 8bit A law to 16bit PCM",
gst_alawenc_base_init (GstALawEncClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- GstElementDetails alawenc_details =
+ const GstElementDetails alawenc_details =
GST_ELEMENT_DETAILS ("A Law audio encoder",
"Codec/Encoder/Audio",
"Convert 16bit PCM to 8bit A law",
gst_mulawdec_base_init (GstMuLawDecClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- GstElementDetails mulawdec_details =
+ const GstElementDetails mulawdec_details =
GST_ELEMENT_DETAILS ("Mu Law audio decoder",
"Codec/Decoder/Audio",
"Convert 8bit mu law to 16bit PCM",
gst_mulawenc_base_init (GstMuLawEncClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- GstElementDetails mulawenc_details =
+ const GstElementDetails mulawenc_details =
GST_ELEMENT_DETAILS ("Mu Law audio encoder",
"Codec/Encoder/Audio",
"Convert 16bit PCM to 8bit mu law",
GST_DEBUG_CATEGORY (level_debug);
#define GST_CAT_DEFAULT level_debug
-static GstElementDetails level_details = GST_ELEMENT_DETAILS ("Level",
+static const GstElementDetails level_details = GST_ELEMENT_DETAILS ("Level",
"Filter/Analyzer/Audio",
"RMS/Peak/Decaying Peak Level messager for audio/raw",
"Thomas Vander Stichele <thomas at apestaart dot org>");
gst_matroska_demux_base_init (GstMatroskaDemuxClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- static GstElementDetails gst_matroska_demux_details =
+ static const GstElementDetails gst_matroska_demux_details =
GST_ELEMENT_DETAILS ("Matroska demuxer",
"Codec/Demuxer",
"Demuxes a Matroska Stream into video/audio/subtitles",
gst_matroska_mux_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- static GstElementDetails gst_matroska_mux_details =
+ static const GstElementDetails gst_matroska_mux_details =
GST_ELEMENT_DETAILS ("Matroska muxer",
"Codec/Muxer",
"Muxes video/audio/subtitle streams into a matroska stream",
#include <gst/video/video.h>
/* elementfactory information */
-static GstElementDetails median_details = GST_ELEMENT_DETAILS ("Median effect",
+static const GstElementDetails median_details =
+GST_ELEMENT_DETAILS ("Median effect",
"Filter/Effect/Video",
"Apply a median filter to an image",
"Wim Taymans <wim.taymans@chello.be>");
/* elementfactory information */
-static GstElementDetails gst_monoscope_details =
+static const GstElementDetails gst_monoscope_details =
GST_ELEMENT_DETAILS ("Monoscope",
"Visualization",
"Displays a highly stabilised waveform of audio input",
#define GST_CAT_DEFAULT gst_multipart_demux_debug
/* elementfactory information */
-static GstElementDetails gst_multipart_demux_details =
+static const GstElementDetails gst_multipart_demux_details =
GST_ELEMENT_DETAILS ("Multipart demuxer",
"Codec/Demuxer",
"demux multipart streams",
};
/* elementfactory information */
-static GstElementDetails gst_multipart_mux_details =
+static const GstElementDetails gst_multipart_mux_details =
GST_ELEMENT_DETAILS ("Multipart muxer",
"Codec/Muxer",
"mux multipart streams",
GST_DEBUG_CATEGORY_STATIC (gst_aggregator_debug);
#define GST_CAT_DEFAULT gst_aggregator_debug
-GstElementDetails gst_aggregator_details =
+static const GstElementDetails gst_aggregator_details =
GST_ELEMENT_DETAILS ("Aggregator pipe fitting",
"Generic",
"N-to-1 pipe fitting",
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
#define GST_CAT_DEFAULT gst_fdsink_debug
-GstElementDetails gst_fdsink_details =
+static const GstElementDetails gst_fdsink_details =
GST_ELEMENT_DETAILS ("Filedescriptor Sink",
"Sink/File",
"Write data to a file descriptor",
GST_DEBUG_CATEGORY_STATIC (gst_md5sink_debug);
#define GST_CAT_DEFAULT gst_md5sink_debug
-GstElementDetails gst_md5sink_details = GST_ELEMENT_DETAILS ("MD5 Sink",
+static const GstElementDetails gst_md5sink_details =
+GST_ELEMENT_DETAILS ("MD5 Sink",
"Sink",
"compute MD5 for incoming data",
"Benjamin Otte <in7y118@public.uni-hamburg.de>");
GST_DEBUG_CATEGORY_STATIC (gst_multifilesrc_debug);
#define GST_CAT_DEFAULT gst_multifilesrc_debug
-GstElementDetails gst_multifilesrc_details =
+static const GstElementDetails gst_multifilesrc_details =
GST_ELEMENT_DETAILS ("Multi file source",
"Source/File",
"Read from multiple files in order",
GST_DEBUG_CATEGORY_STATIC (gst_pipefilter_debug);
#define GST_CAT_DEFAULT gst_pipefilter_debug
-GstElementDetails gst_pipefilter_details = GST_ELEMENT_DETAILS ("Pipe filter",
+static const GstElementDetails gst_pipefilter_details =
+GST_ELEMENT_DETAILS ("Pipe filter",
"Filter",
"Interoperate with an external program using stdin and stdout",
"Erik Walthinsen <omega@cse.ogi.edu>, "
GST_DEBUG_CATEGORY_STATIC (gst_shaper_debug);
#define GST_CAT_DEFAULT gst_shaper_debug
-GstElementDetails gst_shaper_details = GST_ELEMENT_DETAILS ("Shaper",
+static const GstElementDetails gst_shaper_details =
+GST_ELEMENT_DETAILS ("Shaper",
"Generic",
"Synchronizes streams on different pads",
"Wim Taymans <wim.taymans@chello.be>");
GST_DEBUG_CATEGORY_STATIC (gst_statistics_debug);
#define GST_CAT_DEFAULT gst_statistics_debug
-GstElementDetails gst_statistics_details = GST_ELEMENT_DETAILS ("Statistics",
+static const GstElementDetails gst_statistics_details =
+GST_ELEMENT_DETAILS ("Statistics",
"Generic",
"Statistics on buffers/bytes/events",
"David I. Lehn <dlehn@users.sourceforge.net>");
#define GST_ASTERISKH263_HEADER_LENGTH(buf) (((GstAsteriskH263Header *)(GST_BUFFER_DATA (buf)))->length)
/* elementfactory information */
-static GstElementDetails gst_rtp_h263p_depaydetails =
+static const GstElementDetails gst_rtp_h263p_depaydetails =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts H263 video from RTP and encodes in Asterisk H263 format",
#include "gstrtp-common.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_L16depay_details =
+static const GstElementDetails gst_rtp_L16depay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts raw audio from RTP packets",
#include "gstrtpL16pay.h"
/* elementfactory information */
-static GstElementDetails gst_rtpL16pay_details =
+static const GstElementDetails gst_rtpL16pay_details =
GST_ELEMENT_DETAILS ("RTP RAW audio payloader",
"Codec/Payloader/Network",
"Payload-encodes Raw Audio into a RTP packet",
*/
/* elementfactory information */
-static GstElementDetails gst_rtp_amrdepay_details =
+static const GstElementDetails gst_rtp_amrdepay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts AMR audio from RTP packets (RFC 3267)",
*/
/* elementfactory information */
-static GstElementDetails gst_rtp_amrpay_details =
+static const GstElementDetails gst_rtp_amrpay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payload-encode AMR audio into RTP packets (RFC 3267)",
#define GST_CAT_DEFAULT (rtpdepay_debug)
/* elementfactory information */
-static GstElementDetails rtpdepay_details =
+static const GstElementDetails rtpdepay_details =
GST_ELEMENT_DETAILS ("RTP payloader",
"Codec/Depayr/Network",
"Accepts raw RTP and RTCP packets and sends them forward",
#include "gstrtpgsmpay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_gsm_pay_details =
+static const GstElementDetails gst_rtp_gsm_pay_details =
GST_ELEMENT_DETAILS ("RTP GSM audio payloader",
"Codec/Payloader/Network",
"Payload-encodes GSM audio into a RTP packet",
/* elementfactory information */
-static GstElementDetails gst_rtp_h263pay_details =
+static const GstElementDetails gst_rtp_h263pay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payload-encodes H263 video in RTP packets (RFC 2190)",
#include "gstrtph263pdepay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_h263pdepay_details =
+static const GstElementDetails gst_rtp_h263pdepay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts H263+ video from RTP packets (RFC 2429)",
#include "gstrtph263ppay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_h263ppay_details =
+static const GstElementDetails gst_rtp_h263ppay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payload-encodes H263+ video in RTP packets (RFC 2429)",
#include "gstrtpilbcdepay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_ilbc_depay_details =
+static const GstElementDetails gst_rtp_ilbc_depay_details =
GST_ELEMENT_DETAILS ("RTP iLBC packet depayloader",
"Codec/Depayr/Network",
"Extracts iLBC audio from RTP packets",
#define GST_CAT_DEFAULT (rtpmp4gpay_debug)
/* elementfactory information */
-static GstElementDetails gst_rtp_mp4gpay_details =
+static const GstElementDetails gst_rtp_mp4gpay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payload MPEG4 elementary streams as RTP packets (RFC 3640)",
#include "gstrtpmp4vdepay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_mp4vdepay_details =
+static const GstElementDetails gst_rtp_mp4vdepay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts MPEG4 video from RTP packets (RFC 3016)",
#define GST_CAT_DEFAULT (rtpmp4vpay_debug)
/* elementfactory information */
-static GstElementDetails gst_rtp_mp4vpay_details =
+static const GstElementDetails gst_rtp_mp4vpay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payode MPEG4 video as RTP packets (RFC 3016)",
#include "gstrtpmpadepay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_mpadepay_details =
+static const GstElementDetails gst_rtp_mpadepay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts MPEG audio from RTP packets (RFC 2038)",
#include "gstrtpmpapay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_mpapay_details =
+static const GstElementDetails gst_rtp_mpapay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payode MPEG audio as RTP packets (RFC 2038)",
#include "gstrtppcmadepay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_pcmadepay_details =
+static const GstElementDetails gst_rtp_pcmadepay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts PCMA audio from RTP packets",
#include "gstrtppcmapay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_pcma_pay_details =
+static const GstElementDetails gst_rtp_pcma_pay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payload-encodes PCMA audio into a RTP packet",
#include "gstrtppcmudepay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_pcmudepay_details =
+static const GstElementDetails gst_rtp_pcmudepay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts PCMU audio from RTP packets",
#include "gstrtppcmupay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_pcmu_pay_details =
+static const GstElementDetails gst_rtp_pcmu_pay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payload-encodes PCMU audio into a RTP packet",
#include "gstrtpspeexdepay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_speexdepay_details =
+static const GstElementDetails gst_rtp_speexdepay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Depayr/Network",
"Extracts Speex audio from RTP packets",
#include "gstrtpspeexpay.h"
/* elementfactory information */
-static GstElementDetails gst_rtp_speex_pay_details =
+static const GstElementDetails gst_rtp_speex_pay_details =
GST_ELEMENT_DETAILS ("RTP packet parser",
"Codec/Payloader/Network",
"Payload-encodes Speex audio into a RTP packet",
#define GST_CAT_DEFAULT (rtpdec_debug)
/* elementfactory information */
-static GstElementDetails rtpdec_details = GST_ELEMENT_DETAILS ("RTP Decoder",
+static const GstElementDetails rtpdec_details =
+GST_ELEMENT_DETAILS ("RTP Decoder",
"Codec/Parser/Network",
"Accepts raw RTP and RTCP packets and sends them forward",
"Wim Taymans <wim@fluendo.com>");
#define GST_CAT_DEFAULT (rtspsrc_debug)
/* elementfactory information */
-static GstElementDetails gst_rtspsrc_details =
+static const GstElementDetails gst_rtspsrc_details =
GST_ELEMENT_DETAILS ("RTSP packet receiver",
"Source/Network",
"Receive data over the network via RTSP (RFC 2326)",
#include "paint.h"
/* elementfactory information */
-static GstElementDetails smpte_details =
+static const GstElementDetails smpte_details =
GST_ELEMENT_DETAILS ("SMPTE transitions",
"Filter/Editor/Video",
"Apply the standard SMPTE transitions on video images",
GST_STATIC_CAPS_ANY);
/* elementfactory information */
-static GstElementDetails gst_dynudpsink_details =
+static const GstElementDetails gst_dynudpsink_details =
GST_ELEMENT_DETAILS ("UDP packet sender",
"Sink/Network",
"Send data over the network via UDP",
GST_STATIC_CAPS_ANY);
/* elementfactory information */
-static GstElementDetails gst_multiudpsink_details =
+static const GstElementDetails gst_multiudpsink_details =
GST_ELEMENT_DETAILS ("UDP packet sender",
"Sink/Network",
"Send data over the network via UDP",
#define UDP_DEFAULT_PORT 4951
/* elementfactory information */
-static GstElementDetails gst_udpsink_details =
+static const GstElementDetails gst_udpsink_details =
GST_ELEMENT_DETAILS ("UDP packet sender",
"Sink/Network",
"Send data over the network via UDP",
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-static GstElementDetails gst_udpsrc_details =
+static const GstElementDetails gst_udpsrc_details =
GST_ELEMENT_DETAILS ("UDP packet receiver",
"Source/Network",
"Receive data over the network via UDP",
};
/* elementfactory information */
-static GstElementDetails gst_video_box_details =
+static const GstElementDetails gst_video_box_details =
GST_ELEMENT_DETAILS ("Video box filter",
"Filter/Effect/Video",
"Resizes a video by adding borders or cropping",
static void
gst_gamma_base_init (gpointer g_class)
{
- static GstElementDetails gamma_details =
+ static const GstElementDetails gamma_details =
GST_ELEMENT_DETAILS ("Video gamma correction",
"Filter/Effect/Video",
"Adjusts gamma on a video stream",
#define rint(x) (floor((x)+0.5))
#endif
-static GstElementDetails video_balance_details =
+static const GstElementDetails video_balance_details =
GST_ELEMENT_DETAILS ("Video balance",
"Filter/Effect/Video",
"Adjusts brightness, contrast, hue, saturation on a video stream",
GST_DEBUG_CATEGORY (video_flip_debug);
#define GST_CAT_DEFAULT video_flip_debug
-static GstElementDetails video_flip_details =
+static const GstElementDetails video_flip_details =
GST_ELEMENT_DETAILS ("Video flipper",
"Filter/Effect/Video",
"Flips and rotates video",
static void
gst_videotemplate_base_init (gpointer g_class)
{
- static GstElementDetails videotemplate_details =
+ static const GstElementDetails videotemplate_details =
GST_ELEMENT_DETAILS ("Video filter template",
"Filter/Effect/Video",
"Template for a video filter",
/* elementfactory information */
-static GstElementDetails gst_videomixer_details =
+static const GstElementDetails gst_videomixer_details =
GST_ELEMENT_DETAILS ("Video mixer",
"Filter/Editor/Video",
"Mix multiple video streams",
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2006> Nokia Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
#include "gst/riff/riff-media.h"
#include <gst/gst-i18n-plugin.h>
+#ifndef G_MAXUINT32
+#define G_MAXUINT32 0xffffffff
+#endif
+
GST_DEBUG_CATEGORY_STATIC (wavparse_debug);
#define GST_CAT_DEFAULT (wavparse_debug)
static void gst_wavparse_base_init (gpointer g_class);
static void gst_wavparse_class_init (GstWavParseClass * klass);
static void gst_wavparse_init (GstWavParse * wavparse);
+static void gst_wavparse_dispose (GObject * object);
static gboolean gst_wavparse_sink_activate (GstPad * sinkpad);
static gboolean gst_wavparse_sink_activate_pull (GstPad * sinkpad,
gboolean active);
static gboolean gst_wavparse_send_event (GstElement * element,
GstEvent * event);
+static GstFlowReturn gst_wavparse_chain (GstPad * pad, GstBuffer * buf);
static GstStateChangeReturn gst_wavparse_change_state (GstElement * element,
GstStateChange transition);
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstPadTemplate *templ;
- static GstElementDetails gst_wavparse_details =
+ static const GstElementDetails gst_wavparse_details =
GST_ELEMENT_DETAILS ("WAV audio demuxer",
"Codec/Demuxer/Audio",
"Parse a .wav file into raw audio",
parent_class = g_type_class_peek_parent (klass);
object_class->get_property = gst_wavparse_get_property;
+ object_class->dispose = gst_wavparse_dispose;
gstelement_class->change_state = gst_wavparse_change_state;
gstelement_class->send_event = gst_wavparse_send_event;
GST_DEBUG_CATEGORY_INIT (wavparse_debug, "wavparse", 0, "WAV parser");
}
+
+static void
+gst_wavparse_dispose (GObject * object)
+{
+ GST_DEBUG ("WAV: Dispose\n");
+ GstWavParse *wav = GST_WAVPARSE (object);
+
+ if (wav->adapter) {
+ g_object_unref (wav->adapter);
+ wav->adapter = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+
static void
gst_wavparse_reset (GstWavParse * wavparse)
{
wavparse->dataleft = 0;
wavparse->datasize = 0;
wavparse->datastart = 0;
+ wavparse->got_fmt = FALSE;
+
+ if (wavparse->seek_event)
+ gst_event_unref (wavparse->seek_event);
+ wavparse->seek_event = NULL;
/* we keep the segment info in time */
gst_segment_init (&wavparse->segment, GST_FORMAT_TIME);
GST_DEBUG_FUNCPTR (gst_wavparse_sink_activate));
gst_pad_set_activatepull_function (wavparse->sinkpad,
GST_DEBUG_FUNCPTR (gst_wavparse_sink_activate_pull));
+ gst_pad_set_chain_function (wavparse->sinkpad,
+ GST_DEBUG_FUNCPTR (gst_wavparse_chain));
gst_element_add_pad (GST_ELEMENT (wavparse), wavparse->sinkpad);
}
gboolean update;
GstSegment seeksegment;
-
if (event) {
GST_DEBUG_OBJECT (wav, "doing seek with event");
flush = flags & GST_SEEK_FLAG_FLUSH;
- if (flush)
+ if (flush) {
+ GST_DEBUG_OBJECT (wav, "sending flush start");
gst_pad_push_event (wav->srcpad, gst_event_new_flush_start ());
- else
+ } else {
gst_pad_pause_task (wav->sinkpad);
+ }
GST_PAD_STREAM_LOCK (wav->sinkpad);
/* prepare for streaming again */
if (flush) {
+ GST_DEBUG_OBJECT (wav, "sending flush stop");
gst_pad_push_event (wav->srcpad, gst_event_new_flush_stop ());
} else if (wav->segment_running) {
/* we are running the current segment and doing a non-flushing seek,
}
}
+
+/*
+ * gst_wavparse_peek_chunk_info:
+ * @wav Wavparse object
+ * @tag holder for tag
+ * @size holder for tag size
+ *
+ * Peek next chunk info (tag and size)
+ *
+ * Returns: %TRUE when one chunk info has been got from the adapter
+ */
+static gboolean
+gst_wavparse_peek_chunk_info (GstWavParse * wav, guint32 * tag, guint32 * size)
+{
+ const guint8 *data = NULL;
+
+ if (gst_adapter_available (wav->adapter) < 8) {
+ return FALSE;
+ }
+
+ GST_DEBUG ("Next chunk size is %d bytes", *size);
+ data = gst_adapter_peek (wav->adapter, 8);
+ *tag = GST_READ_UINT32_LE (data);
+ *size = GST_READ_UINT32_LE (data + 4);
+
+ return TRUE;
+}
+
+
+/*
+ * gst_wavparse_peek_chunk:
+ * @wav Wavparse object
+ * @tag holder for tag
+ * @size holder for tag size
+ *
+ * Peek enough data for one full chunk
+ *
+ * Returns: %TRUE when one chunk has been got
+ */
+static gboolean
+gst_wavparse_peek_chunk (GstWavParse * wav, guint32 * tag, guint32 * size)
+{
+ guint32 peek_size = 0;
+
+ gst_wavparse_peek_chunk_info (wav, tag, size);
+ GST_DEBUG ("Need to peek chunk of %d bytes", *size);
+ peek_size = (*size + 1) & ~1;
+
+ if (gst_adapter_available (wav->adapter) >= (8 + peek_size)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
static gboolean
gst_wavparse_get_upstream_size (GstWavParse * wav, gint64 * len)
{
gst_wavparse_stream_headers (GstWavParse * wav)
{
GstFlowReturn res;
- GstBuffer *buf, *extra;
+ GstBuffer *buf;
gst_riff_strf_auds *header = NULL;
- guint32 tag;
+ guint32 tag, size;
gboolean gotdata = FALSE;
GstCaps *caps;
gint64 duration;
gchar *codec_name = NULL;
GstEvent **event_p;
- /* The header start with a 'fmt ' tag */
- if ((res = gst_riff_read_chunk (GST_ELEMENT (wav), wav->sinkpad,
- &wav->offset, &tag, &buf)) != GST_FLOW_OK)
- return res;
+ if (!wav->got_fmt) {
+ GstBuffer *extra;
- else if (tag != GST_RIFF_TAG_fmt)
- goto invalid_wav;
+ /* The header start with a 'fmt ' tag */
- if (!(gst_riff_parse_strf_auds (GST_ELEMENT (wav), buf, &header, &extra)))
- goto parse_header_error;
+ if (wav->streaming) {
+ if (!gst_wavparse_peek_chunk (wav, &tag, &size))
+ return GST_FLOW_OK;
- /* Note: gst_riff_create_audio_caps might nedd to fix values in
- * the header header depending on the format, so call it first */
- caps =
- gst_riff_create_audio_caps (header->format, NULL, header, extra,
- NULL, &codec_name);
+ buf = gst_buffer_new ();
+ gst_buffer_ref (buf);
+ gst_adapter_flush (wav->adapter, 8);
+ wav->offset += 8;
+ GST_BUFFER_DATA (buf) = (guint8 *) gst_adapter_peek (wav->adapter, size);
+ GST_BUFFER_SIZE (buf) = size;
- if (extra)
- gst_buffer_unref (extra);
+ } else {
+ if ((res = gst_riff_read_chunk (GST_ELEMENT (wav), wav->sinkpad,
+ &wav->offset, &tag, &buf)) != GST_FLOW_OK)
+ return res;
+ }
- wav->format = header->format;
- wav->rate = header->rate;
- wav->channels = header->channels;
+ if (tag != GST_RIFF_TAG_fmt)
+ goto invalid_wav;
- if (wav->channels == 0)
- goto no_channels;
+ if (!(gst_riff_parse_strf_auds (GST_ELEMENT (wav), buf, &header, &extra)))
+ goto parse_header_error;
- wav->blockalign = header->blockalign;
- wav->width = (header->blockalign * 8) / header->channels;
- wav->depth = header->size;
- wav->bps = header->av_bps;
+ if (extra)
+ gst_buffer_unref (extra);
- if (wav->bps <= 0)
- goto no_bitrate;
+ if (wav->streaming) {
+ gst_adapter_flush (wav->adapter, size);
+ wav->offset += size;
+ GST_BUFFER_DATA (buf) = NULL;
+ gst_buffer_unref (buf);
+ }
- wav->bytes_per_sample = wav->channels * wav->width / 8;
- if (wav->bytes_per_sample <= 0)
- goto no_bytes_per_sample;
+ /* Note: gst_riff_create_audio_caps might nedd to fix values in
+ * the header header depending on the format, so call it first */
+ caps =
+ gst_riff_create_audio_caps (header->format, NULL, header, NULL,
+ NULL, &codec_name);
- g_free (header);
+ wav->format = header->format;
+ wav->rate = header->rate;
+ wav->channels = header->channels;
- if (!caps)
- goto unknown_format;
+ if (wav->channels == 0)
+ goto no_channels;
- GST_DEBUG_OBJECT (wav, "blockalign = %u", (guint) wav->blockalign);
- GST_DEBUG_OBJECT (wav, "width = %u", (guint) wav->width);
- GST_DEBUG_OBJECT (wav, "depth = %u", (guint) wav->depth);
- GST_DEBUG_OBJECT (wav, "bps = %u", (guint) wav->bps);
+ wav->blockalign = header->blockalign;
+ wav->width = (header->blockalign * 8) / header->channels;
+ wav->depth = header->size;
+ wav->bps = header->av_bps;
- /* create pad later so we can sniff the first few bytes
- * of the real data and correct our caps if necessary */
- gst_caps_replace (&wav->caps, caps);
- gst_caps_replace (&caps, NULL);
+ if (wav->bps <= 0)
+ goto no_bitrate;
- if (codec_name) {
- wav->tags = gst_tag_list_new ();
+ wav->bytes_per_sample = wav->channels * wav->width / 8;
+ if (wav->bytes_per_sample <= 0)
+ goto no_bytes_per_sample;
- gst_tag_list_add (wav->tags, GST_TAG_MERGE_REPLACE,
- GST_TAG_AUDIO_CODEC, codec_name, NULL);
+ g_free (header);
- g_free (codec_name);
- codec_name = NULL;
- }
+ if (!caps)
+ goto unknown_format;
+
+ GST_DEBUG_OBJECT (wav, "blockalign = %u", (guint) wav->blockalign);
+ GST_DEBUG_OBJECT (wav, "width = %u", (guint) wav->width);
+ GST_DEBUG_OBJECT (wav, "depth = %u", (guint) wav->depth);
+ GST_DEBUG_OBJECT (wav, "bps = %u", (guint) wav->bps);
+
+ /* create pad later so we can sniff the first few bytes
+ * of the real data and correct our caps if necessary */
+ gst_caps_replace (&wav->caps, caps);
+ gst_caps_replace (&caps, NULL);
- GST_DEBUG_OBJECT (wav, "frequency %d, channels %d", wav->rate, wav->channels);
+ wav->got_fmt = TRUE;
+
+ if (codec_name) {
+ wav->tags = gst_tag_list_new ();
+
+ gst_tag_list_add (wav->tags, GST_TAG_MERGE_REPLACE,
+ GST_TAG_AUDIO_CODEC, codec_name, NULL);
+
+ g_free (codec_name);
+ codec_name = NULL;
+ }
+
+ GST_DEBUG_OBJECT (wav, "frequency %d, channels %d", wav->rate,
+ wav->channels);
+ }
/* loop headers until we get data */
while (!gotdata) {
- guint size;
- guint32 tag;
- if ((res =
- gst_pad_pull_range (wav->sinkpad, wav->offset, 8,
- &buf)) != GST_FLOW_OK)
- goto header_read_error;
+ if (wav->streaming) {
+ if (!gst_wavparse_peek_chunk_info (wav, &tag, &size))
+ return GST_FLOW_OK;
+ } else {
+ if ((res =
+ gst_pad_pull_range (wav->sinkpad, wav->offset, 8,
+ &buf)) != GST_FLOW_OK)
+ goto header_read_error;
+ tag = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf));
+ size = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf) + 4);
+ }
/*
wav is a st00pid format, we don't know for sure where data starts.
So we have to go bit by bit until we find the 'data' header
*/
- tag = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf));
- size = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf) + 4);
switch (tag) {
/* TODO : Implement the various cases */
GST_DEBUG_OBJECT (wav, "Got 'data' TAG, size : %d", size);
gotdata = TRUE;
+ if (wav->streaming) {
+ gst_adapter_flush (wav->adapter, 8);
+ } else {
+ gst_buffer_unref (buf);
+ }
wav->offset += 8;
wav->datastart = wav->offset;
/* file might be truncated */
break;
}
default:
+ if (wav->streaming) {
+ if (!gst_wavparse_peek_chunk (wav, &tag, &size))
+ return GST_FLOW_OK;
+ }
GST_DEBUG_OBJECT (wav, "Ignoring tag %" GST_FOURCC_FORMAT,
GST_FOURCC_ARGS (tag));
wav->offset += 8 + ((size + 1) & ~1);
- break;
+ if (wav->streaming) {
+ gst_adapter_flush (wav->adapter, 8 + ((size + 1) & ~1));
+ } else {
+ gst_buffer_unref (buf);
+ }
}
- gst_buffer_unref (buf);
}
GST_DEBUG_OBJECT (wav, "Finished parsing headers");
event_p = &wav->seek_event;
gst_event_replace (event_p, NULL);
+ wav->state = GST_WAVPARSE_DATA;
return GST_FLOW_OK;
/* ERROR */
}
}
+
+/*
+ * Read WAV file tag when streaming
+ */
+static GstFlowReturn
+gst_wavparse_parse_stream_init (GstWavParse * wav)
+{
+ if (gst_adapter_available (wav->adapter) >= 12) {
+ GstBuffer *tmp = gst_buffer_new ();
+
+ /* _take flushes the data */
+ GST_BUFFER_DATA (tmp) = gst_adapter_take (wav->adapter, 12);
+ GST_BUFFER_SIZE (tmp) = 12;
+
+ GST_DEBUG ("Parsing wav header");
+ if (!gst_wavparse_parse_file_header (GST_ELEMENT (wav), tmp)) {
+ return GST_FLOW_ERROR;
+ }
+
+ wav->offset += 12;
+ /* Go to next state */
+ wav->state = GST_WAVPARSE_HEADER;
+ }
+ return GST_FLOW_OK;
+}
+
/* handle an event sent directly to the element.
*
* This event can be sent either in the READY state or the
gboolean res = FALSE;
GstEvent **event_p;
+ GST_DEBUG_OBJECT (wav, "received event %s", GST_EVENT_TYPE_NAME (event));
+
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
if (wav->state == GST_WAVPARSE_DATA) {
gst_element_add_pad (GST_ELEMENT (wav), wav->srcpad);
gst_element_no_more_pads (GST_ELEMENT (wav));
+ GST_DEBUG_OBJECT (wav, "Send newsegment event on newpad");
gst_pad_push_event (wav->srcpad, wav->newsegment);
wav->newsegment = NULL;
GstClockTime timestamp, next_timestamp;
guint64 pos, nextpos;
+iterate_adapter:
GST_LOG_OBJECT (wav, "offset: %" G_GINT64_FORMAT " , end: %" G_GINT64_FORMAT,
wav->offset, wav->end_offset);
GST_LOG_OBJECT (wav, "Fetching %" G_GINT64_FORMAT " bytes of data "
"from the sinkpad", desired);
- if ((res = gst_pad_pull_range (wav->sinkpad, wav->offset,
- desired, &buf)) != GST_FLOW_OK)
- goto pull_error;
+ if (wav->streaming) {
+ if (gst_adapter_available (wav->adapter) < desired)
+ return GST_FLOW_OK;
+
+ buf = gst_buffer_new ();
+ GST_BUFFER_DATA (buf) = gst_adapter_take (wav->adapter, desired);
+ GST_BUFFER_SIZE (buf) = desired;
+ } else {
+ if ((res = gst_pad_pull_range (wav->sinkpad, wav->offset,
+ desired, &buf)) != GST_FLOW_OK)
+ goto pull_error;
+ }
obtained = GST_BUFFER_SIZE (buf);
", size:%u", GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_SIZE (buf));
- if ((res = gst_pad_push (wav->srcpad, buf)) != GST_FLOW_OK)
- goto push_error;
+ if (gst_pad_is_linked (wav->srcpad)) {
+ if ((res = gst_pad_push (wav->srcpad, buf)) != GST_FLOW_OK)
+ goto push_error;
+ } else {
+ GST_DEBUG ("Srcpad not linked!");
+ gst_buffer_unref (buf);
+ }
if (obtained < wav->dataleft) {
wav->dataleft -= obtained;
} else {
wav->dataleft = 0;
}
+ /* Iterate until need more data, so adapter size won't grow */
+ if (wav->streaming) {
+ GST_LOG_OBJECT (wav,
+ "offset: %" G_GINT64_FORMAT " , end: %" G_GINT64_FORMAT, wav->offset,
+ wav->end_offset);
+ goto iterate_adapter;
+ }
+
return res;
/* ERROR */
}
}
+static GstFlowReturn
+gst_wavparse_chain (GstPad * pad, GstBuffer * buf)
+{
+ GstFlowReturn ret;
+ GstWavParse *wav = GST_WAVPARSE (GST_PAD_PARENT (pad));
+
+ gst_adapter_push (wav->adapter, buf);
+
+ switch (wav->state) {
+ case GST_WAVPARSE_START:
+ if ((ret = gst_wavparse_parse_stream_init (wav)) != GST_FLOW_OK)
+ goto pause;
+ /* fall-through */
+
+ case GST_WAVPARSE_HEADER:
+ if ((ret = gst_wavparse_stream_headers (wav)) != GST_FLOW_OK)
+ goto pause;
+
+ wav->state = GST_WAVPARSE_DATA;
+ if ((ret = gst_wavparse_stream_data (wav, TRUE)) != GST_FLOW_OK)
+ goto pause;
+ break;
+ case GST_WAVPARSE_DATA:
+ if ((ret = gst_wavparse_stream_data (wav, FALSE)) != GST_FLOW_OK)
+ goto pause;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ return ret;
+
+pause:
+ GST_LOG_OBJECT (wav, "pausing task %d", ret);
+ gst_pad_pause_task (wav->sinkpad);
+ if (GST_FLOW_IS_FATAL (ret)) {
+ /* for fatal errors we post an error message */
+ GST_ELEMENT_ERROR (wav, STREAM, FAILED,
+ (_("Internal data stream error.")),
+ ("streaming stopped, reason %s", gst_flow_get_name (ret)));
+ if (wav->srcpad != NULL)
+ gst_pad_push_event (wav->srcpad, gst_event_new_eos ());
+ }
+ return ret;
+}
+
#if 0
/* convert and query stuff */
static const GstFormat *
GstWavParse *wavparse = GST_WAVPARSE (GST_PAD_PARENT (pad));
gboolean res = TRUE;
- GST_DEBUG_OBJECT (wavparse, "event %d", GST_EVENT_TYPE (event));
+ GST_DEBUG_OBJECT (wavparse, "event %d, %s", GST_EVENT_TYPE (event),
+ GST_EVENT_TYPE_NAME (event));
/* can only handle events when we are in the data state */
if (wavparse->state != GST_WAVPARSE_DATA)
static gboolean
gst_wavparse_sink_activate (GstPad * sinkpad)
{
- if (gst_pad_check_pull_range (sinkpad))
+ GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (sinkpad));
+
+ if (gst_pad_check_pull_range (sinkpad)) {
+ GST_DEBUG ("going to pull mode");
+ wav->streaming = FALSE;
+ wav->adapter = NULL;
+ gst_object_unref (wav);
return gst_pad_activate_pull (sinkpad, TRUE);
+ } else {
+ GST_DEBUG ("going to push (streaming) mode");
+ wav->streaming = TRUE;
+ wav->adapter = gst_adapter_new ();
+ gst_object_unref (wav);
+ return gst_pad_activate_push (sinkpad, TRUE);
+ }
+}
- /* FIXME, we can only operate in pull mode for now */
- GST_DEBUG_OBJECT (sinkpad, "pull_range not supported on sinkpad");
- return FALSE;
-};
static gboolean
gst_wavparse_sink_activate_pull (GstPad * sinkpad, gboolean active)
{
GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (sinkpad));
+ GST_DEBUG_OBJECT (wav, "activating pull");
+
if (active) {
+ /* if we have a scheduler we can start the task */
+ wav->segment_running = TRUE;
gst_pad_start_task (sinkpad, (GstTaskFunction) gst_wavparse_loop, sinkpad);
} else {
gst_pad_stop_task (sinkpad);
GstStateChangeReturn ret;
GstWavParse *wav = GST_WAVPARSE (element);
+ GST_DEBUG_OBJECT (wav, "chaning state");
+
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
break;
gst_wavparse_destroy_sourcepad (wav);
gst_event_replace (event_p, NULL);
gst_wavparse_reset (wav);
- }
+ if (wav->adapter) {
+ gst_adapter_clear (wav->adapter);
+ }
break;
+ }
case GST_STATE_CHANGE_READY_TO_NULL:
break;
default:
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2006> Nokia Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
#include <gst/gst.h>
#include "gst/riff/riff-ids.h"
#include "gst/riff/riff-read.h"
+#include <gst/base/gstadapter.h>
G_BEGIN_DECLS
/* pending seek */
GstEvent *seek_event;
+ /* For streaming */
+ GstAdapter *adapter;
+ gboolean got_fmt;
+ gboolean streaming;
+
/* configured segment, start/stop expressed in time */
GstSegment segment;
gboolean segment_running;
};
-static GstElementDetails gst_oss_mixer_element_details =
+static const GstElementDetails gst_oss_mixer_element_details =
GST_ELEMENT_DETAILS ("OSS Mixer",
"Generic/Audio",
"Control sound input and output levels with OSS",
#define GST_CAT_DEFAULT oss_debug
/* elementfactory information */
-static GstElementDetails gst_oss_sink_details =
+static const GstElementDetails gst_oss_sink_details =
GST_ELEMENT_DETAILS ("Audio Sink (OSS)",
"Sink/Audio",
"Output to a sound card via OSS",
GST_DEBUG_CATEGORY_EXTERN (oss_debug);
#define GST_CAT_DEFAULT oss_debug
-static GstElementDetails gst_oss_src_details =
+static const GstElementDetails gst_oss_src_details =
GST_ELEMENT_DETAILS ("Audio Source (OSS)",
"Source/Audio",
"Capture from a sound card via OSS",
};
/* elementfactory information */
-static GstElementDetails gst_osxaudioelement_details =
+static const GstElementDetails gst_osxaudioelement_details =
GST_ELEMENT_DETAILS ("Audio Mixer (OSX)",
"Generic/Audio",
"Mac OS X audio mixer element",
#include "gstosxaudiosink.h"
/* elementfactory information */
-static GstElementDetails gst_osxaudiosink_details =
+static const GstElementDetails gst_osxaudiosink_details =
GST_ELEMENT_DETAILS ("Audio Sink (Mac OS X)",
"Sink/Audio",
"Output to a Mac OS X CoreAudio Sound Device",
#include <gstosxaudioelement.h>
/* elementfactory information */
-static GstElementDetails gst_osxaudiosrc_details =
+static const GstElementDetails gst_osxaudiosrc_details =
GST_ELEMENT_DETAILS ("Audio Source (Mac OS X)",
"Source/Audio",
"Read from the sound card",
#include "gstsunaudiomixer.h"
-static GstElementDetails gst_sunaudiomixer_details =
+static const GstElementDetails gst_sunaudiomixer_details =
GST_ELEMENT_DETAILS ("Sun Audio Mixer",
"Generic/Audio",
"Control sound input and output levels with Sun Audio",
#include "gstsunaudiosink.h"
/* elementfactory information */
-static GstElementDetails plugin_details = GST_ELEMENT_DETAILS ("Sun Audio Sink",
+static const GstElementDetails plugin_details =
+GST_ELEMENT_DETAILS ("Sun Audio Sink",
"Sink/Audio",
"Audio sink for Sun Audio devices",
"David A. Schleef <ds@schleef.org>, "