summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/alpha/gstalpha.c2
-rw-r--r--gst/alpha/gstalphacolor.c2
-rw-r--r--gst/apetag/gstapedemux.c2
-rw-r--r--gst/auparse/gstauparse.c2
-rw-r--r--gst/autodetect/gstautoaudiosink.c2
-rw-r--r--gst/autodetect/gstautovideosink.c2
-rw-r--r--gst/avi/gstavidemux.c2
-rw-r--r--gst/avi/gstavimux.c2
-rw-r--r--gst/cutter/gstcutter.c3
-rw-r--r--gst/debug/breakmydata.c2
-rw-r--r--gst/debug/efence.c3
-rw-r--r--gst/debug/gstnavigationtest.c2
-rw-r--r--gst/debug/gstnavseek.c2
-rw-r--r--gst/debug/negotiation.c3
-rw-r--r--gst/debug/progressreport.c2
-rw-r--r--gst/debug/testplugin.c2
-rw-r--r--gst/effectv/gstaging.c2
-rw-r--r--gst/effectv/gstdice.c2
-rw-r--r--gst/effectv/gstedge.c2
-rw-r--r--gst/effectv/gstquark.c2
-rw-r--r--gst/effectv/gstrev.c2
-rw-r--r--gst/effectv/gstshagadelic.c2
-rw-r--r--gst/effectv/gstvertigo.c2
-rw-r--r--gst/effectv/gstwarp.c3
-rw-r--r--gst/flx/gstflxdec.c2
-rw-r--r--gst/goom/gstgoom.c2
-rw-r--r--gst/icydemux/gsticydemux.c2
-rw-r--r--gst/id3demux/gstid3demux.c2
-rw-r--r--gst/law/alaw-decode.c2
-rw-r--r--gst/law/alaw-encode.c2
-rw-r--r--gst/law/mulaw-decode.c2
-rw-r--r--gst/law/mulaw-encode.c2
-rw-r--r--gst/level/gstlevel.c2
-rw-r--r--gst/matroska/matroska-demux.c2
-rw-r--r--gst/matroska/matroska-mux.c2
-rw-r--r--gst/median/gstmedian.c3
-rw-r--r--gst/monoscope/gstmonoscope.c2
-rw-r--r--gst/multipart/multipartdemux.c2
-rw-r--r--gst/multipart/multipartmux.c2
-rw-r--r--gst/oldcore/gstaggregator.c2
-rw-r--r--gst/oldcore/gstfdsink.c2
-rw-r--r--gst/oldcore/gstmd5sink.c3
-rw-r--r--gst/oldcore/gstmultifilesrc.c2
-rw-r--r--gst/oldcore/gstpipefilter.c3
-rw-r--r--gst/oldcore/gstshaper.c3
-rw-r--r--gst/oldcore/gststatistics.c3
-rw-r--r--gst/rtp/gstasteriskh263.c2
-rw-r--r--gst/rtp/gstrtpL16depay.c2
-rw-r--r--gst/rtp/gstrtpL16pay.c2
-rw-r--r--gst/rtp/gstrtpamrdepay.c2
-rw-r--r--gst/rtp/gstrtpamrpay.c2
-rw-r--r--gst/rtp/gstrtpdepay.c2
-rw-r--r--gst/rtp/gstrtpgsmpay.c2
-rw-r--r--gst/rtp/gstrtph263pay.c2
-rw-r--r--gst/rtp/gstrtph263pdepay.c2
-rw-r--r--gst/rtp/gstrtph263ppay.c2
-rw-r--r--gst/rtp/gstrtpilbcdepay.c2
-rw-r--r--gst/rtp/gstrtpmp4gpay.c2
-rw-r--r--gst/rtp/gstrtpmp4vdepay.c2
-rw-r--r--gst/rtp/gstrtpmp4vpay.c2
-rw-r--r--gst/rtp/gstrtpmpadepay.c2
-rw-r--r--gst/rtp/gstrtpmpapay.c2
-rw-r--r--gst/rtp/gstrtppcmadepay.c2
-rw-r--r--gst/rtp/gstrtppcmapay.c2
-rw-r--r--gst/rtp/gstrtppcmudepay.c2
-rw-r--r--gst/rtp/gstrtppcmupay.c2
-rw-r--r--gst/rtp/gstrtpspeexdepay.c2
-rw-r--r--gst/rtp/gstrtpspeexpay.c2
-rw-r--r--gst/rtsp/gstrtpdec.c3
-rw-r--r--gst/rtsp/gstrtspsrc.c2
-rw-r--r--gst/smpte/gstsmpte.c2
-rw-r--r--gst/udp/gstdynudpsink.c2
-rw-r--r--gst/udp/gstmultiudpsink.c2
-rw-r--r--gst/udp/gstudpsink.c2
-rw-r--r--gst/udp/gstudpsrc.c2
-rw-r--r--gst/videobox/gstvideobox.c2
-rw-r--r--gst/videofilter/gstgamma.c2
-rw-r--r--gst/videofilter/gstvideobalance.c2
-rw-r--r--gst/videofilter/gstvideoflip.c2
-rw-r--r--gst/videofilter/gstvideotemplate.c2
-rw-r--r--gst/videomixer/videomixer.c2
-rw-r--r--gst/wavparse/gstwavparse.c402
-rw-r--r--gst/wavparse/gstwavparse.h7
83 files changed, 424 insertions, 157 deletions
diff --git a/gst/alpha/gstalpha.c b/gst/alpha/gstalpha.c
index 55fa32e85..966cc55f8 100644
--- a/gst/alpha/gstalpha.c
+++ b/gst/alpha/gstalpha.c
@@ -98,7 +98,7 @@ struct _GstAlphaClass
};
/* 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",
diff --git a/gst/alpha/gstalphacolor.c b/gst/alpha/gstalphacolor.c
index 7fd225eed..46e76c775 100644
--- a/gst/alpha/gstalphacolor.c
+++ b/gst/alpha/gstalphacolor.c
@@ -59,7 +59,7 @@ struct _GstAlphaColorClass
};
/* 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",
diff --git a/gst/apetag/gstapedemux.c b/gst/apetag/gstapedemux.c
index 37e92245b..26cb65822 100644
--- a/gst/apetag/gstapedemux.c
+++ b/gst/apetag/gstapedemux.c
@@ -65,7 +65,7 @@
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",
diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c
index ba03538ff..5d425bada 100644
--- a/gst/auparse/gstauparse.c
+++ b/gst/auparse/gstauparse.c
@@ -33,7 +33,7 @@
#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",
diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c
index cb087c0dd..5743ef33c 100644
--- a/gst/autodetect/gstautoaudiosink.c
+++ b/gst/autodetect/gstautoaudiosink.c
@@ -56,7 +56,7 @@ static void
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",
diff --git a/gst/autodetect/gstautovideosink.c b/gst/autodetect/gstautovideosink.c
index 0e1ce09c9..15d890918 100644
--- a/gst/autodetect/gstautovideosink.c
+++ b/gst/autodetect/gstautovideosink.c
@@ -56,7 +56,7 @@ static void
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",
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index c6e6cc62e..cfbb4d2cf 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -99,7 +99,7 @@ gst_avi_demux_get_type (void)
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",
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index ea9014e83..df768b529 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -197,7 +197,7 @@ static void
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",
diff --git a/gst/cutter/gstcutter.c b/gst/cutter/gstcutter.c
index 5f794d90c..b45af6ee4 100644
--- a/gst/cutter/gstcutter.c
+++ b/gst/cutter/gstcutter.c
@@ -34,7 +34,8 @@ GST_DEBUG_CATEGORY (cutter_debug);
#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>");
diff --git a/gst/debug/breakmydata.c b/gst/debug/breakmydata.c
index 0a0205821..4ef3bfe8a 100644
--- a/gst/debug/breakmydata.c
+++ b/gst/debug/breakmydata.c
@@ -83,7 +83,7 @@ static GstFlowReturn gst_break_my_data_transform_ip (GstBaseTransform * trans,
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>");
diff --git a/gst/debug/efence.c b/gst/debug/efence.c
index 22a7da1e9..1ef462f3e 100644
--- a/gst/debug/efence.c
+++ b/gst/debug/efence.c
@@ -42,7 +42,8 @@
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 "
diff --git a/gst/debug/gstnavigationtest.c b/gst/debug/gstnavigationtest.c
index d46ee47de..b9c84b061 100644
--- a/gst/debug/gstnavigationtest.c
+++ b/gst/debug/gstnavigationtest.c
@@ -31,7 +31,7 @@
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",
diff --git a/gst/debug/gstnavseek.c b/gst/debug/gstnavseek.c
index d0923d5dc..1f006a0de 100644
--- a/gst/debug/gstnavseek.c
+++ b/gst/debug/gstnavseek.c
@@ -47,7 +47,7 @@ GstStaticPadTemplate navseek_sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
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",
diff --git a/gst/debug/negotiation.c b/gst/debug/negotiation.c
index a01be1b1b..e28b2cf5e 100644
--- a/gst/debug/negotiation.c
+++ b/gst/debug/negotiation.c
@@ -60,7 +60,8 @@ struct _GstNegotiationClass
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",
diff --git a/gst/debug/progressreport.c b/gst/debug/progressreport.c
index 237cbf129..83d30154a 100644
--- a/gst/debug/progressreport.c
+++ b/gst/debug/progressreport.c
@@ -83,7 +83,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
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",
diff --git a/gst/debug/testplugin.c b/gst/debug/testplugin.c
index e549c9961..edd82be91 100644
--- a/gst/debug/testplugin.c
+++ b/gst/debug/testplugin.c
@@ -79,7 +79,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
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>");
diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c
index 54e1e5963..639d1ea76 100644
--- a/gst/effectv/gstaging.c
+++ b/gst/effectv/gstaging.c
@@ -93,7 +93,7 @@ struct _GstAgingTVClass
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",
diff --git a/gst/effectv/gstdice.c b/gst/effectv/gstdice.c
index 711f3c560..26f682bbc 100644
--- a/gst/effectv/gstdice.c
+++ b/gst/effectv/gstdice.c
@@ -70,7 +70,7 @@ GType gst_dicetv_get_type (void);
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",
diff --git a/gst/effectv/gstedge.c b/gst/effectv/gstedge.c
index eb7f6aabf..1ba04f03f 100644
--- a/gst/effectv/gstedge.c
+++ b/gst/effectv/gstedge.c
@@ -62,7 +62,7 @@ struct _GstEdgeTVClass
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",
diff --git a/gst/effectv/gstquark.c b/gst/effectv/gstquark.c
index 9b985697a..af59d6eda 100644
--- a/gst/effectv/gstquark.c
+++ b/gst/effectv/gstquark.c
@@ -76,7 +76,7 @@ GType gst_quarktv_get_type (void);
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",
diff --git a/gst/effectv/gstrev.c b/gst/effectv/gstrev.c
index 44dd3ef76..108915576 100644
--- a/gst/effectv/gstrev.c
+++ b/gst/effectv/gstrev.c
@@ -93,7 +93,7 @@ enum
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",
diff --git a/gst/effectv/gstshagadelic.c b/gst/effectv/gstshagadelic.c
index c5f9980da..3d09bdaf2 100644
--- a/gst/effectv/gstshagadelic.c
+++ b/gst/effectv/gstshagadelic.c
@@ -75,7 +75,7 @@ GType gst_shagadelictv_get_type (void);
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!",
diff --git a/gst/effectv/gstvertigo.c b/gst/effectv/gstvertigo.c
index 5c0016e39..110e625e1 100644
--- a/gst/effectv/gstvertigo.c
+++ b/gst/effectv/gstvertigo.c
@@ -76,7 +76,7 @@ enum
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",
diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c
index ec451530a..d7af72509 100644
--- a/gst/effectv/gstwarp.c
+++ b/gst/effectv/gstwarp.c
@@ -85,7 +85,8 @@ static void initSinTable (GstWarpTV * filter);
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>");
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index ac9b56923..abde052f0 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -32,7 +32,7 @@ GST_DEBUG_CATEGORY_STATIC (flxdec_debug);
#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",
diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c
index 848e6f938..3c574c51a 100644
--- a/gst/goom/gstgoom.c
+++ b/gst/goom/gstgoom.c
@@ -45,7 +45,7 @@ GST_DEBUG_CATEGORY_STATIC (goom_debug);
#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",
diff --git a/gst/icydemux/gsticydemux.c b/gst/icydemux/gsticydemux.c
index 2415941fa..6816b0ca4 100644
--- a/gst/icydemux/gsticydemux.c
+++ b/gst/icydemux/gsticydemux.c
@@ -47,7 +47,7 @@
#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",
diff --git a/gst/id3demux/gstid3demux.c b/gst/id3demux/gstid3demux.c
index b2eb31596..56dae513b 100644
--- a/gst/id3demux/gstid3demux.c
+++ b/gst/id3demux/gstid3demux.c
@@ -50,7 +50,7 @@
#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",
diff --git a/gst/law/alaw-decode.c b/gst/law/alaw-decode.c
index 3352ce385..69951853a 100644
--- a/gst/law/alaw-decode.c
+++ b/gst/law/alaw-decode.c
@@ -191,7 +191,7 @@ static void
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",
diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c
index d75a48909..fbd7d6692 100644
--- a/gst/law/alaw-encode.c
+++ b/gst/law/alaw-encode.c
@@ -227,7 +227,7 @@ static void
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",
diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c
index 607f57090..fe8e07d04 100644
--- a/gst/law/mulaw-decode.c
+++ b/gst/law/mulaw-decode.c
@@ -161,7 +161,7 @@ static void
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",
diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c
index 4bf060e2b..467553bbb 100644
--- a/gst/law/mulaw-encode.c
+++ b/gst/law/mulaw-encode.c
@@ -161,7 +161,7 @@ static void
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",
diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c
index a9c6ffbcc..9097e5def 100644
--- a/gst/level/gstlevel.c
+++ b/gst/level/gstlevel.c
@@ -86,7 +86,7 @@
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>");
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index bc98a0b53..9f922c8b0 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -149,7 +149,7 @@ static void
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",
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 7ce6ab5d3..6e17588ac 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -172,7 +172,7 @@ static void
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",
diff --git a/gst/median/gstmedian.c b/gst/median/gstmedian.c
index dccf65f68..e16cdef6e 100644
--- a/gst/median/gstmedian.c
+++ b/gst/median/gstmedian.c
@@ -25,7 +25,8 @@
#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>");
diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c
index 36f6b3d1f..541853c7a 100644
--- a/gst/monoscope/gstmonoscope.c
+++ b/gst/monoscope/gstmonoscope.c
@@ -69,7 +69,7 @@ GType gst_monoscope_get_type (void);
/* 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",
diff --git a/gst/multipart/multipartdemux.c b/gst/multipart/multipartdemux.c
index 55a4266b4..ca57ca1e8 100644
--- a/gst/multipart/multipartdemux.c
+++ b/gst/multipart/multipartdemux.c
@@ -122,7 +122,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_multipart_demux_debug);
#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",
diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c
index 781df21a4..1cc61a9a9 100644
--- a/gst/multipart/multipartmux.c
+++ b/gst/multipart/multipartmux.c
@@ -101,7 +101,7 @@ struct _GstMultipartMuxClass
};
/* 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",
diff --git a/gst/oldcore/gstaggregator.c b/gst/oldcore/gstaggregator.c
index 53b165a4c..57704165f 100644
--- a/gst/oldcore/gstaggregator.c
+++ b/gst/oldcore/gstaggregator.c
@@ -34,7 +34,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
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",
diff --git a/gst/oldcore/gstfdsink.c b/gst/oldcore/gstfdsink.c
index 1d2ad11c0..12da6857d 100644
--- a/gst/oldcore/gstfdsink.c
+++ b/gst/oldcore/gstfdsink.c
@@ -37,7 +37,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
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",
diff --git a/gst/oldcore/gstmd5sink.c b/gst/oldcore/gstmd5sink.c
index 282d4c3f9..88292e6ba 100644
--- a/gst/oldcore/gstmd5sink.c
+++ b/gst/oldcore/gstmd5sink.c
@@ -35,7 +35,8 @@
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>");
diff --git a/gst/oldcore/gstmultifilesrc.c b/gst/oldcore/gstmultifilesrc.c
index d73bd6afe..74f0cee1a 100644
--- a/gst/oldcore/gstmultifilesrc.c
+++ b/gst/oldcore/gstmultifilesrc.c
@@ -45,7 +45,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
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",
diff --git a/gst/oldcore/gstpipefilter.c b/gst/oldcore/gstpipefilter.c
index 623b9a1f2..a941115ab 100644
--- a/gst/oldcore/gstpipefilter.c
+++ b/gst/oldcore/gstpipefilter.c
@@ -50,7 +50,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
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>, "
diff --git a/gst/oldcore/gstshaper.c b/gst/oldcore/gstshaper.c
index 56f84b8ab..f3504d2d0 100644
--- a/gst/oldcore/gstshaper.c
+++ b/gst/oldcore/gstshaper.c
@@ -32,7 +32,8 @@
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>");
diff --git a/gst/oldcore/gststatistics.c b/gst/oldcore/gststatistics.c
index 30e3bfcb7..8184cf55b 100644
--- a/gst/oldcore/gststatistics.c
+++ b/gst/oldcore/gststatistics.c
@@ -40,7 +40,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
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>");
diff --git a/gst/rtp/gstasteriskh263.c b/gst/rtp/gstasteriskh263.c
index ff81ec717..f3f67f5e2 100644
--- a/gst/rtp/gstasteriskh263.c
+++ b/gst/rtp/gstasteriskh263.c
@@ -43,7 +43,7 @@ typedef struct _GstAsteriskH263Header
#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",
diff --git a/gst/rtp/gstrtpL16depay.c b/gst/rtp/gstrtpL16depay.c
index a46a49812..95887f5db 100644
--- a/gst/rtp/gstrtpL16depay.c
+++ b/gst/rtp/gstrtpL16depay.c
@@ -20,7 +20,7 @@
#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",
diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c
index fb17eb18b..27e25ba72 100644
--- a/gst/rtp/gstrtpL16pay.c
+++ b/gst/rtp/gstrtpL16pay.c
@@ -25,7 +25,7 @@
#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",
diff --git a/gst/rtp/gstrtpamrdepay.c b/gst/rtp/gstrtpamrdepay.c
index c6272bbe5..c9df81704 100644
--- a/gst/rtp/gstrtpamrdepay.c
+++ b/gst/rtp/gstrtpamrdepay.c
@@ -29,7 +29,7 @@
*/
/* 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)",
diff --git a/gst/rtp/gstrtpamrpay.c b/gst/rtp/gstrtpamrpay.c
index cf9cda6bd..d85164e90 100644
--- a/gst/rtp/gstrtpamrpay.c
+++ b/gst/rtp/gstrtpamrpay.c
@@ -33,7 +33,7 @@ GST_DEBUG_CATEGORY (rtpamrpay_debug);
*/
/* 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)",
diff --git a/gst/rtp/gstrtpdepay.c b/gst/rtp/gstrtpdepay.c
index ee8d680c4..d5623e8f0 100644
--- a/gst/rtp/gstrtpdepay.c
+++ b/gst/rtp/gstrtpdepay.c
@@ -24,7 +24,7 @@ GST_DEBUG_CATEGORY (rtpdepay_debug);
#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",
diff --git a/gst/rtp/gstrtpgsmpay.c b/gst/rtp/gstrtpgsmpay.c
index 2c0fb9632..acbd5d25d 100644
--- a/gst/rtp/gstrtpgsmpay.c
+++ b/gst/rtp/gstrtpgsmpay.c
@@ -29,7 +29,7 @@
#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",
diff --git a/gst/rtp/gstrtph263pay.c b/gst/rtp/gstrtph263pay.c
index 8615c4733..a91906753 100644
--- a/gst/rtp/gstrtph263pay.c
+++ b/gst/rtp/gstrtph263pay.c
@@ -139,7 +139,7 @@ typedef struct _GstH263PictureLayer
/* 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)",
diff --git a/gst/rtp/gstrtph263pdepay.c b/gst/rtp/gstrtph263pdepay.c
index a38719788..5cffdc3d3 100644
--- a/gst/rtp/gstrtph263pdepay.c
+++ b/gst/rtp/gstrtph263pdepay.c
@@ -22,7 +22,7 @@
#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)",
diff --git a/gst/rtp/gstrtph263ppay.c b/gst/rtp/gstrtph263ppay.c
index 0a2d96b23..6e2798291 100644
--- a/gst/rtp/gstrtph263ppay.c
+++ b/gst/rtp/gstrtph263ppay.c
@@ -23,7 +23,7 @@
#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)",
diff --git a/gst/rtp/gstrtpilbcdepay.c b/gst/rtp/gstrtpilbcdepay.c
index 1dd5bdef0..d08c5b392 100644
--- a/gst/rtp/gstrtpilbcdepay.c
+++ b/gst/rtp/gstrtpilbcdepay.c
@@ -26,7 +26,7 @@
#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",
diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c
index 8ff882714..a666c016b 100644
--- a/gst/rtp/gstrtpmp4gpay.c
+++ b/gst/rtp/gstrtpmp4gpay.c
@@ -26,7 +26,7 @@ GST_DEBUG_CATEGORY (rtpmp4gpay_debug);
#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)",
diff --git a/gst/rtp/gstrtpmp4vdepay.c b/gst/rtp/gstrtpmp4vdepay.c
index 5106916a9..16597db11 100644
--- a/gst/rtp/gstrtpmp4vdepay.c
+++ b/gst/rtp/gstrtpmp4vdepay.c
@@ -22,7 +22,7 @@
#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)",
diff --git a/gst/rtp/gstrtpmp4vpay.c b/gst/rtp/gstrtpmp4vpay.c
index 98c0455b9..ad13350db 100644
--- a/gst/rtp/gstrtpmp4vpay.c
+++ b/gst/rtp/gstrtpmp4vpay.c
@@ -26,7 +26,7 @@ GST_DEBUG_CATEGORY (rtpmp4vpay_debug);
#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)",
diff --git a/gst/rtp/gstrtpmpadepay.c b/gst/rtp/gstrtpmpadepay.c
index 9b814c081..5b8b43f2d 100644
--- a/gst/rtp/gstrtpmpadepay.c
+++ b/gst/rtp/gstrtpmpadepay.c
@@ -22,7 +22,7 @@
#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)",
diff --git a/gst/rtp/gstrtpmpapay.c b/gst/rtp/gstrtpmpapay.c
index b15d55bab..49877fac8 100644
--- a/gst/rtp/gstrtpmpapay.c
+++ b/gst/rtp/gstrtpmpapay.c
@@ -23,7 +23,7 @@
#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)",
diff --git a/gst/rtp/gstrtppcmadepay.c b/gst/rtp/gstrtppcmadepay.c
index e67f814b2..188c70082 100644
--- a/gst/rtp/gstrtppcmadepay.c
+++ b/gst/rtp/gstrtppcmadepay.c
@@ -23,7 +23,7 @@
#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",
diff --git a/gst/rtp/gstrtppcmapay.c b/gst/rtp/gstrtppcmapay.c
index 439efaa9d..b20d07641 100644
--- a/gst/rtp/gstrtppcmapay.c
+++ b/gst/rtp/gstrtppcmapay.c
@@ -25,7 +25,7 @@
#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",
diff --git a/gst/rtp/gstrtppcmudepay.c b/gst/rtp/gstrtppcmudepay.c
index 0b6a208b5..dcdb992ea 100644
--- a/gst/rtp/gstrtppcmudepay.c
+++ b/gst/rtp/gstrtppcmudepay.c
@@ -23,7 +23,7 @@
#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",
diff --git a/gst/rtp/gstrtppcmupay.c b/gst/rtp/gstrtppcmupay.c
index ffb220b5d..6389207a1 100644
--- a/gst/rtp/gstrtppcmupay.c
+++ b/gst/rtp/gstrtppcmupay.c
@@ -25,7 +25,7 @@
#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",
diff --git a/gst/rtp/gstrtpspeexdepay.c b/gst/rtp/gstrtpspeexdepay.c
index 84d08c252..c5828a0eb 100644
--- a/gst/rtp/gstrtpspeexdepay.c
+++ b/gst/rtp/gstrtpspeexdepay.c
@@ -21,7 +21,7 @@
#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",
diff --git a/gst/rtp/gstrtpspeexpay.c b/gst/rtp/gstrtpspeexpay.c
index c1f372776..30c4b8fdd 100644
--- a/gst/rtp/gstrtpspeexpay.c
+++ b/gst/rtp/gstrtpspeexpay.c
@@ -23,7 +23,7 @@
#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",
diff --git a/gst/rtsp/gstrtpdec.c b/gst/rtsp/gstrtpdec.c
index 073b38de9..c22d4ccaf 100644
--- a/gst/rtsp/gstrtpdec.c
+++ b/gst/rtsp/gstrtpdec.c
@@ -24,7 +24,8 @@ GST_DEBUG_CATEGORY (rtpdec_debug);
#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>");
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index b208bec6e..a05849b95 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -31,7 +31,7 @@ GST_DEBUG_CATEGORY (rtspsrc_debug);
#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)",
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index 695861a8a..67d5d660e 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -26,7 +26,7 @@
#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",
diff --git a/gst/udp/gstdynudpsink.c b/gst/udp/gstdynudpsink.c
index a332902f5..661f55a21 100644
--- a/gst/udp/gstdynudpsink.c
+++ b/gst/udp/gstdynudpsink.c
@@ -34,7 +34,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
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",
diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c
index 1a675c564..0a6266147 100644
--- a/gst/udp/gstmultiudpsink.c
+++ b/gst/udp/gstmultiudpsink.c
@@ -45,7 +45,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
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",
diff --git a/gst/udp/gstudpsink.c b/gst/udp/gstudpsink.c
index 2f8d00c21..382e9195b 100644
--- a/gst/udp/gstudpsink.c
+++ b/gst/udp/gstudpsink.c
@@ -26,7 +26,7 @@
#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",
diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c
index 2aa17582f..395f1785f 100644
--- a/gst/udp/gstudpsrc.c
+++ b/gst/udp/gstudpsrc.c
@@ -113,7 +113,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
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",
diff --git a/gst/videobox/gstvideobox.c b/gst/videobox/gstvideobox.c
index dc644748c..efe11769b 100644
--- a/gst/videobox/gstvideobox.c
+++ b/gst/videobox/gstvideobox.c
@@ -78,7 +78,7 @@ struct _GstVideoBoxClass
};
/* 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",
diff --git a/gst/videofilter/gstgamma.c b/gst/videofilter/gstgamma.c
index 62a2181ef..7590f6df1 100644
--- a/gst/videofilter/gstgamma.c
+++ b/gst/videofilter/gstgamma.c
@@ -137,7 +137,7 @@ static GstVideofilterFormat gst_gamma_formats[] = {
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",
diff --git a/gst/videofilter/gstvideobalance.c b/gst/videofilter/gstvideobalance.c
index b7972bf3b..2464ee055 100644
--- a/gst/videofilter/gstvideobalance.c
+++ b/gst/videofilter/gstvideobalance.c
@@ -64,7 +64,7 @@
#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",
diff --git a/gst/videofilter/gstvideoflip.c b/gst/videofilter/gstvideoflip.c
index 5bcb95e12..c915fab97 100644
--- a/gst/videofilter/gstvideoflip.c
+++ b/gst/videofilter/gstvideoflip.c
@@ -63,7 +63,7 @@ enum
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",
diff --git a/gst/videofilter/gstvideotemplate.c b/gst/videofilter/gstvideotemplate.c
index 95414333e..df8aa7b49 100644
--- a/gst/videofilter/gstvideotemplate.c
+++ b/gst/videofilter/gstvideotemplate.c
@@ -118,7 +118,7 @@ static GstVideofilterFormat gst_videotemplate_formats[] = {
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",
diff --git a/gst/videomixer/videomixer.c b/gst/videomixer/videomixer.c
index 9b2a34148..4b5b76343 100644
--- a/gst/videomixer/videomixer.c
+++ b/gst/videomixer/videomixer.c
@@ -398,7 +398,7 @@ gst_videomixer_pad_init (GstVideoMixerPad * mixerpad)
/* 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",
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 27b2964ee..87fdd5a47 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -1,6 +1,7 @@
/* -*- 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
@@ -51,18 +52,24 @@
#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);
@@ -156,7 +163,7 @@ gst_wavparse_base_init (gpointer g_class)
{
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",
@@ -185,6 +192,7 @@ gst_wavparse_class_init (GstWavParseClass * klass)
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;
@@ -192,6 +200,22 @@ gst_wavparse_class_init (GstWavParseClass * klass)
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)
{
@@ -209,6 +233,11 @@ 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);
@@ -226,6 +255,8 @@ gst_wavparse_init (GstWavParse * wavparse)
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);
}
@@ -740,7 +771,6 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
gboolean update;
GstSegment seeksegment;
-
if (event) {
GST_DEBUG_OBJECT (wav, "doing seek with event");
@@ -770,10 +800,12 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * 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);
@@ -815,6 +847,7 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
/* 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,
@@ -868,6 +901,61 @@ no_format:
}
}
+
+/*
+ * 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)
{
@@ -887,97 +975,128 @@ static GstFlowReturn
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 */
@@ -986,6 +1105,11 @@ gst_wavparse_stream_headers (GstWavParse * wav)
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 */
@@ -998,12 +1122,19 @@ gst_wavparse_stream_headers (GstWavParse * wav)
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");
@@ -1021,6 +1152,7 @@ gst_wavparse_stream_headers (GstWavParse * wav)
event_p = &wav->seek_event;
gst_event_replace (event_p, NULL);
+ wav->state = GST_WAVPARSE_DATA;
return GST_FLOW_OK;
/* ERROR */
@@ -1080,6 +1212,32 @@ header_read_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
@@ -1100,6 +1258,8 @@ gst_wavparse_send_event (GstElement * element, GstEvent * event)
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) {
@@ -1149,6 +1309,7 @@ gst_wavparse_add_src_pad (GstWavParse * wav, GstBuffer * buf)
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;
@@ -1169,6 +1330,7 @@ gst_wavparse_stream_data (GstWavParse * wav, gboolean first)
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);
@@ -1187,9 +1349,18 @@ gst_wavparse_stream_data (GstWavParse * wav, gboolean first)
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);
@@ -1225,8 +1396,13 @@ gst_wavparse_stream_data (GstWavParse * wav, gboolean first)
", 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;
@@ -1234,6 +1410,14 @@ gst_wavparse_stream_data (GstWavParse * wav, gboolean first)
} 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 */
@@ -1315,6 +1499,52 @@ pause:
}
}
+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 *
@@ -1526,7 +1756,8 @@ gst_wavparse_srcpad_event (GstPad * pad, GstEvent * event)
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)
@@ -1551,20 +1782,34 @@ gst_wavparse_srcpad_event (GstPad * pad, GstEvent * event)
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);
@@ -1580,6 +1825,8 @@ gst_wavparse_change_state (GstElement * element, GstStateChange transition)
GstStateChangeReturn ret;
GstWavParse *wav = GST_WAVPARSE (element);
+ GST_DEBUG_OBJECT (wav, "chaning state");
+
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
break;
@@ -1603,8 +1850,11 @@ gst_wavparse_change_state (GstElement * element, GstStateChange transition)
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:
diff --git a/gst/wavparse/gstwavparse.h b/gst/wavparse/gstwavparse.h
index 2d1406192..9dd32e5bf 100644
--- a/gst/wavparse/gstwavparse.h
+++ b/gst/wavparse/gstwavparse.h
@@ -1,5 +1,6 @@
/* 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
@@ -25,6 +26,7 @@
#include <gst/gst.h>
#include "gst/riff/riff-ids.h"
#include "gst/riff/riff-read.h"
+#include <gst/base/gstadapter.h>
G_BEGIN_DECLS
@@ -93,6 +95,11 @@ struct _GstWavParse {
/* 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;