Catchup to latest Symbian^4 GCC_SURGE
authorWilliam Roberts <williamr@symbian.org>
Thu, 22 Jul 2010 16:36:00 +0100
branchGCC_SURGE
changeset 25 7ce29e50e9e1
parent 12 fae53e47b8b4 (current diff)
parent 23 29ecd5cb86b3 (diff)
Catchup to latest Symbian^4
gst_plugins_good/bwins/libgstcamerabinu.def
gst_plugins_good/bwins/libgstphotographyu.def
gst_plugins_good/eabi/libgstcamerabinu.def
gst_plugins_good/eabi/libgstphotographyu.def
gst_plugins_good/group/gstcamerabin.mmp
gst_plugins_good/group/gstphotography.mmp
gst_plugins_good/gst-libs/gst/interfaces/photography-enumtypes.c
gst_plugins_good/gst-libs/gst/interfaces/photography-enumtypes.h
gst_plugins_good/gst-libs/gst/interfaces/photography.c
gst_plugins_good/gst-libs/gst/interfaces/photography.h
gst_plugins_good/gst/camerabin/camerabingeneral.c
gst_plugins_good/gst/camerabin/camerabingeneral.h
gst_plugins_good/gst/camerabin/camerabinimage.c
gst_plugins_good/gst/camerabin/camerabinimage.h
gst_plugins_good/gst/camerabin/camerabinvideo.c
gst_plugins_good/gst/camerabin/camerabinvideo.h
gst_plugins_good/gst/camerabin/gstcamerabin-marshal.c
gst_plugins_good/gst/camerabin/gstcamerabin-marshal.h
gst_plugins_good/gst/camerabin/gstcamerabin.c
gst_plugins_good/gst/camerabin/gstcamerabin.h
gst_plugins_good/gst/camerabin/gstcamerabincolorbalance.c
gst_plugins_good/gst/camerabin/gstcamerabincolorbalance.h
gst_plugins_good/gst/camerabin/gstcamerabinphotography.c
gst_plugins_good/gst/camerabin/gstcamerabinphotography.h
gst_plugins_good/gst/camerabin/gstcamerabinxoverlay.c
gst_plugins_good/gst/camerabin/gstcamerabinxoverlay.h
--- a/data/gst_dll_2001F41F.txt	Fri Jun 11 16:24:58 2010 +0100
+++ b/data/gst_dll_2001F41F.txt	Thu Jul 22 16:36:00 2010 +0100
@@ -7,7 +7,6 @@
 libgstdecodebin2.dll
 libgstdevsoundsink.dll
 libgstdevsoundsrc.dll
-libgstapp.dll
 libgstqueue2.dll
 libgstadder.dll
 libgsttypefindfunctions.dll
@@ -15,27 +14,13 @@
 libgstwavparse.dll
 libgstaudiotestsrc.dll
 libgstautodetect.dll
-libgstmad.dll
-libgstvideorate.dll
-libgstvideoscale.dll
-libgstvideotestsrc.dll
-libgstavi.dll
-libgstffmpegcolorspace.dll
-libgstmpegstream.dll
-libgstmpeg2dec.dll
-libgstsdlvideosink.dll
-libgstauparse.dll
-libgstqtdemux.dll
+libgstsubparse.dll
+libgsttcp.dll
+libgstvolume.dll
+libgstplaybin.dll
+libgstgdp.dll
+libgstapp.dll
 gstqtmux.dll
 libgstnokiaaacenc.dll
-libgstlibgstqueue2.dll
-libgstjpeg.dll
-libgstplaybin.dll
-libgstgdp.dll
-libgstvolume.dll
-libgsttcp.dll
-libgstsubparse.dll
-libgstaudiofx.dll
-libgstmulaw.dll
-libgstalaw.dll
 libgstamrmux.dll
+
--- a/gst_plugins_base/group/bld.inf	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/bld.inf	Thu Jul 22 16:36:00 2010 +0100
@@ -4,166 +4,166 @@
 PRJ_EXPORTS
 
 // interfaces
-../gst-libs/gst/interfaces/colorbalance.h			/sf/mw/gstreamer/include/gstreamer/gst/interfaces/colorbalance.h
-../gst-libs/gst/interfaces/colorbalancechannel.h		/sf/mw/gstreamer/include/gstreamer/gst/interfaces/colorbalancechannel.h
-../gst-libs/gst/interfaces/mixer.h				/sf/mw/gstreamer/include/gstreamer/gst/interfaces/mixer.h
-../gst-libs/gst/interfaces/mixeroptions.h			/sf/mw/gstreamer/include/gstreamer/gst/interfaces/mixeroptions.h
-../gst-libs/gst/interfaces/mixertrack.h				/sf/mw/gstreamer/include/gstreamer/gst/interfaces/mixertrack.h
-../gst-libs/gst/interfaces/navigation.h				/sf/mw/gstreamer/include/gstreamer/gst/interfaces/navigation.h
-../gst-libs/gst/interfaces/propertyprobe.h			/sf/mw/gstreamer/include/gstreamer/gst/interfaces/propertyprobe.h
-../gst-libs/gst/interfaces/tuner.h				/sf/mw/gstreamer/include/gstreamer/gst/interfaces/tuner.h
-../gst-libs/gst/interfaces/tunernorm.h				/sf/mw/gstreamer/include/gstreamer/gst/interfaces/tunernorm.h
-../gst-libs/gst/interfaces/tunerchannel.h			/sf/mw/gstreamer/include/gstreamer/gst/interfaces/tunerchannel.h
-../gst-libs/gst/interfaces/xoverlay.h				/sf/mw/gstreamer/include/gstreamer/gst/interfaces/xoverlay.h
-../gst-libs/gst/interfaces/interfaces-enumtypes.h		/sf/mw/gstreamer/include/gstreamer/gst/interfaces/interfaces-enumtypes.h
+../gst-libs/gst/interfaces/colorbalance.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/colorbalance.h)
+../gst-libs/gst/interfaces/colorbalancechannel.h		MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/colorbalancechannel.h)
+../gst-libs/gst/interfaces/mixer.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/mixer.h)
+../gst-libs/gst/interfaces/mixeroptions.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/mixeroptions.h)
+../gst-libs/gst/interfaces/mixertrack.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/mixertrack.h)
+../gst-libs/gst/interfaces/navigation.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/navigation.h)
+../gst-libs/gst/interfaces/propertyprobe.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/propertyprobe.h)
+../gst-libs/gst/interfaces/tuner.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/tuner.h)
+../gst-libs/gst/interfaces/tunernorm.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/tunernorm.h)
+../gst-libs/gst/interfaces/tunerchannel.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/tunerchannel.h)
+../gst-libs/gst/interfaces/xoverlay.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/xoverlay.h)
+../gst-libs/gst/interfaces/interfaces-enumtypes.h		MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/interfaces/interfaces-enumtypes.h)
 
 // audio
-../gst-libs/gst/audio/audio.h					/sf/mw/gstreamer/include/gstreamer/gst/audio/audio.h
-../gst-libs/gst/audio/gstaudioclock.h				/sf/mw/gstreamer/include/gstreamer/gst/audio/gstaudioclock.h
-../gst-libs/gst/audio/gstaudiofilter.h				/sf/mw/gstreamer/include/gstreamer/gst/audio/gstaudiofilter.h
-../gst-libs/gst/audio/gstaudiosink.h				/sf/mw/gstreamer/include/gstreamer/gst/audio/gstaudiosink.h
-../gst-libs/gst/audio/gstaudiosrc.h				/sf/mw/gstreamer/include/gstreamer/gst/audio/gstaudiosrc.h
-../gst-libs/gst/audio/gstbaseaudiosink.h			/sf/mw/gstreamer/include/gstreamer/gst/audio/gstbaseaudiosink.h
-../gst-libs/gst/audio/gstbaseaudiosrc.h				/sf/mw/gstreamer/include/gstreamer/gst/audio/gstbaseaudiosrc.h
-../gst-libs/gst/audio/gstringbuffer.h				/sf/mw/gstreamer/include/gstreamer/gst/audio/gstringbuffer.h
-../gst-libs/gst/audio/mixerutils.h				/sf/mw/gstreamer/include/gstreamer/gst/audio/mixerutils.h
-../gst-libs/gst/audio/multichannel.h				/sf/mw/gstreamer/include/gstreamer/gst/audio/multichannel.h
-../gst-libs/gst/audio/audio-enumtypes.h			/sf/mw/gstreamer/include/gstreamer/gst/audio/audio-enumtypes.h
+../gst-libs/gst/audio/audio.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/audio.h)
+../gst-libs/gst/audio/gstaudioclock.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/gstaudioclock.h)
+../gst-libs/gst/audio/gstaudiofilter.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/gstaudiofilter.h)
+../gst-libs/gst/audio/gstaudiosink.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/gstaudiosink.h)
+../gst-libs/gst/audio/gstaudiosrc.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/gstaudiosrc.h)
+../gst-libs/gst/audio/gstbaseaudiosink.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/gstbaseaudiosink.h)
+../gst-libs/gst/audio/gstbaseaudiosrc.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/gstbaseaudiosrc.h)
+../gst-libs/gst/audio/gstringbuffer.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/gstringbuffer.h)
+../gst-libs/gst/audio/mixerutils.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/mixerutils.h)
+../gst-libs/gst/audio/multichannel.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/multichannel.h)
+../gst-libs/gst/audio/audio-enumtypes.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audio/audio-enumtypes.h)
 
 // cdda
-//../gst-libs/gst/cdda/base64.h					/sf/mw/gstreamer/include/gstreamer/gst/cdda/base64.h
-../gst-libs/gst/cdda/gstcddabasesrc.h				/sf/mw/gstreamer/include/gstreamer/gst/cdda/gstcddabasesrc.h
+//../gst-libs/gst/cdda/base64.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/cdda/base64.h)
+../gst-libs/gst/cdda/gstcddabasesrc.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/cdda/gstcddabasesrc.h)
 
 // floatcast
-../gst-libs/gst/floatcast/floatcast.h				/sf/mw/gstreamer/include/gstreamer/gst/floatcast/floatcast.h
+../gst-libs/gst/floatcast/floatcast.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/floatcast/floatcast.h)
 
 // riff
-../gst-libs/gst/riff/riff-ids.h					/sf/mw/gstreamer/include/gstreamer/gst/riff/riff-ids.h
-../gst-libs/gst/riff/riff-media.h				/sf/mw/gstreamer/include/gstreamer/gst/riff/riff-media.h
-../gst-libs/gst/riff/riff-read.h				/sf/mw/gstreamer/include/gstreamer/gst/riff/riff-read.h
+../gst-libs/gst/riff/riff-ids.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/riff/riff-ids.h)
+../gst-libs/gst/riff/riff-media.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/riff/riff-media.h)
+../gst-libs/gst/riff/riff-read.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/riff/riff-read.h)
 
 //app
-../gst-libs/gst/app/gstappbuffer.h				/sf/mw/gstreamer/include/gstreamer/gst/app/gstappbuffer.h
-../gst-libs/gst/app/gstappsink.h				/sf/mw/gstreamer/include/gstreamer/gst/app/gstappsink.h
-../gst-libs/gst/app/gstappsrc.h					/sf/mw/gstreamer/include/gstreamer/gst/app/gstappsrc.h
+../gst-libs/gst/app/gstappbuffer.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/app/gstappbuffer.h)
+../gst-libs/gst/app/gstappsink.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/app/gstappsink.h)
+../gst-libs/gst/app/gstappsrc.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/app/gstappsrc.h)
 // rtp
-../gst-libs/gst/rtp/gstbasertpdepayload.h			/sf/mw/gstreamer/include/gstreamer/gst/rtp/gstbasertpdepayload.h
-../gst-libs/gst/rtp/gstbasertppayload.h				/sf/mw/gstreamer/include/gstreamer/gst/rtp/gstbasertppayload.h
-../gst-libs/gst/rtp/gstrtpbuffer.h				/sf/mw/gstreamer/include/gstreamer/gst/rtp/gstrtpbuffer.h
-../gst-libs/gst/rtp/gstbasertpaudiopayload.h			/sf/mw/gstreamer/include/gstreamer/gst/rtp/gstbasertpaudiopayload.h
-../gst-libs/gst/rtp/gstrtcpbuffer.h				/sf/mw/gstreamer/include/gstreamer/gst/rtp/gstrtcpbuffer.h
-../gst-libs/gst/rtp/gstrtppayloads.h				/sf/mw/gstreamer/include/gstreamer/gst/rtp/gstrtppayloads.h
+../gst-libs/gst/rtp/gstbasertpdepayload.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/rtp/gstbasertpdepayload.h)
+../gst-libs/gst/rtp/gstbasertppayload.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/rtp/gstbasertppayload.h)
+../gst-libs/gst/rtp/gstrtpbuffer.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/rtp/gstrtpbuffer.h)
+../gst-libs/gst/rtp/gstbasertpaudiopayload.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/rtp/gstbasertpaudiopayload.h)
+../gst-libs/gst/rtp/gstrtcpbuffer.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/rtp/gstrtcpbuffer.h)
+../gst-libs/gst/rtp/gstrtppayloads.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/rtp/gstrtppayloads.h)
 
 // tag
-../gst-libs/gst/tag/gsttageditingprivate.h			/sf/mw/gstreamer/include/gstreamer/gst/tag/gsttageditingprivate.h
-../gst-libs/gst/tag/tag.h					/sf/mw/gstreamer/include/gstreamer/gst/tag/tag.h
+//../gst-libs/gst/tag/gsttageditingprivate.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tag/gsttageditingprivate.h)
+../gst-libs/gst/tag/tag.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tag/tag.h)
 
 // netbuffer
-../gst-libs/gst/netbuffer/gstnetbuffer.h			/sf/mw/gstreamer/include/gstreamer/gst/netbuffer/gstnetbuffer.h
+../gst-libs/gst/netbuffer/gstnetbuffer.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/netbuffer/gstnetbuffer.h)
 
 // video
-../gst-libs/gst/video/gstvideofilter.h				/sf/mw/gstreamer/include/gstreamer/gst/video/gstvideofilter.h
-../gst-libs/gst/video/gstvideosink.h				/sf/mw/gstreamer/include/gstreamer/gst/video/gstvideosink.h
-../gst-libs/gst/video/video.h					/sf/mw/gstreamer/include/gstreamer/gst/video/video.h
-../gst-libs/gst/video/video-enumtypes.h					/sf/mw/gstreamer/include/gstreamer/gst/video/video-enumtypes.h
+../gst-libs/gst/video/gstvideofilter.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/video/gstvideofilter.h)
+../gst-libs/gst/video/gstvideosink.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/video/gstvideosink.h)
+../gst-libs/gst/video/video.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/video/video.h)
+../gst-libs/gst/video/video-enumtypes.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/video/video-enumtypes.h)
 
 // adder
-../gst/adder/gstadder.h						/sf/mw/gstreamer/include/gstreamer/gst/adder/gstadder.h
+//../gst/adder/gstadder.h						MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/adder/gstadder.h)
 
 // audioconvert
-../gst/audioconvert/audioconvert.h				/sf/mw/gstreamer/include/gstreamer/gst/audioconvert/audioconvert.h
-../gst/audioconvert/gstaudioconvert.h				/sf/mw/gstreamer/include/gstreamer/gst/audioconvert/gstaudioconvert.h
-../gst/audioconvert/gstchannelmix.h				/sf/mw/gstreamer/include/gstreamer/gst/audioconvert/gstchannelmix.h
-../gst/audioconvert/plugin.h					/sf/mw/gstreamer/include/gstreamer/gst/audioconvert/plugin.h
+//../gst/audioconvert/audioconvert.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioconvert/audioconvert.h)
+//../gst/audioconvert/gstaudioconvert.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioconvert/gstaudioconvert.h)
+//../gst/audioconvert/gstchannelmix.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioconvert/gstchannelmix.h)
+//../gst/audioconvert/plugin.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioconvert/plugin.h)
 
 // audioresample
-//../gst/audioresample/buffer.h					/sf/mw/gstreamer/include/gstreamer/gst/audioresample/buffer.h
-//../gst/audioresample/debug.h					/sf/mw/gstreamer/include/gstreamer/gst/audioresample/debug.h
-//../gst/audioresample/functable.h				/sf/mw/gstreamer/include/gstreamer/gst/audioresample/functable.h
-../gst/audioresample/gstaudioresample.h				/sf/mw/gstreamer/include/gstreamer/gst/audioresample/gstaudioresample.h
-//../gst/audioresample/resample.h					/sf/mw/gstreamer/include/gstreamer/gst/audioresample/resample.h
+//../gst/audioresample/buffer.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioresample/buffer.h)
+//../gst/audioresample/debug.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioresample/debug.h)
+//../gst/audioresample/functable.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioresample/functable.h)
+//../gst/audioresample/gstaudioresample.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioresample/gstaudioresample.h)
+//../gst/audioresample/resample.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audioresample/resample.h)
 
 // audiotestsrc
-../gst/audiotestsrc/gstaudiotestsrc.h				/sf/mw/gstreamer/include/gstreamer/gst/audiotestsrc/gstaudiotestsrc.h
+//../gst/audiotestsrc/gstaudiotestsrc.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/audiotestsrc/gstaudiotestsrc.h)
 
 // ffmpegcolorspace
-../gst/ffmpegcolorspace/avcodec.h				/sf/mw/gstreamer/include/gstreamer/gst/ffmpegcolorspace/avcodec.h
-../gst/ffmpegcolorspace/dsputil.h				/sf/mw/gstreamer/include/gstreamer/gst/ffmpegcolorspace/dsputil.h
-../gst/ffmpegcolorspace/gstffmpegcodecmap.h			/sf/mw/gstreamer/include/gstreamer/gst/ffmpegcolorspace/gstffmpegcodecmap.h
-../gst/ffmpegcolorspace/gstffmpegcolorspace.h			/sf/mw/gstreamer/include/gstreamer/gst/ffmpegcolorspace/gstffmpegcolorspace.h
-../gst/ffmpegcolorspace/imgconvert_template.h			/sf/mw/gstreamer/include/gstreamer/gst/ffmpegcolorspace/imgconvert_template.h
+//../gst/ffmpegcolorspace/avcodec.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/ffmpegcolorspace/avcodec.h)
+//../gst/ffmpegcolorspace/dsputil.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/ffmpegcolorspace/dsputil.h)
+//../gst/ffmpegcolorspace/gstffmpegcodecmap.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/ffmpegcolorspace/gstffmpegcodecmap.h)
+//../gst/ffmpegcolorspace/gstffmpegcolorspace.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/ffmpegcolorspace/gstffmpegcolorspace.h)
+//../gst/ffmpegcolorspace/imgconvert_template.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/ffmpegcolorspace/imgconvert_template.h)
 
 // playback
-../gst/playback/gstplay-marshal.h				/sf/mw/gstreamer/include/gstreamer/gst/playback/gstplay-marshal.h
-../gst/playback/gstplaybasebin.h				/sf/mw/gstreamer/include/gstreamer/gst/playback/gstplaybasebin.h
-../gst/playback/gststreaminfo.h					/sf/mw/gstreamer/include/gstreamer/gst/playback/gststreaminfo.h
-../gst/playback/gststreamselector.h				/sf/mw/gstreamer/include/gstreamer/gst/playback/gststreamselector.h
+//../gst/playback/gstplay-marshal.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/playback/gstplay-marshal.h)
+//../gst/playback/gstplaybasebin.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/playback/gstplaybasebin.h)
+//../gst/playback/gststreaminfo.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/playback/gststreaminfo.h)
+//../gst/playback/gststreamselector.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/playback/gststreamselector.h)
 
 //pbutils
-../gst-libs/gst/pbutils/pbutils.h				/sf/mw/gstreamer/include/gstreamer/gst/pbutils/pbutils.h
-../gst-libs/gst/pbutils/descriptions.h				/sf/mw/gstreamer/include/gstreamer/gst/pbutils/descriptions.h
-../gst-libs/gst/pbutils/install-plugins.h			/sf/mw/gstreamer/include/gstreamer/gst/pbutils/install-plugins.h
-../gst-libs/gst/pbutils/missing-plugins.h			/sf/mw/gstreamer/include/gstreamer/gst/pbutils/missing-plugins.h
-../gst-libs/gst/pbutils/pbutils-enumtypes.h			/sf/mw/gstreamer/include/gstreamer/gst/pbutils/pbutils-enumtypes.h
+../gst-libs/gst/pbutils/pbutils.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/pbutils/pbutils.h)
+../gst-libs/gst/pbutils/descriptions.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/pbutils/descriptions.h)
+../gst-libs/gst/pbutils/install-plugins.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/pbutils/install-plugins.h)
+../gst-libs/gst/pbutils/missing-plugins.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/pbutils/missing-plugins.h)
+../gst-libs/gst/pbutils/pbutils-enumtypes.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/pbutils/pbutils-enumtypes.h)
 
 // subparse
-../gst/subparse/gstssaparse.h					/sf/mw/gstreamer/include/gstreamer/gst/subparse/gstssaparse.h
-../gst/subparse/gstsubparse.h					/sf/mw/gstreamer/include/gstreamer/gst/subparse/gstsubparse.h
-../gst/subparse/samiparse.h					/sf/mw/gstreamer/include/gstreamer/gst/subparse/samiparse.h
+//../gst/subparse/gstssaparse.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/subparse/gstssaparse.h)
+//../gst/subparse/gstsubparse.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/subparse/gstsubparse.h)
+//../gst/subparse/samiparse.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/subparse/samiparse.h)
 
 // tcp
-../gst/tcp/gstmultifdsink.h					/sf/mw/gstreamer/include/gstreamer/gst/tcp/gstmultifdsink.h
-../gst/tcp/gsttcp-enumtypes.h					/sf/mw/gstreamer/include/gstreamer/gst/tcp/gsttcp-enumtypes.h
-../gst/tcp/gsttcp-marshal.h					/sf/mw/gstreamer/include/gstreamer/gst/tcp/gsttcp-marshal.h
-../gst/tcp/gsttcp.h						/sf/mw/gstreamer/include/gstreamer/gst/tcp/gsttcp.h
-../gst/tcp/gsttcpclientsink.h					/sf/mw/gstreamer/include/gstreamer/gst/tcp/gsttcpclientsink.h
-../gst/tcp/gsttcpclientsrc.h					/sf/mw/gstreamer/include/gstreamer/gst/tcp/gsttcpclientsrc.h
-../gst/tcp/gsttcpplugin.h					/sf/mw/gstreamer/include/gstreamer/gst/tcp/gsttcpplugin.h
-../gst/tcp/gsttcpserversink.h					/sf/mw/gstreamer/include/gstreamer/gst/tcp/gsttcpserversink.h
-../gst/tcp/gsttcpserversrc.h					/sf/mw/gstreamer/include/gstreamer/gst/tcp/gsttcpserversrc.h
+//../gst/tcp/gstmultifdsink.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gstmultifdsink.h)
+//../gst/tcp/gsttcp-enumtypes.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gsttcp-enumtypes.h)
+//../gst/tcp/gsttcp-marshal.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gsttcp-marshal.h)
+//../gst/tcp/gsttcp.h						MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gsttcp.h)
+//../gst/tcp/gsttcpclientsink.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gsttcpclientsink.h)
+//../gst/tcp/gsttcpclientsrc.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gsttcpclientsrc.h)
+//../gst/tcp/gsttcpplugin.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gsttcpplugin.h)
+//../gst/tcp/gsttcpserversink.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gsttcpserversink.h)
+//../gst/tcp/gsttcpserversrc.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/tcp/gsttcpserversrc.h)
 
 // videorate
-../gst/videorate/gstvideorate.h					/sf/mw/gstreamer/include/gstreamer/gst/videorate/gstvideorate.h
+//../gst/videorate/gstvideorate.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/videorate/gstvideorate.h)
 
 // videoscale
-../gst/videoscale/gstvideoscale.h				/sf/mw/gstreamer/include/gstreamer/gst/videoscale/gstvideoscale.h
-../gst/videoscale/vs_image.h					/sf/mw/gstreamer/include/gstreamer/gst/videoscale/vs_image.h
-../gst/videoscale/vs_scanline.h					/sf/mw/gstreamer/include/gstreamer/gst/videoscale/vs_scanline.h
+//../gst/videoscale/gstvideoscale.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/videoscale/gstvideoscale.h)
+//../gst/videoscale/vs_image.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/videoscale/vs_image.h)
+//../gst/videoscale/vs_scanline.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/videoscale/vs_scanline.h)
 
 // videotestsrc
-../gst/videotestsrc/gstvideotestsrc.h				/sf/mw/gstreamer/include/gstreamer/gst/videotestsrc/gstvideotestsrc.h
-../gst/videotestsrc/videotestsrc.h				/sf/mw/gstreamer/include/gstreamer/gst/videotestsrc/videotestsrc.h
+//../gst/videotestsrc/gstvideotestsrc.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/videotestsrc/gstvideotestsrc.h)
+//../gst/videotestsrc/videotestsrc.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/videotestsrc/videotestsrc.h)
 
 // volume
-../gst/volume/gstvolume.h					/sf/mw/gstreamer/include/gstreamer/gst/volume/gstvolume.h
+//../gst/volume/gstvolume.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/volume/gstvolume.h)
 
 //liboil   - Since liboil port is available, No need to use liboil stub.
-//../gst/oil/liboil.h       															/sf/mw/gstreamer/include/gstreamer/gst/liboil.h
+//../gst/oil/liboil.h       															MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/liboil.h)
 
 // fft
-../gst-libs/gst/fft/_kiss_fft_guts_f32.h			/sf/mw/gstreamer/include/gstreamer/gst/fft/_kiss_fft_guts_f32.h
-../gst-libs/gst/fft/_kiss_fft_guts_f64.h			/sf/mw/gstreamer/include/gstreamer/gst/fft/_kiss_fft_guts_f64.h
-../gst-libs/gst/fft/_kiss_fft_guts_s16.h			/sf/mw/gstreamer/include/gstreamer/gst/fft/_kiss_fft_guts_s16.h
-../gst-libs/gst/fft/_kiss_fft_guts_s32.h			/sf/mw/gstreamer/include/gstreamer/gst/fft/_kiss_fft_guts_s32.h
-../gst-libs/gst/fft/gstfft.h					/sf/mw/gstreamer/include/gstreamer/gst/fft/gstfft.h
-../gst-libs/gst/fft/gstfftf32.h					/sf/mw/gstreamer/include/gstreamer/gst/fft/gstfftf32.h
-../gst-libs/gst/fft/gstfftf64.h					/sf/mw/gstreamer/include/gstreamer/gst/fft/gstfftf64.h
-../gst-libs/gst/fft/gstffts16.h					/sf/mw/gstreamer/include/gstreamer/gst/fft/gstffts16.h
-../gst-libs/gst/fft/gstffts32.h					/sf/mw/gstreamer/include/gstreamer/gst/fft/gstffts32.h
-../gst-libs/gst/fft/kiss_fft_f32.h				/sf/mw/gstreamer/include/gstreamer/gst/fft/kiss_fft_f32.h
-../gst-libs/gst/fft/kiss_fft_f64.h				/sf/mw/gstreamer/include/gstreamer/gst/fft/kiss_fft_f64.h
-../gst-libs/gst/fft/kiss_fft_s16.h				/sf/mw/gstreamer/include/gstreamer/gst/fft/kiss_fft_s16.h
-../gst-libs/gst/fft/kiss_fft_s32.h				/sf/mw/gstreamer/include/gstreamer/gst/fft/kiss_fft_s32.h
-../gst-libs/gst/fft/kiss_fftr_f32.h				/sf/mw/gstreamer/include/gstreamer/gst/fft/kiss_fftr_f32.h
-../gst-libs/gst/fft/kiss_fftr_f64.h				/sf/mw/gstreamer/include/gstreamer/gst/fft/kiss_fftr_f64.h
-../gst-libs/gst/fft/kiss_fftr_s16.h													/sf/mw/gstreamer/include/gstreamer/gst/fft/kiss_fftr_s16.h
-../gst-libs/gst/fft/kiss_fftr_s32.h				/sf/mw/gstreamer/include/gstreamer/gst/fft/kiss_fftr_s32.h
+//../gst-libs/gst/fft/_kiss_fft_guts_f32.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/_kiss_fft_guts_f32.h)
+//../gst-libs/gst/fft/_kiss_fft_guts_f64.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/_kiss_fft_guts_f64.h)
+//../gst-libs/gst/fft/_kiss_fft_guts_s16.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/_kiss_fft_guts_s16.h)
+//../gst-libs/gst/fft/_kiss_fft_guts_s32.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/_kiss_fft_guts_s32.h)
+../gst-libs/gst/fft/gstfft.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/gstfft.h)
+../gst-libs/gst/fft/gstfftf32.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/gstfftf32.h)
+../gst-libs/gst/fft/gstfftf64.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/gstfftf64.h)
+../gst-libs/gst/fft/gstffts16.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/gstffts16.h)
+../gst-libs/gst/fft/gstffts32.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/gstffts32.h)
+//../gst-libs/gst/fft/kiss_fft_f32.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/kiss_fft_f32.h)
+//../gst-libs/gst/fft/kiss_fft_f64.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/kiss_fft_f64.h)
+//../gst-libs/gst/fft/kiss_fft_s16.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/kiss_fft_s16.h)
+//../gst-libs/gst/fft/kiss_fft_s32.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/kiss_fft_s32.h)
+//../gst-libs/gst/fft/kiss_fftr_f32.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/kiss_fftr_f32.h)
+//../gst-libs/gst/fft/kiss_fftr_f64.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/kiss_fftr_f64.h)
+//../gst-libs/gst/fft/kiss_fftr_s16.h													MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/kiss_fftr_s16.h)
+//../gst-libs/gst/fft/kiss_fftr_s32.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/fft/kiss_fftr_s32.h)
 
 //internationalization macros
-../gst-libs/gst/gst-i18n-plugin.h  				/sf/mw/gstreamer/include/gstreamer/gst/gst-i18n-plugin.h
+//../gst-libs/gst/gst-i18n-plugin.h  				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gst-i18n-plugin.h)
 
 //avcodec
-../gst/ffmpegcolorspace/avcodec.h  				/sf/mw/gstreamer/include/gstreamer/gst/avcodec.h
+//../gst/ffmpegcolorspace/avcodec.h  				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/avcodec.h)
 
 
 PRJ_MMPFILES
--- a/gst_plugins_base/group/ffmpegcolorspace.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/ffmpegcolorspace.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -46,12 +46,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/ffmpegcolorspace
 SOURCE          dsputil.c
--- a/gst_plugins_base/group/gstadder.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstadder.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,12 +44,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/adder
 SOURCE          gstadder.c
--- a/gst_plugins_base/group/gstapp.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstapp.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -39,10 +39,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/app
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/app
 SOURCE          gstapp.c
--- a/gst_plugins_base/group/gstaudio.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstaudio.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,14 +44,8 @@
 
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
-
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 USERINCLUDE     ../gst-libs/audio
 
--- a/gst_plugins_base/group/gstaudioconvert.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstaudioconvert.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -42,15 +42,8 @@
 
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
-
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audioconvert
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/audioconvert
 SOURCE          audioconvert.c
--- a/gst_plugins_base/group/gstaudiorate.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstaudiorate.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,12 +44,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/audiorate
 SOURCE          gstaudiorate.c
--- a/gst_plugins_base/group/gstaudioresample.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstaudioresample.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,12 +44,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/audioresample
 
--- a/gst_plugins_base/group/gstaudiotestsrc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstaudiotestsrc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,12 +44,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/audiotestsrc
 SOURCE          gstaudiotestsrc.c
--- a/gst_plugins_base/group/gstcdda.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstcdda.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst-libs/gst/cdda
 SOURCE          gstcddabasesrc.c
--- a/gst_plugins_base/group/gstdecodebin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstdecodebin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -46,12 +46,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH		../gst/playback
 SOURCE			gstdecodebin.c
--- a/gst_plugins_base/group/gstdecodebin2.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstdecodebin2.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH		../gst/playback
 SOURCE			gstdecodebin2.c
--- a/gst_plugins_base/group/gstfft.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstfft.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst-libs/gst/fft
 SOURCE          gstfft.c
--- a/gst_plugins_base/group/gstgdp.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstgdp.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -43,12 +43,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/gdp
 SOURCE          gstgdp.c
--- a/gst_plugins_base/group/gstinterfaces.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstinterfaces.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -46,12 +46,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst-libs/gst/interfaces
 SOURCE          colorbalance.c
--- a/gst_plugins_base/group/gstnetbuffer.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstnetbuffer.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst-libs/gst/netbuffer
 SOURCE          gstnetbuffer.c
--- a/gst_plugins_base/group/gstpbutils.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstpbutils.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,23 +37,17 @@
 EpocAllowDllData
 #endif
 
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+OS_LAYER_GLIB_SYSTEMINCLUDE
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
+
 USERINCLUDE     ../gst
 USERINCLUDE     ../gst-libs/gst/pbutils
 USERINCLUDE     ../gst-libs
 USERINCLUDE     ../gst-libs/gst
 USERINCLUDE     ..
 
-MW_LAYER_SYSTEMINCLUDE
-OS_LAYER_LIBC_SYSTEMINCLUDE
-
-OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-
 SOURCEPATH		../gst-libs/gst/pbutils
 
 SOURCE			descriptions.c
--- a/gst_plugins_base/group/gstplayback.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstplayback.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH		../gst/playback
 SOURCE			gstplay-marshal.c
--- a/gst_plugins_base/group/gstplaybin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstplaybin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH		../gst/playback
 SOURCE			gstplayback.c
--- a/gst_plugins_base/group/gstqueue2.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstqueue2.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH		../gst/playback
 SOURCE			gstqueue2.c
--- a/gst_plugins_base/group/gstriff.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstriff.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst-libs/gst/riff
 SOURCE          riff.c
--- a/gst_plugins_base/group/gstrtp.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstrtp.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst-libs/gst/rtp
 SOURCE          gstbasertpdepayload.c
--- a/gst_plugins_base/group/gstsubparse.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstsubparse.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -43,12 +43,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/subparse
 SOURCE          gstssaparse.c
--- a/gst_plugins_base/group/gsttag.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gsttag.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst-libs/gst/tag
 SOURCE      gstid3tag.c
--- a/gst_plugins_base/group/gsttcp.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gsttcp.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH		../gst/tcp
 SOURCE			gstmultifdsink.c
--- a/gst_plugins_base/group/gsttypefind.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gsttypefind.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -43,12 +43,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/typefind
 SOURCE          gsttypefindfunctions.c
--- a/gst_plugins_base/group/gstvideo.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstvideo.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH          ../gst-libs/gst/video
 SOURCE              gstvideofilter.c
--- a/gst_plugins_base/group/gstvideorate.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstvideorate.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -43,12 +43,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/videorate
 SOURCE          gstvideorate.c
--- a/gst_plugins_base/group/gstvideoscale.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstvideoscale.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
 OS_LAYER_LIBOIL_SYSTEMINCLUDE SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/videoscale
 SOURCE          gstvideoscale.c
--- a/gst_plugins_base/group/gstvideotestsrc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstvideotestsrc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,12 +45,7 @@
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
 OS_LAYER_LIBOIL_SYSTEMINCLUDE SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/videotestsrc
 SOURCE          gstvideotestsrc.c
--- a/gst_plugins_base/group/gstvolume.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/group/gstvolume.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,12 +44,7 @@
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
 OS_LAYER_LIBOIL_SYSTEMINCLUDE SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/volume
 SOURCE          gstvolume.c
--- a/gst_plugins_base/gst-libs/gst/pbutils/install-plugins.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/gst-libs/gst/pbutils/install-plugins.c	Thu Jul 22 16:36:00 2010 +0100
@@ -355,7 +355,7 @@
 #endif
 
 #ifdef __SYMBIAN32__
-#include <gst_global.h>
+#include <gst/gst_global.h>
 #endif
 
 #include "install-plugins.h"
--- a/gst_plugins_base/gst-libs/gst/riff/riff-media.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/gst-libs/gst/riff/riff-media.h	Thu Jul 22 16:36:00 2010 +0100
@@ -24,7 +24,7 @@
 
 #include <glib.h>
 #include <gst/gst.h>
-#include "riff-ids.h"
+#include "gst/riff/riff-ids.h"
 
 G_BEGIN_DECLS
 
--- a/gst_plugins_base/gst-libs/gst/riff/riff-read.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/gst-libs/gst/riff/riff-read.h	Thu Jul 22 16:36:00 2010 +0100
@@ -25,7 +25,7 @@
 #include <glib.h>
 #include <gst/gst.h>
 
-#include "riff-ids.h"
+#include "gst/riff/riff-ids.h"
 
 G_BEGIN_DECLS
 
--- a/gst_plugins_base/tsrc/check/elements/adder/group/adder.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/adder/group/adder.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -38,13 +38,7 @@
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
-
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
 
--- a/gst_plugins_base/tsrc/check/elements/audioconvert/group/audioconvert.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/audioconvert/group/audioconvert.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -35,12 +35,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 MW_LAYER_SYSTEMINCLUDE
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/audiorate/group/audiorate.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/audiorate/group/audiorate.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -39,12 +39,7 @@
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/audioresample/group/audioresample.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/audioresample/group/audioresample.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -39,13 +39,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
-
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 USERINCLUDE	../../../../../../gstreamer_core/libs/gst/check
 
--- a/gst_plugins_base/tsrc/check/elements/audiotestsrc/group/audiotestsrc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/audiotestsrc/group/audiotestsrc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,12 +37,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE	../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/createelementbase/group/createelementbase.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/createelementbase/group/createelementbase.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/createelementbasevideo/group/createelementbasevideo.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/createelementbasevideo/group/createelementbasevideo.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,12 +37,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/decodebin/ffmpegcolorspace/group/ffmpegcolorspace.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/decodebin/ffmpegcolorspace/group/ffmpegcolorspace.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -40,12 +40,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE	../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/decodebin/group/decodebin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/decodebin/group/decodebin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -38,12 +38,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/ffmpegcolorspace/group/ffmpegcolorspace.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/ffmpegcolorspace/group/ffmpegcolorspace.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -39,12 +39,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE	../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/gdpdepay/group/gdpdepay.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/gdpdepay/group/gdpdepay.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/multifdsink/group/multifdsink.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/multifdsink/group/multifdsink.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/playbin/group/playbin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/playbin/group/playbin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -33,12 +33,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/playbin/src/playbin.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/playbin/src/playbin.c	Thu Jul 22 16:36:00 2010 +0100
@@ -879,6 +879,7 @@
 typedef GstPushSrc GstCodecSrc;
 typedef GstPushSrcClass GstCodecSrcClass;
 
+
 GST_BOILERPLATE_FULL (GstCodecSrc, gst_codec_src, GstPushSrc,
     GST_TYPE_PUSH_SRC, gst_codec_src_init_type);
 
--- a/gst_plugins_base/tsrc/check/elements/subparse/group/subparse.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/subparse/group/subparse.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE   ../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/videorate/group/videorate.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/videorate/group/videorate.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -41,12 +41,7 @@
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE	../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/elements/volume/group/volume.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/elements/volume/group/volume.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -29,12 +29,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/generic/clock-selection/group/clock-selection.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/generic/clock-selection/group/clock-selection.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,13 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE	  ../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
-
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 SYSTEMINCLUDE	../../../../../../gstreamer_core/libs
--- a/gst_plugins_base/tsrc/check/generic/states/group/states.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/generic/states/group/states.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,9 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
+
+
 USERINCLUDE		../../../../..
 SYSTEMINCLUDE	../../../../../gst
 SYSTEMINCLUDE	../../../../../../gstreamer_core/libs
--- a/gst_plugins_base/tsrc/check/gst/typefindfunctions/group/typefindfunctions.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/gst/typefindfunctions/group/typefindfunctions.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -21,12 +21,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/libs/fft/group/fft.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/libs/fft/group/fft.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 
--- a/gst_plugins_base/tsrc/check/libs/netbuffer/group/netbuffer.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/libs/netbuffer/group/netbuffer.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/libs/pbutils/group/pbutils.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/libs/pbutils/group/pbutils.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,12 +37,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/libs/rtp/group/rtp.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/libs/rtp/group/rtp.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/libs/tag/group/tag.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/libs/tag/group/tag.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/libs/taudio/group/taudio.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/libs/taudio/group/taudio.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 
--- a/gst_plugins_base/tsrc/check/libs/video/group/video.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/libs/video/group/video.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -21,12 +21,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_base/tsrc/check/pipelines/simple-launch-lines/group/simple-launch-lines.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/pipelines/simple-launch-lines/group/simple-launch-lines.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 
--- a/gst_plugins_base/tsrc/check/pipelines/streamheader/group/streamheader.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/check/pipelines/streamheader/group/streamheader.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 
--- a/gst_plugins_base/tsrc/examples/dynamic/addstream/group/addstream.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/examples/dynamic/addstream/group/addstream.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,13 +37,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
-
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 USERINCLUDE		../../../../../../gstreamer_core/libs/gst/check
 
--- a/gst_plugins_base/tsrc/icles/stress_playbin/group/stress_playbin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_base/tsrc/icles/stress_playbin/group/stress_playbin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -38,12 +38,7 @@
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
 
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE		../../../../../gstreamer_core/libs/gst/check
--- a/gst_plugins_good/bwins/libgstcamerabinu.def	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
-	gst_camerabin_get_type @ 1 NONAME
-	gst_camerabin_image_get_type @ 2 NONAME
-	gst_camerabin_video_get_type @ 3 NONAME
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/bwins/libgstmpegaudioparseu.def	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,5 @@
+EXPORTS
+	_GST_PLUGIN_DESC @ 1 NONAME
+	gst_mp3parse_get_type @ 2 NONAME
+	gst_xing_mux_get_type @ 3 NONAME
+
--- a/gst_plugins_good/bwins/libgstphotographyu.def	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-EXPORTS
-	gst_photography_get_aperture @ 1 NONAME
-	gst_photography_get_capabilities @ 2 NONAME
-	gst_photography_get_colour_tone_mode @ 3 NONAME
-	gst_photography_get_ev_compensation @ 4 NONAME
-	gst_photography_get_exposure @ 5 NONAME
-	gst_photography_get_flash_mode @ 6 NONAME
-	gst_photography_get_iso_speed @ 7 NONAME
-	gst_photography_get_scene_mode @ 8 NONAME
-	gst_photography_get_type @ 9 NONAME
-	gst_photography_get_white_balance_mode @ 10 NONAME
-	gst_photography_get_zoom @ 11 NONAME
-	gst_photography_prepare_for_capture @ 12 NONAME
-	gst_photography_set_aperture @ 13 NONAME
-	gst_photography_set_autofocus @ 14 NONAME
-	gst_photography_set_colour_tone_mode @ 15 NONAME
-	gst_photography_set_ev_compensation @ 16 NONAME
-	gst_photography_set_exposure @ 17 NONAME
-	gst_photography_set_flash_mode @ 18 NONAME
-	gst_photography_set_iso_speed @ 19 NONAME
-	gst_photography_set_scene_mode @ 20 NONAME
-	gst_photography_set_white_balance_mode @ 21 NONAME
-	gst_photography_set_zoom @ 22 NONAME
-
--- a/gst_plugins_good/eabi/libgstcamerabinu.def	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
-	gst_camerabin_get_type @ 1 NONAME
-	gst_camerabin_image_get_type @ 2 NONAME
-	gst_camerabin_video_get_type @ 3 NONAME
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/eabi/libgstmpegaudioparseu.def	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,5 @@
+EXPORTS
+	_GST_PLUGIN_DESC @ 1 NONAME
+	gst_mp3parse_get_type @ 2 NONAME
+	gst_xing_mux_get_type @ 3 NONAME
+
--- a/gst_plugins_good/eabi/libgstphotographyu.def	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-EXPORTS
-	gst_photography_get_aperture @ 1 NONAME
-	gst_photography_get_capabilities @ 2 NONAME
-	gst_photography_get_colour_tone_mode @ 3 NONAME
-	gst_photography_get_ev_compensation @ 4 NONAME
-	gst_photography_get_exposure @ 5 NONAME
-	gst_photography_get_flash_mode @ 6 NONAME
-	gst_photography_get_iso_speed @ 7 NONAME
-	gst_photography_get_scene_mode @ 8 NONAME
-	gst_photography_get_type @ 9 NONAME
-	gst_photography_get_white_balance_mode @ 10 NONAME
-	gst_photography_get_zoom @ 11 NONAME
-	gst_photography_prepare_for_capture @ 12 NONAME
-	gst_photography_set_aperture @ 13 NONAME
-	gst_photography_set_autofocus @ 14 NONAME
-	gst_photography_set_colour_tone_mode @ 15 NONAME
-	gst_photography_set_ev_compensation @ 16 NONAME
-	gst_photography_set_exposure @ 17 NONAME
-	gst_photography_set_flash_mode @ 18 NONAME
-	gst_photography_set_iso_speed @ 19 NONAME
-	gst_photography_set_scene_mode @ 20 NONAME
-	gst_photography_set_white_balance_mode @ 21 NONAME
-	gst_photography_set_zoom @ 22 NONAME
-
--- a/gst_plugins_good/group/bld.inf	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/bld.inf	Thu Jul 22 16:36:00 2010 +0100
@@ -2,8 +2,6 @@
 default
 
 PRJ_EXPORTS
-../gst-libs/gst/interfaces/photography.h  /sf/mw/gstreamer/include/gstreamer/gst/interfaces/photography.h
-../gst-libs/gst/interfaces/photography-enumtypes.h  /sf/mw/gstreamer/include/gstreamer/gst/interfaces/photography-enumtypes.h
 
 PRJ_MMPFILES
 gstwavparse.mmp
@@ -11,6 +9,5 @@
 gstautodetect.mmp
 gstavi.mmp
 gstqtmux.mmp
-gstphotography.mmp
-gstcamerabin.mmp
-
+gstqtdemux.mmp
+gstmpegaudioparse.mmp
--- a/gst_plugins_good/group/gstalaw.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstalaw.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -51,21 +51,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audio
-USERINCLUDE		../../include/gstreamer/gst/cdda
-USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-USERINCLUDE		../../include/gstreamer/gst/netbuffer
-USERINCLUDE		../../include/gstreamer/gst/riff
-USERINCLUDE		../../include/gstreamer/gst/rtp
-USERINCLUDE		../../include/gstreamer/gst/tag
-USERINCLUDE		../../include/gstreamer/gst/video
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/law
 SOURCE          alaw.c
--- a/gst_plugins_good/group/gstalpha.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstalpha.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -57,11 +57,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/riff
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/alpha
 SOURCE gstalpha.c
--- a/gst_plugins_good/group/gstalphacolor.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstalphacolor.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -56,11 +56,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/riff
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/alpha
 SOURCE gstalphacolor.c
--- a/gst_plugins_good/group/gstaudiofx.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstaudiofx.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -51,21 +51,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audio
-USERINCLUDE		../../include/gstreamer/gst/cdda
-USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-USERINCLUDE		../../include/gstreamer/gst/netbuffer
-USERINCLUDE		../../include/gstreamer/gst/riff
-USERINCLUDE		../../include/gstreamer/gst/rtp
-USERINCLUDE		../../include/gstreamer/gst/tag
-USERINCLUDE		../../include/gstreamer/gst/video
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/audiofx
 SOURCE          audioamplify.c
--- a/gst_plugins_good/group/gstauparse.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstauparse.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -51,9 +51,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 SOURCEPATH      ../gst/auparse
--- a/gst_plugins_good/group/gstautodetect.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstautodetect.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,9 +44,12 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-SYSTEMINCLUDE   ../../include/gstreamer
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
+
 USERINCLUDE     ../
 
+
+
 SOURCEPATH      ../gst/autodetect
 SOURCE          gstautodetect.c
 SOURCE          gstautoaudiosrc.c
--- a/gst_plugins_good/group/gstavi.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstavi.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -50,10 +50,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/riff
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/avi
 SOURCE gstavi.c gstavimux.c gstavidemux.c gstavisubtitle.c
--- a/gst_plugins_good/group/gstcamerabin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-// Gstreamer.MMP
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the
-* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>                                                            
-
-TARGET          libgstcamerabin.dll
-TARGETTYPE      DLL
-//UID             0x20004c45 0x0DE80A1B
-UID             0x20004c45 0x1DE80A1B
-
-LANG            SC
-CAPABILITY All -Tcb
-VENDORID        VID_DEFAULT
-
-#if !defined(__WINSCW__) && !defined(__WINS__)
-EpocAllowDllData
-#endif
-
-MACRO           HAVE_CONFIG_H
-
-USERINCLUDE     ..
-USERINCLUDE     ../gst/camerabin
-USERINCLUDE     ../gst-libs
-USERINCLUDE     ../gst-libs/gst
-USERINCLUDE     ../gst-libs/gst/interfaces
-
-MW_LAYER_SYSTEMINCLUDE
-OS_LAYER_LIBC_SYSTEMINCLUDE
-OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-//USERINCLUDE		../../include/gstreamer/gst/controller
-//USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-//USERINCLUDE		../../include/gstreamer/gst/net
-//USERINCLUDE		../../include/gstreamer/gst/audio
-//USERINCLUDE		../../include/gstreamer/gst/cdda
-//USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-//USERINCLUDE		../../include/gstreamer/gst/netbuffer
-//USERINCLUDE		../../include/gstreamer/gst/riff
-//USERINCLUDE		../../include/gstreamer/gst/rtp
-//USERINCLUDE		../../include/gstreamer/gst/tag
-//USERINCLUDE		../../include/gstreamer/gst/video
-
-SYSTEMINCLUDE     ..
-SYSTEMINCLUDE   /sf/mw/gstreamer/include/gstreamer
-
-
-SOURCEPATH      ../gst/camerabin
-SOURCE        gstcamerabin.c
-SOURCE        gstcamerabinxoverlay.c     
-SOURCE        gstcamerabincolorbalance.c 
-SOURCE        camerabinimage.c           
-SOURCE        camerabinvideo.c           
-SOURCE        camerabingeneral.c         
-SOURCE        gstcamerabinphotography.c
-SOURCE		  gstcamerabin-marshal.c
-
-LIBRARY         libc.lib
-LIBRARY         libpthread.lib
-LIBRARY         libdl.lib
-LIBRARY         libglib.lib
-LIBRARY         libgmodule.lib
-
-LIBRARY         libgobject.lib
-LIBRARY         libgthread.lib
-LIBRARY         libm.lib
-LIBRARY         libz.lib
-LIBRARY         libgstreamer.lib
-LIBRARY         libgstbase.lib
-LIBRARY			libgstinterfaces.lib
-LIBRARY			libgstphotography.lib
-
-#ifdef WINSCW
-LIBRARY		ewsd.lib //wsd solution
-#endif
-
-
--- a/gst_plugins_good/group/gstjpeg.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstjpeg.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -45,21 +45,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audio
-USERINCLUDE		../../include/gstreamer/gst/cdda
-USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-USERINCLUDE		../../include/gstreamer/gst/netbuffer
-USERINCLUDE		../../include/gstreamer/gst/riff
-USERINCLUDE		../../include/gstreamer/gst/rtp
-USERINCLUDE		../../include/gstreamer/gst/tag
-USERINCLUDE		../../include/gstreamer/gst/video
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SYSTEMINCLUDE		/epoc32/include/jpeg-6b
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/group/gstmpegaudioparse.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+#include <platform_paths.hrh>                                                            
+
+TARGET          libgstmpegaudioparse.dll
+TARGETTYPE      DLL
+UID             0x1000008d 0x10207C45
+CAPABILITY      All -TCB
+VENDORID        VID_DEFAULT
+LANG            SC
+
+#if !defined(__WINSCW__) && !defined(__WINS__)
+EpocAllowDllData
+#endif
+
+
+MACRO           HAVE_CONFIG_H
+
+
+USERINCLUDE     ../gst/mpegaudioparse
+
+
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+OS_LAYER_GLIB_SYSTEMINCLUDE
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
+
+SOURCEPATH      ../gst/mpegaudioparse
+SOURCE          gstmpegaudioparse.c
+SOURCE          gstxingmux.c
+SOURCE          plugin.c
+
+LIBRARY         euser.lib
+LIBRARY         libc.lib
+LIBRARY         libpthread.lib
+LIBRARY         libglib.lib
+LIBRARY         libgobject.lib
+LIBRARY         libgstreamer.lib
+LIBRARY         libgstbase.lib
+LIBRARY         libgthread.lib
+
--- a/gst_plugins_good/group/gstmulaw.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstmulaw.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -49,21 +49,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audio
-USERINCLUDE		../../include/gstreamer/gst/cdda
-USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-USERINCLUDE		../../include/gstreamer/gst/netbuffer
-USERINCLUDE		../../include/gstreamer/gst/riff
-USERINCLUDE		../../include/gstreamer/gst/rtp
-USERINCLUDE		../../include/gstreamer/gst/tag
-USERINCLUDE		../../include/gstreamer/gst/video
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/law
 SOURCE          mulaw.c
--- a/gst_plugins_good/group/gstphotography.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the
-* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>                                                            
-
-TARGET          libgstphotography.dll
-TARGETTYPE      DLL
-//UID             0x1000008d 0x10207C43
-// FIX ME change UID
-UID             0x1000008d 0x20207C43
-
-LANG            SC
-CAPABILITY      All -Tcb
-VENDORID        VID_DEFAULT
-
-#if !defined(__WINSCW__) && !defined(__WINS__)
-EpocAllowDllData
-#endif
-
-MACRO           HAVE_CONFIG_H
-
-USERINCLUDE     ..
-USERINCLUDE     ../gst-libs/gst/interfaces
-
-MW_LAYER_SYSTEMINCLUDE
-OS_LAYER_LIBC_SYSTEMINCLUDE
-OS_LAYER_GLIB_SYSTEMINCLUDE
-
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/audio
-
-SYSTEMINCLUDE   /sf/mw/gstreamer/include/gstreamer
-
-SOURCEPATH      ../gst-libs/gst/interfaces
-SOURCE          photography.c
-SOURCE			photography-enumtypes.c
-
-
-LIBRARY         libc.lib
-LIBRARY         libpthread.lib
-LIBRARY        libdl.lib
-LIBRARY         libglib.lib
-LIBRARY         libgmodule.lib
-
-LIBRARY         libgobject.lib
-LIBRARY         libgthread.lib
-LIBRARY         libgstreamer.lib
--- a/gst_plugins_good/group/gstpng.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstpng.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -58,11 +58,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/riff
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 USERINCLUDE		/epoc32/include/libpng
 
 SOURCEPATH      ../ext/libpng
--- a/gst_plugins_good/group/gstqtdemux.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstqtdemux.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -51,21 +51,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audio
-USERINCLUDE		../../include/gstreamer/gst/cdda
-USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-USERINCLUDE		../../include/gstreamer/gst/netbuffer
-USERINCLUDE		../../include/gstreamer/gst/riff
-USERINCLUDE		../../include/gstreamer/gst/rtp
-USERINCLUDE		../../include/gstreamer/gst/tag
-USERINCLUDE		../../include/gstreamer/gst/video
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/qtdemux
 SOURCE          quicktime.c gstrtpxqtdepay.c qtdemux.c qtdemux_types.c qtdemux_dump.c
--- a/gst_plugins_good/group/gstqtmux.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstqtmux.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -49,21 +49,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audio
-USERINCLUDE		../../include/gstreamer/gst/cdda
-USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-USERINCLUDE		../../include/gstreamer/gst/netbuffer
-USERINCLUDE		../../include/gstreamer/gst/riff
-USERINCLUDE		../../include/gstreamer/gst/rtp
-USERINCLUDE		../../include/gstreamer/gst/tag
-USERINCLUDE		../../include/gstreamer/gst/video
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH ../gst/qtmux
 SOURCE atoms.c descriptors.c gstqtmux.c gstqtmuxmap.c properties.c
--- a/gst_plugins_good/group/gstwavenc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstwavenc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -49,21 +49,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audio
-USERINCLUDE		../../include/gstreamer/gst/cdda
-USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-USERINCLUDE		../../include/gstreamer/gst/netbuffer
-USERINCLUDE		../../include/gstreamer/gst/riff
-USERINCLUDE		../../include/gstreamer/gst/rtp
-USERINCLUDE		../../include/gstreamer/gst/tag
-USERINCLUDE		../../include/gstreamer/gst/video
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH  ../gst/wavenc
 SOURCE      gstwavenc.c
--- a/gst_plugins_good/group/gstwavparse.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/group/gstwavparse.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -49,21 +49,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-USERINCLUDE		../../include/gstreamer/gst/audio
-USERINCLUDE		../../include/gstreamer/gst/cdda
-USERINCLUDE		../../include/gstreamer/gst/floatcast
-USERINCLUDE		../../include/gstreamer/gst/interfaces
-USERINCLUDE		../../include/gstreamer/gst/netbuffer
-USERINCLUDE		../../include/gstreamer/gst/riff
-USERINCLUDE		../../include/gstreamer/gst/rtp
-USERINCLUDE		../../include/gstreamer/gst/tag
-USERINCLUDE		../../include/gstreamer/gst/video
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/wavparse
 SOURCE          gstwavparse.c
--- a/gst_plugins_good/gst-libs/gst/interfaces/photography-enumtypes.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-
-/* Generated data (by glib-mkenums) */
-
-#include "photography-enumtypes.h"
-
-#include "photography.h"
-
-/* enumerations from "photography.h" */
-GType
-gst_white_balance_mode_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      {GST_PHOTOGRAPHY_WB_MODE_AUTO, "GST_PHOTOGRAPHY_WB_MODE_AUTO", "auto"},
-      {GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT, "GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT",
-          "daylight"},
-      {GST_PHOTOGRAPHY_WB_MODE_CLOUDY, "GST_PHOTOGRAPHY_WB_MODE_CLOUDY",
-          "cloudy"},
-      {GST_PHOTOGRAPHY_WB_MODE_SUNSET, "GST_PHOTOGRAPHY_WB_MODE_SUNSET",
-          "sunset"},
-      {GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN, "GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN",
-          "tungsten"},
-      {GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT,
-          "GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT", "fluorescent"},
-      {0, NULL, NULL}
-    };
-    etype = g_enum_register_static ("GstWhiteBalanceMode", values);
-  }
-  return etype;
-}
-
-GType
-gst_colour_tone_mode_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL", "normal"},
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_SEPIA,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_SEPIA", "sepia"},
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NEGATIVE,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NEGATIVE", "negative"},
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_GRAYSCALE,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_GRAYSCALE", "grayscale"},
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NATURAL,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NATURAL", "natural"},
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_VIVID,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_VIVID", "vivid"},
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_COLORSWAP,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_COLORSWAP", "colorswap"},
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_SOLARIZE,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_SOLARIZE", "solarize"},
-      {GST_PHOTOGRAPHY_COLOUR_TONE_MODE_OUT_OF_FOCUS,
-          "GST_PHOTOGRAPHY_COLOUR_TONE_MODE_OUT_OF_FOCUS", "out-of-focus"},
-      {0, NULL, NULL}
-    };
-    etype = g_enum_register_static ("GstColourToneMode", values);
-  }
-  return etype;
-}
-
-GType
-gst_scene_mode_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      {GST_PHOTOGRAPHY_SCENE_MODE_MANUAL, "GST_PHOTOGRAPHY_SCENE_MODE_MANUAL",
-          "manual"},
-      {GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP, "GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP",
-          "closeup"},
-      {GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT,
-          "GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT", "portrait"},
-      {GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE,
-          "GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE", "landscape"},
-      {GST_PHOTOGRAPHY_SCENE_MODE_SPORT, "GST_PHOTOGRAPHY_SCENE_MODE_SPORT",
-          "sport"},
-      {GST_PHOTOGRAPHY_SCENE_MODE_NIGHT, "GST_PHOTOGRAPHY_SCENE_MODE_NIGHT",
-          "night"},
-      {GST_PHOTOGRAPHY_SCENE_MODE_AUTO, "GST_PHOTOGRAPHY_SCENE_MODE_AUTO",
-          "auto"},
-      {0, NULL, NULL}
-    };
-    etype = g_enum_register_static ("GstSceneMode", values);
-  }
-  return etype;
-}
-
-GType
-gst_flash_mode_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      {GST_PHOTOGRAPHY_FLASH_MODE_AUTO, "GST_PHOTOGRAPHY_FLASH_MODE_AUTO",
-          "auto"},
-      {GST_PHOTOGRAPHY_FLASH_MODE_OFF, "GST_PHOTOGRAPHY_FLASH_MODE_OFF", "off"},
-      {GST_PHOTOGRAPHY_FLASH_MODE_ON, "GST_PHOTOGRAPHY_FLASH_MODE_ON", "on"},
-      {GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN, "GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN",
-          "fill-in"},
-      {GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE, "GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE",
-          "red-eye"},
-      {0, NULL, NULL}
-    };
-    etype = g_enum_register_static ("GstFlashMode", values);
-  }
-  return etype;
-}
-
-GType
-gst_focus_status_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      {GST_PHOTOGRAPHY_FOCUS_STATUS_NONE, "GST_PHOTOGRAPHY_FOCUS_STATUS_NONE",
-          "none"},
-      {GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING,
-          "GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING", "running"},
-      {GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL, "GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL",
-          "fail"},
-      {GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS,
-          "GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS", "success"},
-      {0, NULL, NULL}
-    };
-    etype = g_enum_register_static ("GstFocusStatus", values);
-  }
-  return etype;
-}
-
-GType
-gst_photo_caps_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GFlagsValue values[] = {
-      {GST_PHOTOGRAPHY_CAPS_NONE, "GST_PHOTOGRAPHY_CAPS_NONE", "none"},
-      {GST_PHOTOGRAPHY_CAPS_EV_COMP, "GST_PHOTOGRAPHY_CAPS_EV_COMP", "ev-comp"},
-      {GST_PHOTOGRAPHY_CAPS_ISO_SPEED, "GST_PHOTOGRAPHY_CAPS_ISO_SPEED",
-          "iso-speed"},
-      {GST_PHOTOGRAPHY_CAPS_WB_MODE, "GST_PHOTOGRAPHY_CAPS_WB_MODE", "wb-mode"},
-      {GST_PHOTOGRAPHY_CAPS_TONE, "GST_PHOTOGRAPHY_CAPS_TONE", "tone"},
-      {GST_PHOTOGRAPHY_CAPS_SCENE, "GST_PHOTOGRAPHY_CAPS_SCENE", "scene"},
-      {GST_PHOTOGRAPHY_CAPS_FLASH, "GST_PHOTOGRAPHY_CAPS_FLASH", "flash"},
-      {GST_PHOTOGRAPHY_CAPS_ZOOM, "GST_PHOTOGRAPHY_CAPS_ZOOM", "zoom"},
-      {GST_PHOTOGRAPHY_CAPS_FOCUS, "GST_PHOTOGRAPHY_CAPS_FOCUS", "focus"},
-      {GST_PHOTOGRAPHY_CAPS_APERTURE, "GST_PHOTOGRAPHY_CAPS_APERTURE",
-          "aperture"},
-      {GST_PHOTOGRAPHY_CAPS_EXPOSURE, "GST_PHOTOGRAPHY_CAPS_EXPOSURE",
-          "exposure"},
-      {GST_PHOTOGRAPHY_CAPS_SHAKE, "GST_PHOTOGRAPHY_CAPS_SHAKE", "shake"},
-      {0, NULL, NULL}
-    };
-    etype = g_flags_register_static ("GstPhotoCaps", values);
-  }
-  return etype;
-}
-
-GType
-gst_photo_shake_risk_get_type (void)
-{
-  static GType etype = 0;
-  if (etype == 0) {
-    static const GEnumValue values[] = {
-      {GST_PHOTOGRAPHY_SHAKE_RISK_LOW, "GST_PHOTOGRAPHY_SHAKE_RISK_LOW", "low"},
-      {GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM, "GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM",
-          "medium"},
-      {GST_PHOTOGRAPHY_SHAKE_RISK_HIGH, "GST_PHOTOGRAPHY_SHAKE_RISK_HIGH",
-          "high"},
-      {0, NULL, NULL}
-    };
-    etype = g_enum_register_static ("GstPhotoShakeRisk", values);
-  }
-  return etype;
-}
-
-/* Generated data ends here */
--- a/gst_plugins_good/gst-libs/gst/interfaces/photography-enumtypes.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-
-/* Generated data (by glib-mkenums) */
-
-#ifndef __GST_PHOTOGRAPHY_ENUM_TYPES_H__
-#define __GST_PHOTOGRAPHY_ENUM_TYPES_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-/* enumerations from "photography.h" */
-GType gst_white_balance_mode_get_type (void);
-#define GST_TYPE_WHITE_BALANCE_MODE (gst_white_balance_mode_get_type())
-GType gst_colour_tone_mode_get_type (void);
-#define GST_TYPE_COLOUR_TONE_MODE (gst_colour_tone_mode_get_type())
-GType gst_scene_mode_get_type (void);
-#define GST_TYPE_SCENE_MODE (gst_scene_mode_get_type())
-GType gst_flash_mode_get_type (void);
-#define GST_TYPE_FLASH_MODE (gst_flash_mode_get_type())
-GType gst_focus_status_get_type (void);
-#define GST_TYPE_FOCUS_STATUS (gst_focus_status_get_type())
-GType gst_photo_caps_get_type (void);
-#define GST_TYPE_PHOTO_CAPS (gst_photo_caps_get_type())
-GType gst_photo_shake_risk_get_type (void);
-#define GST_TYPE_PHOTO_SHAKE_RISK (gst_photo_shake_risk_get_type())
-G_END_DECLS
-
-#endif /* __GST_PHOTOGRAPHY_ENUM_TYPES_H__ */
-
-/* Generated data ends here */
-
--- a/gst_plugins_good/gst-libs/gst/interfaces/photography.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,367 +0,0 @@
-/* GStreamer
- *
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * photography.c: photography interface for digital imaging
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "photography.h"
-
-/**
- * SECTION:photography
- * @short_description: Interface for elements having digital imaging controls
- *
- * The interface allows access to some common digital imaging controls
- */
-
-static void gst_photography_iface_init (GstPhotographyInterface * iface);
-
-EXPORT_C GType
-gst_photography_get_type (void)
-{
-  static GType gst_photography_type = 0;
-
-  if (!gst_photography_type) {
-    static const GTypeInfo gst_photography_info = {
-      sizeof (GstPhotographyInterface),
-      (GBaseInitFunc) gst_photography_iface_init,
-      NULL,
-      NULL,
-      NULL,
-      NULL,
-      0,
-      0,
-      NULL,
-    };
-
-    gst_photography_type = g_type_register_static (G_TYPE_INTERFACE,
-        "GstPhotography", &gst_photography_info, 0);
-    g_type_interface_add_prerequisite (gst_photography_type,
-        GST_TYPE_IMPLEMENTS_INTERFACE);
-  }
-
-  return gst_photography_type;
-}
-
-static void
-gst_photography_iface_init (GstPhotographyInterface * iface)
-{
-  /* default virtual functions */
-  iface->get_ev_compensation = NULL;
-  iface->get_iso_speed = NULL;
-  iface->get_aperture = NULL;
-  iface->get_exposure = NULL;
-  iface->get_white_balance_mode = NULL;
-  iface->get_colour_tone_mode = NULL;
-  iface->get_scene_mode = NULL;
-  iface->get_flash_mode = NULL;
-  iface->get_zoom = NULL;
-
-  iface->set_ev_compensation = NULL;
-  iface->set_iso_speed = NULL;
-  iface->set_aperture = NULL;
-  iface->set_exposure = NULL;
-  iface->set_white_balance_mode = NULL;
-  iface->set_colour_tone_mode = NULL;
-  iface->set_scene_mode = NULL;
-  iface->set_flash_mode = NULL;
-  iface->set_zoom = NULL;
-
-  iface->get_capabilities = NULL;
-  iface->prepare_for_capture = NULL;
-  iface->set_autofocus = NULL;
-}
-
-#define GST_PHOTOGRAPHY_FUNC_TEMPLATE(function_name, param_type) \
-EXPORT_C gboolean \
-gst_photography_set_ ## function_name (GstPhotography * photo, param_type param) \
-{ \
-  GstPhotographyInterface *iface; \
-  g_return_val_if_fail (photo != NULL, FALSE); \
-  iface = GST_PHOTOGRAPHY_GET_IFACE (photo); \
-  if (iface->set_ ## function_name) { \
-    return iface->set_ ## function_name (photo, param); \
-  } \
-  return FALSE; \
-} \
-EXPORT_C gboolean \
-gst_photography_get_ ## function_name (GstPhotography * photo, param_type * param) \
-{ \
-  GstPhotographyInterface *iface; \
-  g_return_val_if_fail (photo != NULL, FALSE); \
-  iface = GST_PHOTOGRAPHY_GET_IFACE (photo); \
-  if (iface->get_ ## function_name) { \
-    return iface->get_ ## function_name (photo, param); \
-  } \
-  return FALSE; \
-}
-
-
-/**
- * gst_photography_set_ev_compensation:
- * @photo: #GstPhotography interface of a #GstElement
- * @ev_comp: ev compensation value to set
- *
- * Set the ev compensation value for the #GstElement
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_ev_compensation:
- * @photo: #GstPhotography interface of a #GstElement
- * @ev_comp: ev compensation value to get
- *
- * Get the ev compensation value for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (ev_compensation, gfloat);
-
-/**
- * gst_photography_set_iso_speed:
- * @photo: #GstPhotography interface of a #GstElement
- * @iso_speed: ISO speed value to set
- *
- * Set the ISO value (light sensivity) for the #GstElement
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_iso_speed:
- * @photo: #GstPhotography interface of a #GstElement
- * @iso_speed: ISO speed value to get
- *
- * Get the ISO value (light sensivity) for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (iso_speed, guint);
-
-/**
- * gst_photography_set_aperture:
- * @photo: #GstPhotography interface of a #GstElement
- * @aperture: aperture value to set
- *
- * Set the aperture value for the #GstElement
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_aperture:
- * @photo: #GstPhotography interface of a #GstElement
- * @aperture: aperture value to get
- *
- * Get the aperture value for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (aperture, guint);
-
-/**
- * gst_photography_set_exposure:
- * @photo: #GstPhotography interface of a #GstElement
- * @exposure: exposure time to set
- *
- * Set the fixed exposure time (in us) for the #GstElement
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_exposure:
- * @photo: #GstPhotography interface of a #GstElement
- * @exposure: exposure time to get
- *
- * Get the fixed exposure time (in us) for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (exposure, guint32);
-
-/**
- * gst_photography_set_white_balance_mode:
- * @photo: #GstPhotography interface of a #GstElement
- * @wb_mode: #GstWhiteBalanceMode to set
- *
- * Set the white balance mode for the #GstElement
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_white_balance_mode:
- * @photo: #GstPhotography interface of a #GstElement
- * @wb_mode: #GstWhiteBalanceMode to get
- *
- * Get the white balance mode for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (white_balance_mode, GstWhiteBalanceMode);
-
-/**
- * gst_photography_set_colour_tone_mode:
- * @photo: #GstPhotography interface of a #GstElement
- * @tone_mode: #GstColourToneMode to set
- *
- * Set the colour tone mode for the #GstElement
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_colour_tone_mode:
- * @photo: #GstPhotography interface of a #GstElement
- * @tone_mode: #GstColourToneMode to get
- *
- * Get the colour tone mode for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (colour_tone_mode, GstColourToneMode);
-
-/**
- * gst_photography_set_scene_mode:
- * @photo: #GstPhotography interface of a #GstElement
- * @scene_mode: #GstSceneMode to set
- *
- * Set the scene mode for the #GstElement
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_scene_mode:
- * @photo: #GstPhotography interface of a #GstElement
- * @scene_mode: #GstSceneMode to get
- *
- * Get the scene mode for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (scene_mode, GstSceneMode);
-
-/**
- * gst_photography_set_flash_mode:
- * @photo: #GstPhotography interface of a #GstElement
- * @flash_mode: #GstFlashMode to set
- *
- * Set the flash mode for the #GstElement
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_flash_mode:
- * @photo: #GstPhotography interface of a #GstElement
- * @flash_mode: #GstFlashMode to get
- *
- * Get the flash mode for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (flash_mode, GstFlashMode);
-
-/**
- * gst_photography_set_zoom:
- * @photo: #GstPhotography interface of a #GstElement
- * @zoom: zoom value to set
- *
- * Set the zoom value for the #GstElement.
- * E.g. 1.0 to get original image and 3.0 for 3x zoom and so on.
- *
- * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
- */
-/**
- * gst_photography_get_zoom:
- * @photo: #GstPhotography interface of a #GstElement
- * @zoom: zoom value to get
- *
- * Get the zoom value for the #GstElement
- *
- * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
- */
-GST_PHOTOGRAPHY_FUNC_TEMPLATE (zoom, gfloat);
-
-/**
- * gst_photography_get_capabilities:
- * @photo: #GstPhotography interface of a #GstElement
- *
- * Get #GstPhotoCaps bitmask value that indicates what photography
- * interface features the #GstElement supports
- *
- * Returns: #GstPhotoCaps value
- */
-EXPORT_C
-GstPhotoCaps
-gst_photography_get_capabilities (GstPhotography * photo)
-{
-  GstPhotographyInterface *iface;
-  g_return_val_if_fail (photo != NULL, GST_PHOTOGRAPHY_CAPS_NONE);
-
-  iface = GST_PHOTOGRAPHY_GET_IFACE (photo);
-  if (iface->get_capabilities) {
-    return iface->get_capabilities (photo);
-  } else {
-    return GST_PHOTOGRAPHY_CAPS_NONE;
-  }
-}
-
-/**
- * gst_photography_prepare_for_capture:
- * @photo: #GstPhotography interface of a #GstElement
- * @func: callback that is called after capturing has been prepared
- * @user_data: user data that will be passed to the callback @func
- *
- * Start preparations for capture. @func callback is called after
- * preparations are done.
- */
-EXPORT_C
-void
-gst_photography_prepare_for_capture (GstPhotography * photo,
-    GstPhotoCapturePrepared func, gpointer user_data)
-{
-  GstPhotographyInterface *iface;
-  g_return_if_fail (photo != NULL);
-
-  iface = GST_PHOTOGRAPHY_GET_IFACE (photo);
-  if (iface->prepare_for_capture) {
-    iface->prepare_for_capture (photo, func, user_data);
-  }
-}
-
-/**
- * gst_photography_set_autofocus:
- * @photo: #GstPhotography interface of a #GstElement
- * @on: %TRUE to start autofocusing, %FALSE to stop autofocusing
- *
- * Start or stop autofocusing. %GST_PHOTOGRAPHY_AUTOFOCUS_DONE
- * message is posted to bus when autofocusing has finished.
- */
-EXPORT_C
-void
-gst_photography_set_autofocus (GstPhotography * photo, gboolean on)
-{
-  GstPhotographyInterface *iface;
-  g_return_if_fail (photo != NULL);
-
-  iface = GST_PHOTOGRAPHY_GET_IFACE (photo);
-  if (iface->set_autofocus) {
-    iface->set_autofocus (photo, on);
-  }
-}
--- a/gst_plugins_good/gst-libs/gst/interfaces/photography.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-/* GStreamer
- *
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * photography.h: photography interface for digital imaging
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GST_PHOTOGRAPHY_H__
-#define __GST_PHOTOGRAPHY_H__
-
-#include <gst/gst.h>
-#include "photography-enumtypes.h"
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_PHOTOGRAPHY \
-  (gst_photography_get_type ())
-#define GST_PHOTOGRAPHY(obj) \
-  (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PHOTOGRAPHY, GstPhotography))
-#define GST_IS_PHOTOGRAPHY(obj) \
-  (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PHOTOGRAPHY))
-#define GST_PHOTOGRAPHY_GET_IFACE(inst) \
-  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_PHOTOGRAPHY, GstPhotographyInterface))
-
-
-/* Custom GstMessage name that will be sent to GstBus when autofocusing
-   is complete */
-#define GST_PHOTOGRAPHY_AUTOFOCUS_DONE "autofocus-done"
-
-/* Custom GstMessage name that will be sent to GstBus when shake risk changes */
-#define GST_PHOTOGRAPHY_SHAKE_RISK "shake-risk"
-
-/**
- * GstPhotography:
- *
- * Opaque #GstPhotography data structure.
- */
-typedef struct _GstPhotography GstPhotography;
-
-typedef enum
-{
-  GST_PHOTOGRAPHY_WB_MODE_AUTO = 0,
-  GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT,
-  GST_PHOTOGRAPHY_WB_MODE_CLOUDY,
-  GST_PHOTOGRAPHY_WB_MODE_SUNSET,
-  GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN,
-  GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT
-} GstWhiteBalanceMode;
-
-typedef enum
-{
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NORMAL = 0,
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_SEPIA,
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NEGATIVE,
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_GRAYSCALE,
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_NATURAL,
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_VIVID,
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_COLORSWAP,
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_SOLARIZE,
-  GST_PHOTOGRAPHY_COLOUR_TONE_MODE_OUT_OF_FOCUS
-} GstColourToneMode;
-
-typedef enum
-{
-  GST_PHOTOGRAPHY_SCENE_MODE_MANUAL = 0,
-  GST_PHOTOGRAPHY_SCENE_MODE_CLOSEUP,
-  GST_PHOTOGRAPHY_SCENE_MODE_PORTRAIT,
-  GST_PHOTOGRAPHY_SCENE_MODE_LANDSCAPE,
-  GST_PHOTOGRAPHY_SCENE_MODE_SPORT,
-  GST_PHOTOGRAPHY_SCENE_MODE_NIGHT,
-  GST_PHOTOGRAPHY_SCENE_MODE_AUTO
-} GstSceneMode;
-
-typedef enum
-{
-  GST_PHOTOGRAPHY_FLASH_MODE_AUTO = 0,
-  GST_PHOTOGRAPHY_FLASH_MODE_OFF,
-  GST_PHOTOGRAPHY_FLASH_MODE_ON,
-  GST_PHOTOGRAPHY_FLASH_MODE_FILL_IN,
-  GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE
-} GstFlashMode;
-
-typedef enum
-{
-  GST_PHOTOGRAPHY_FOCUS_STATUS_NONE = 0,
-  GST_PHOTOGRAPHY_FOCUS_STATUS_RUNNING,
-  GST_PHOTOGRAPHY_FOCUS_STATUS_FAIL,
-  GST_PHOTOGRAPHY_FOCUS_STATUS_SUCCESS
-} GstFocusStatus;
-
-typedef enum
-{
-  GST_PHOTOGRAPHY_CAPS_NONE = (0 << 0),
-  GST_PHOTOGRAPHY_CAPS_EV_COMP = (1 << 0),
-  GST_PHOTOGRAPHY_CAPS_ISO_SPEED = (1 << 1),
-  GST_PHOTOGRAPHY_CAPS_WB_MODE = (1 << 2),
-  GST_PHOTOGRAPHY_CAPS_TONE = (1 << 3),
-  GST_PHOTOGRAPHY_CAPS_SCENE = (1 << 4),
-  GST_PHOTOGRAPHY_CAPS_FLASH = (1 << 5),
-  GST_PHOTOGRAPHY_CAPS_ZOOM = (1 << 6),
-  GST_PHOTOGRAPHY_CAPS_FOCUS = (1 << 7),
-  GST_PHOTOGRAPHY_CAPS_APERTURE = (1 << 8),
-  GST_PHOTOGRAPHY_CAPS_EXPOSURE = (1 << 9),
-  GST_PHOTOGRAPHY_CAPS_SHAKE = (1 << 10)
-} GstPhotoCaps;
-
-typedef enum
-{
-  GST_PHOTOGRAPHY_SHAKE_RISK_LOW = 0,
-  GST_PHOTOGRAPHY_SHAKE_RISK_MEDIUM,
-  GST_PHOTOGRAPHY_SHAKE_RISK_HIGH,
-} GstPhotoShakeRisk;
-
-typedef struct
-{
-  GstWhiteBalanceMode wb_mode;
-  GstColourToneMode tone_mode;
-  GstSceneMode scene_mode;
-  GstFlashMode flash_mode;
-  guint32 exposure;
-  guint aperture;
-  gfloat ev_compensation;
-  guint iso_speed;
-  gfloat zoom;
-} GstPhotoSettings;
-
-/**
- * GstPhotoCapturePrepared:
- * @data: user data that has been given, when registering the callback
- *
- * This callback will be called when the element has finished preparations
- * for photo capture.
- */
-typedef void (*GstPhotoCapturePrepared) (gpointer data);
-
-/**
- * GstPhotographyInterface:
- * @parent: parent interface type.
- * @get_ev_compensation: vmethod to get ev exposure compensation value
- * @get_iso_speed: vmethod to get iso speed (light sensitivity) value
- * @get_aperture: vmethod to get aperture value
- * @get_exposure: vmethod to get exposure time value
- * @get_white_balance_mode: vmethod to get white balance mode value
- * @get_colour_tone_mode: vmethod to get colour tone mode value
- * @get_scene_mode: vmethod to get scene mode value
- * @get_flash_mode: vmethod to get flash mode value
- * @get_zoom: vmethod to get zoom factor value
- * @set_ev_compensation: vmethod to set ev exposure compensation value
- * @set_iso_speed: vmethod to set iso speed (light sensitivity) value
- * @set_aperture: vmethod to set aperture value
- * @set_exposure: vmethod to set exposure time value
- * @set_white_balance_mode: vmethod to set white balance mode value
- * @set_colour_tone_mode: vmethod to set colour tone mode value
- * @set_scene_mode: vmethod to set scene mode value
- * @set_flash_mode: vmethod to set flash mode value
- * @set_zoom: vmethod to set zoom factor value
- * @get_capabilities: vmethod to get supported capabilities of the interface
- * @prepare_for_capture: vmethod to tell the element to prepare for capturing
- * @set_autofocus: vmethod to set autofocus on/off
- *
- * #GstPhotographyInterface interface.
- */
-typedef struct _GstPhotographyInterface
-{
-  GTypeInterface parent;
-
-  /* virtual functions */
-    gboolean (*get_ev_compensation) (GstPhotography * photo, gfloat * ev_comp);
-    gboolean (*get_iso_speed) (GstPhotography * photo, guint * iso_speed);
-    gboolean (*get_aperture) (GstPhotography * photo, guint * aperture);
-    gboolean (*get_exposure) (GstPhotography * photo, guint32 * exposure);
-    gboolean (*get_white_balance_mode) (GstPhotography * photo,
-      GstWhiteBalanceMode * wb_mode);
-    gboolean (*get_colour_tone_mode) (GstPhotography * photo,
-      GstColourToneMode * tone_mode);
-    gboolean (*get_scene_mode) (GstPhotography * photo,
-      GstSceneMode * scene_mode);
-    gboolean (*get_flash_mode) (GstPhotography * photo,
-      GstFlashMode * flash_mode);
-    gboolean (*get_zoom) (GstPhotography * photo, gfloat * zoom);
-
-    gboolean (*set_ev_compensation) (GstPhotography * photo, gfloat ev_comp);
-    gboolean (*set_iso_speed) (GstPhotography * photo, guint iso_speed);
-    gboolean (*set_aperture) (GstPhotography * photo, guint aperture);
-    gboolean (*set_exposure) (GstPhotography * photo, guint32 exposure);
-    gboolean (*set_white_balance_mode) (GstPhotography * photo,
-      GstWhiteBalanceMode wb_mode);
-    gboolean (*set_colour_tone_mode) (GstPhotography * photo,
-      GstColourToneMode tone_mode);
-    gboolean (*set_scene_mode) (GstPhotography * photo,
-      GstSceneMode scene_mode);
-    gboolean (*set_flash_mode) (GstPhotography * photo,
-      GstFlashMode flash_mode);
-    gboolean (*set_zoom) (GstPhotography * photo, gfloat zoom);
-
-    GstPhotoCaps (*get_capabilities) (GstPhotography * photo);
-  void (*prepare_for_capture) (GstPhotography * photo,
-      GstPhotoCapturePrepared func, gpointer user_data);
-  void (*set_autofocus) (GstPhotography * photo, gboolean on);
-
-  /*< private > */
-  gpointer _gst_reserved[GST_PADDING];
-} GstPhotographyInterface;
-
-IMPORT_C GType gst_photography_get_type (void);
-
-/* virtual class function wrappers */
-IMPORT_C gboolean gst_photography_get_ev_compensation (GstPhotography * photo,
-    gfloat * ev_comp);
-IMPORT_C gboolean gst_photography_get_iso_speed (GstPhotography * photo,
-    guint * iso_speed);
-IMPORT_C gboolean gst_photography_get_aperture (GstPhotography * photo,
-    guint * aperture);
-IMPORT_C gboolean gst_photography_get_exposure (GstPhotography * photo,
-    guint32 * exposure);
-IMPORT_C gboolean gst_photography_get_white_balance_mode (GstPhotography * photo,
-    GstWhiteBalanceMode * wb_mode);
-IMPORT_C gboolean gst_photography_get_colour_tone_mode (GstPhotography * photo,
-    GstColourToneMode * tone_mode);
-IMPORT_C gboolean gst_photography_get_scene_mode (GstPhotography * photo,
-    GstSceneMode * scene_mode);
-IMPORT_C gboolean gst_photography_get_flash_mode (GstPhotography * photo,
-    GstFlashMode * flash_mode);
-IMPORT_C gboolean gst_photography_get_zoom (GstPhotography * photo, gfloat * zoom);
-
-IMPORT_C gboolean gst_photography_set_ev_compensation (GstPhotography * photo,
-    gfloat ev_comp);
-IMPORT_C gboolean gst_photography_set_iso_speed (GstPhotography * photo,
-    guint iso_speed);
-IMPORT_C gboolean gst_photography_set_aperture (GstPhotography * photo, guint aperture);
-IMPORT_C gboolean gst_photography_set_exposure (GstPhotography * photo, guint exposure);
-IMPORT_C gboolean gst_photography_set_white_balance_mode (GstPhotography * photo,
-    GstWhiteBalanceMode wb_mode);
-IMPORT_C gboolean gst_photography_set_colour_tone_mode (GstPhotography * photo,
-    GstColourToneMode tone_mode);
-IMPORT_C gboolean gst_photography_set_scene_mode (GstPhotography * photo,
-    GstSceneMode scene_mode);
-IMPORT_C gboolean gst_photography_set_flash_mode (GstPhotography * photo,
-    GstFlashMode flash_mode);
-IMPORT_C gboolean gst_photography_set_zoom (GstPhotography * photo, gfloat zoom);
-
-IMPORT_C GstPhotoCaps gst_photography_get_capabilities (GstPhotography * photo);
-
-IMPORT_C void gst_photography_prepare_for_capture (GstPhotography * photo,
-    GstPhotoCapturePrepared func, gpointer user_data);
-
-IMPORT_C void gst_photography_set_autofocus (GstPhotography * photo, gboolean on);
-
-G_END_DECLS
-
-#endif /* __GST_PHOTOGRAPHY_H__ */
--- a/gst_plugins_good/gst/camerabin/camerabingeneral.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:camerabingeneral
- * @short_description: helper functions for #GstCameraBin and it's modules
- *
- * Common helper functions for #GstCameraBin, #GstCameraBinImage and
- * #GstCameraBinVideo.
- *
- */
-
-#include "camerabingeneral.h"
-#include <glib.h>
-
-GST_DEBUG_CATEGORY (gst_camerabin_debug);
-
-static gboolean
-camerabin_general_dbg_have_event (GstPad * pad, GstEvent * event,
-    gpointer u_data)
-{
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_NEWSEGMENT:
-    {
-      GstElement *elem = (GstElement *) u_data;
-      gchar *elem_name = gst_element_get_name (elem);
-      gchar *pad_name = gst_pad_get_name (pad);
-
-      gboolean update;
-      gdouble rate;
-      GstFormat format;
-      gint64 start, stop, pos;
-      gst_event_parse_new_segment (event, &update, &rate, &format, &start,
-          &stop, &pos);
-
-      GST_DEBUG ("element %s, pad %s, new_seg_start =%" GST_TIME_FORMAT
-          ", new_seg_stop =%" GST_TIME_FORMAT
-          ", new_seg_pos =%" GST_TIME_FORMAT "\n", elem_name, pad_name,
-          GST_TIME_ARGS (start), GST_TIME_ARGS (stop), GST_TIME_ARGS (pos));
-
-      g_free (pad_name);
-      g_free (elem_name);
-    }
-      break;
-    default:
-      break;
-  }
-
-  return TRUE;
-}
-
-static gboolean
-camerabin_general_dbg_have_buffer (GstPad * pad, GstBuffer * buffer,
-    gpointer u_data)
-{
-  GstElement *elem = (GstElement *) u_data;
-  gchar *elem_name = gst_element_get_name (elem);
-  gchar *pad_name = gst_pad_get_name (pad);
-
-  GST_DEBUG ("element %s, pad %s, buf_ts =%" GST_TIME_FORMAT "\n", elem_name,
-      pad_name, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
-
-  g_free (pad_name);
-  g_free (elem_name);
-
-  return TRUE;
-
-}
-
-void
-camerabin_general_dbg_set_probe (GstElement * elem, gchar * pad_name,
-    gboolean buf, gboolean evt)
-{
-  GstPad *pad = gst_element_get_static_pad (elem, pad_name);
-
-  if (buf)
-    gst_pad_add_buffer_probe (pad,
-        G_CALLBACK (camerabin_general_dbg_have_buffer), elem);
-  if (evt)
-    gst_pad_add_event_probe (pad,
-        G_CALLBACK (camerabin_general_dbg_have_event), elem);
-
-  gst_object_unref (pad);
-}
-
-/**
- * gst_camerabin_add_element:
- * @bin: add an element to this bin
- * @new_elem: new element to be added
- *
- * Adds given element to given @bin. Looks for an unconnected src pad
- * from the @bin and links the element to it.  Raises an error if adding
- * or linking failed.
- *
- * Returns: %TRUE if adding and linking succeeded, %FALSE otherwise.
- */
-gboolean
-gst_camerabin_add_element (GstBin * bin, GstElement * new_elem)
-{
-  gboolean ret = FALSE;
-
-  ret = gst_camerabin_try_add_element (bin, new_elem);
-
-  if (!ret) {
-    gchar *elem_name = gst_element_get_name (new_elem);
-    GST_ELEMENT_ERROR (bin, CORE, NEGOTIATION, (NULL),
-        ("linking %s failed", elem_name));
-    g_free (elem_name);
-  }
-
-  return ret;
-}
-
-/**
- * gst_camerabin_try_add_element:
- * @bin: tries adding an element to this bin
- * @new_elem: new element to be added
- *
- * Adds given element to given @bin. Looks for an unconnected src pad
- * from the @bin and links the element to it.
- *
- * Returns: %TRUE if adding and linking succeeded, %FALSE otherwise.
- */
-gboolean
-gst_camerabin_try_add_element (GstBin * bin, GstElement * new_elem)
-{
-  GstPad *bin_pad;
-  GstElement *bin_elem;
-  gboolean ret = TRUE;
-
-  if (!bin || !new_elem) {
-    return FALSE;
-  }
-
-  /* Get pads for linking */
-  GST_DEBUG ("finding unconnected src pad");
-  //bin_pad = gst_bin_find_unlinked_pad (bin, GST_PAD_SRC);
-  bin_pad = gst_bin_find_unconnected_pad (bin, GST_PAD_SRC);
-  GST_DEBUG ("unconnected pad %s:%s", GST_DEBUG_PAD_NAME (bin_pad));
-  /* Add to bin */
-  gst_bin_add (GST_BIN (bin), new_elem);
-  /* Link, if unconnected pad was found, otherwise just add it to bin */
-  if (bin_pad) {
-    bin_elem = gst_pad_get_parent_element (bin_pad);
-    gst_object_unref (bin_pad);
-    if (!gst_element_link (bin_elem, new_elem)) {
-      gst_bin_remove (bin, new_elem);
-      ret = FALSE;
-    }
-    gst_object_unref (bin_elem);
-  }
-
-  return ret;
-}
-
-/**
- * gst_camerabin_create_and_add_element:
- * @bin: tries adding an element to this bin
- * @elem_name: name of the element to be created
- *
- * Creates an element according to given name and
- * adds it to given @bin. Looks for an unconnected src pad
- * from the @bin and links the element to it.
- *
- * Returns: pointer to the new element if successful, NULL otherwise.
- */
-GstElement *
-gst_camerabin_create_and_add_element (GstBin * bin, const gchar * elem_name)
-{
-  GstElement *new_elem = NULL;
-
-  GST_DEBUG ("adding %s", elem_name);
-  new_elem = gst_element_factory_make (elem_name, NULL);
-  if (!new_elem) {
-    GST_ELEMENT_ERROR (bin, CORE, MISSING_PLUGIN, (NULL),
-        ("could not create \"%s\" element.", elem_name));
-  } else if (!gst_camerabin_add_element (bin, new_elem)) {
-    new_elem = NULL;
-  }
-
-  return new_elem;
-}
-
-/**
- * gst_camerabin_remove_elements_from_bin:
- * @bin: removes all elements from this bin
- *
- * Removes all elements from this @bin.
- */
-void
-gst_camerabin_remove_elements_from_bin (GstBin * bin)
-{
-  GstIterator *iter = NULL;
-  gpointer data = NULL;
-  GstElement *elem = NULL;
-  gboolean done = FALSE;
-
-  iter = gst_bin_iterate_elements (bin);
-  while (!done) {
-    switch (gst_iterator_next (iter, &data)) {
-      case GST_ITERATOR_OK:
-        elem = GST_ELEMENT (data);
-        gst_bin_remove (bin, elem);
-        /* Iterator increased the element refcount, so unref */
-        gst_object_unref (elem);
-        break;
-      case GST_ITERATOR_RESYNC:
-        gst_iterator_resync (iter);
-        break;
-      case GST_ITERATOR_ERROR:
-        GST_WARNING_OBJECT (bin, "error in iterating elements");
-        done = TRUE;
-        break;
-      case GST_ITERATOR_DONE:
-        done = TRUE;
-        break;
-    }
-  }
-  gst_iterator_free (iter);
-}
-
-/**
- * gst_camerabin_drop_eos_probe:
- * @pad: pad receiving the event
- * @event: received event
- * @u_data: not used
- *
- * Event probe that drop all eos events.
- *
- * Returns: FALSE to drop the event, TRUE otherwise
- */
-gboolean
-gst_camerabin_drop_eos_probe (GstPad * pad, GstEvent * event, gpointer u_data)
-{
-  gboolean ret = TRUE;
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_EOS:
-      GST_DEBUG ("dropping eos in %s:%s", GST_DEBUG_PAD_NAME (pad));
-      ret = FALSE;
-      break;
-    default:
-      break;
-  }
-  return ret;
-}
--- a/gst_plugins_good/gst/camerabin/camerabingeneral.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __CAMERABIN_GENERAL_H_
-#define __CAMERABIN_GENERAL_H_
-
-#include <sys/time.h>
-#include <time.h>
-
-#include <gst/gst.h>
-
-
-typedef struct timeval TIME_TYPE;
-#define GET_TIME(t) do { gettimeofday(&(t), NULL); } while(0)
-#define DIFF_TIME(t2,t1,d) do { d = ((t2).tv_sec - (t1).tv_sec) * 1000000 + \
-      (t2).tv_usec - (t1).tv_usec; } while(0)
-
-#define _INIT_TIMER_BLOCK TIME_TYPE t1, t2; guint32 d; do {;}while (0)
-
-#define _OPEN_TIMER_BLOCK { GET_TIME(t1); do {;}while (0)
-#define _CLOSE_TIMER_BLOCK GET_TIME(t2); DIFF_TIME(t2,t1,d); \
-  GST_DEBUG("elapsed time = %u\n", d); \
-  } do {;}while (0)
-
-
-extern void
-camerabin_general_dbg_set_probe (GstElement * elem, gchar * pad_name,
-    gboolean buf, gboolean evt);
-
-gboolean gst_camerabin_try_add_element (GstBin * bin, GstElement * new_elem);
-
-gboolean gst_camerabin_add_element (GstBin * bin, GstElement * new_elem);
-
-GstElement *gst_camerabin_create_and_add_element (GstBin * bin,
-    const gchar * elem_name);
-
-void gst_camerabin_remove_elements_from_bin (GstBin * bin);
-
-gboolean
-gst_camerabin_drop_eos_probe (GstPad * pad, GstEvent * event, gpointer u_data);
-
-GST_DEBUG_CATEGORY_EXTERN (gst_camerabin_debug);
-#define GST_CAT_DEFAULT gst_camerabin_debug
-
-#endif /* #ifndef __CAMERABIN_GENERAL_H_ */
--- a/gst_plugins_good/gst/camerabin/camerabinimage.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,571 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:camerabinimage
- * @short_description: image capturing module of #GstCameraBin
- *
- * <refsect2>
- * <para>
- *
- * The pipeline for this module is:
- *
- * <informalexample>
- * <programlisting>
- *-----------------------------------------------------------------------------
- *                      (src0) -> queue ->
- * -> [post proc] -> tee <
- *                      (src1) -> imageenc -> metadatamuxer -> filesink
- *-----------------------------------------------------------------------------
- * </programlisting>
- * </informalexample>
- *
- * The property of elements are:
- *
- *   queue - "max-size-buffers", 1, "leaky", 2,
- *
- * The image bin opens file for image writing in READY to PAUSED state change.
- * The image bin closes the file in PAUSED to READY state change.
- *
- * </para>
- * </refsect2>
- */
-
-/*
- * includes
- */
-
-#include <gst/gst.h>
-
-#include "camerabinimage.h"
-#include "camerabingeneral.h"
-
-#include "string.h"
-
-/* default internal element names */
-
-#define DEFAULT_SINK "filesink"
-#define DEFAULT_ENC "jpegenc"
-#define DEFAULT_META_MUX "metadatamux"
-
-enum
-{
-  PROP_0,
-  PROP_FILENAME
-};
-
-static gboolean gst_camerabin_image_create_elements (GstCameraBinImage * img);
-static void gst_camerabin_image_destroy_elements (GstCameraBinImage * img);
-
-static void gst_camerabin_image_dispose (GstCameraBinImage * sink);
-static GstStateChangeReturn
-gst_camerabin_image_change_state (GstElement * element,
-    GstStateChange transition);
-static gboolean gst_camerabin_image_send_event (GstElement * element,
-    GstEvent * event);
-static void gst_camerabin_image_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec);
-static void gst_camerabin_image_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec);
-
-GST_BOILERPLATE (GstCameraBinImage, gst_camerabin_image, GstBin, GST_TYPE_BIN);
-
-static const GstElementDetails gst_camerabin_image_details =
-GST_ELEMENT_DETAILS ("Image capture bin for camerabin",
-    "Bin/Image",
-    "Process and store image data",
-    "Edgard Lima <edgard.lima@indt.org.br>\n"
-    "Nokia Corporation <multimedia@maemo.org>");
-
-static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS_ANY);
-
-static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS_ANY);
-
-static void
-gst_camerabin_image_base_init (gpointer klass)
-{
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_add_pad_template (eklass,
-      gst_static_pad_template_get (&sink_template));
-  gst_element_class_add_pad_template (eklass,
-      gst_static_pad_template_get (&src_template));
-  gst_element_class_set_details (eklass, &gst_camerabin_image_details);
-}
-
-static void
-gst_camerabin_image_class_init (GstCameraBinImageClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->dispose =
-      (GObjectFinalizeFunc) GST_DEBUG_FUNCPTR (gst_camerabin_image_dispose);
-  eklass->change_state = GST_DEBUG_FUNCPTR (gst_camerabin_image_change_state);
-  eklass->send_event = GST_DEBUG_FUNCPTR (gst_camerabin_image_send_event);
-
-  gobject_class->set_property =
-      GST_DEBUG_FUNCPTR (gst_camerabin_image_set_property);
-  gobject_class->get_property =
-      GST_DEBUG_FUNCPTR (gst_camerabin_image_get_property);
-
-  /**
-   * GstCameraBinImage:filename
-   *
-   * This property can be used to specify the filename of the image.
-   *
-   **/
-  g_object_class_install_property (gobject_class, PROP_FILENAME,
-      g_param_spec_string ("filename", "Filename",
-          "Filename of the image to save", NULL, G_PARAM_READWRITE));
-}
-
-static void
-gst_camerabin_image_init (GstCameraBinImage * img,
-    GstCameraBinImageClass * g_class)
-{
-  img->filename = g_string_new ("");
-
-  img->pad_tee_enc = NULL;
-  img->pad_tee_view = NULL;
-
-  img->post = NULL;
-  img->tee = NULL;
-  img->enc = NULL;
-  img->user_enc = NULL;
-  img->meta_mux = NULL;
-  img->sink = NULL;
-  img->queue = NULL;
-
-  /* Create src and sink ghost pads */
-  img->sinkpad = gst_ghost_pad_new_no_target ("sink", GST_PAD_SINK);
-  gst_element_add_pad (GST_ELEMENT (img), img->sinkpad);
-
-  img->srcpad = gst_ghost_pad_new_no_target ("src", GST_PAD_SRC);
-  gst_element_add_pad (GST_ELEMENT (img), img->srcpad);
-
-  img->elements_created = FALSE;
-}
-
-static void
-gst_camerabin_image_dispose (GstCameraBinImage * img)
-{
-  g_string_free (img->filename, TRUE);
-  img->filename = NULL;
-
-  if (img->user_enc) {
-    gst_object_unref (img->user_enc);
-    img->user_enc = NULL;
-  }
-
-  if (img->post) {
-    gst_object_unref (img->post);
-    img->post = NULL;
-  }
-
-  G_OBJECT_CLASS (parent_class)->dispose ((GObject *) img);
-}
-
-static GstStateChangeReturn
-gst_camerabin_image_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstCameraBinImage *img = GST_CAMERABIN_IMAGE (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_camerabin_image_create_elements (img)) {
-        return GST_STATE_CHANGE_FAILURE;
-      }
-      /* Allow setting filename when image bin in READY state */
-      gst_element_set_locked_state (img->sink, TRUE);
-      break;
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      gst_element_set_locked_state (img->sink, FALSE);
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      /* Set sink to NULL in order to write the file _now_ */
-      GST_INFO ("write img file: %s", img->filename->str);
-      gst_element_set_locked_state (img->sink, TRUE);
-      gst_element_set_state (img->sink, GST_STATE_NULL);
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_camerabin_image_destroy_elements (img);
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
-
-gboolean
-gst_camerabin_image_send_event (GstElement * element, GstEvent * event)
-{
-  GstCameraBinImage *bin = GST_CAMERABIN_IMAGE (element);
-  gboolean ret = FALSE;
-
-  GST_INFO ("got %s event", GST_EVENT_TYPE_NAME (event));
-
-  if (GST_EVENT_IS_DOWNSTREAM (event)) {
-    ret = gst_pad_send_event (bin->sinkpad, event);
-  } else {
-    if (bin->sink) {
-      ret = gst_element_send_event (bin->sink, event);
-    } else {
-      GST_WARNING ("upstream event handling failed");
-    }
-  }
-
-  return ret;
-}
-
-static void
-gst_camerabin_image_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstCameraBinImage *bin = GST_CAMERABIN_IMAGE (object);
-
-  switch (prop_id) {
-    case PROP_FILENAME:
-      g_string_assign (bin->filename, g_value_get_string (value));
-      if (bin->sink) {
-        g_object_set (G_OBJECT (bin->sink), "location", bin->filename->str,
-            NULL);
-      } else {
-        GST_INFO ("no sink, not setting name yet");
-      }
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_camerabin_image_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstCameraBinImage *bin = GST_CAMERABIN_IMAGE (object);
-
-  switch (prop_id) {
-    case PROP_FILENAME:
-      g_value_set_string (value, bin->filename->str);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-/*
- * static helper functions implementation
- */
-
-/**
- * metadata_write_probe:
- * @pad: sink pad of metadata muxer
- * @buffer: received buffer
- * @u_data: image bin object
- *
- * Buffer probe that sets Xmp.dc.type and Xmp.dc.format tags
- * to metadata muxer based on preceding element src pad caps.
- *
- * Returns: TRUE always
- */
-static gboolean
-metadata_write_probe (GstPad * pad, GstBuffer * buffer, gpointer u_data)
-{
-  /* Add XMP tags */
-  GstCameraBinImage *img = NULL;
-  GstTagSetter *setter = NULL;
-  GstPad *srcpad = NULL;
-  GstCaps *caps = NULL;
-  GstStructure *st = NULL;
-
-  img = GST_CAMERABIN_IMAGE (u_data);
-
-  g_return_val_if_fail (img != NULL, TRUE);
-
-  setter = GST_TAG_SETTER (img->meta_mux);
-
-  if (!setter) {
-    GST_WARNING_OBJECT (img, "setting tags failed");
-    goto done;
-  }
-
-  /* Xmp.dc.type tag */
-  gst_tag_setter_add_tags (setter, GST_TAG_MERGE_REPLACE,
-      GST_TAG_CODEC, "Image", NULL);
-  /* Xmp.dc.format tag */
-  if (img->enc) {
-    srcpad = gst_element_get_static_pad (img->enc, "src");
-  }
-  GST_LOG_OBJECT (img, "srcpad:%" GST_PTR_FORMAT, srcpad);
-  if (srcpad) {
-    caps = gst_pad_get_negotiated_caps (srcpad);
-    GST_LOG_OBJECT (img, "caps:%" GST_PTR_FORMAT, caps);
-    if (caps) {
-      /* If there are many structures, we can't know which one to use */
-      if (gst_caps_get_size (caps) != 1) {
-        GST_WARNING_OBJECT (img, "can't decide structure for format tag");
-        goto done;
-      }
-      st = gst_caps_get_structure (caps, 0);
-      if (st) {
-        GST_DEBUG_OBJECT (img, "Xmp.dc.format:%s", gst_structure_get_name (st));
-        gst_tag_setter_add_tags (setter, GST_TAG_MERGE_REPLACE,
-            GST_TAG_VIDEO_CODEC, gst_structure_get_name (st), NULL);
-      }
-    }
-  }
-done:
-  if (caps)
-    gst_caps_unref (caps);
-  if (srcpad)
-    gst_object_unref (srcpad);
-
-  return TRUE;
-}
-
-
-/**
- * gst_camerabin_image_create_elements:
- * @img: a pointer to #GstCameraBinImage object
- *
- * This function creates needed #GstElements and resources to capture images.
- * Use gst_camerabin_image_destroy_elements to release these resources.
- *
- * Image bin:
- *  img->sinkpad ! [ post process !] tee name=t0 ! encoder ! metadata ! filesink
- *   t0. ! queue ! img->srcpad
- *
- * Returns: %TRUE if succeeded or FALSE if failed
- */
-static gboolean
-gst_camerabin_image_create_elements (GstCameraBinImage * img)
-{
-  GstPad *sinkpad = NULL, *img_sinkpad = NULL, *img_srcpad = NULL;
-  gboolean ret = FALSE;
-  GstBin *imgbin = NULL;
-
-  g_return_val_if_fail (img != NULL, FALSE);
-
-  GST_DEBUG ("creating image capture elements");
-
-  imgbin = GST_BIN (img);
-
-  if (img->elements_created) {
-    GST_WARNING ("elements already created");
-    ret = TRUE;
-    goto done;
-  } else {
-    img->elements_created = TRUE;
-  }
-
-  /* Create image pre/post-processing element if any */
-  if (img->post) {
-    if (!gst_camerabin_add_element (imgbin, img->post)) {
-      goto done;
-    }
-    img_sinkpad = gst_element_get_static_pad (img->post, "sink");
-  }
-
-  /* Create tee */
-  if (!(img->tee = gst_camerabin_create_and_add_element (imgbin, "tee"))) {
-    goto done;
-  }
-
-  /* Set up sink ghost pad for img bin */
-  if (!img_sinkpad) {
-    img_sinkpad = gst_element_get_static_pad (img->tee, "sink");
-  }
-  gst_ghost_pad_set_target (GST_GHOST_PAD (img->sinkpad), img_sinkpad);
-
-  /* Add colorspace converter */
-  img->pad_tee_enc = gst_element_get_request_pad (img->tee, "src%d");
-  if (!gst_camerabin_create_and_add_element (imgbin, "ffmpegcolorspace")) {
-    goto done;
-  }
-
-  /* Create image encoder */
-  if (img->user_enc) {
-    img->enc = img->user_enc;
-    if (!gst_camerabin_add_element (imgbin, img->enc)) {
-      goto done;
-    }
-  } else if (!(img->enc =
-          gst_camerabin_create_and_add_element (imgbin, DEFAULT_ENC))) {
-    goto done;
-  }
-
-  /* Create metadata element */
-  if (!(img->meta_mux =
-          gst_camerabin_create_and_add_element (imgbin, DEFAULT_META_MUX))) {
-    goto done;
-  }
-  /* Add probe for XMP metadata writing */
-  sinkpad = gst_element_get_static_pad (img->meta_mux, "sink");
-  gst_pad_add_buffer_probe (sinkpad, G_CALLBACK (metadata_write_probe), img);
-  gst_object_unref (sinkpad);
-  /* Set "Intel" exif byte-order if possible */
-  if (g_object_class_find_property (G_OBJECT_GET_CLASS (img->meta_mux),
-          "exif-byte-order")) {
-    g_object_set (G_OBJECT (img->meta_mux), "exif-byte-order", 1, NULL);
-  }
-
-  /* Create file sink element */
-  if (!(img->sink =
-          gst_camerabin_create_and_add_element (imgbin, DEFAULT_SINK))) {
-    goto done;
-  }
-
-  /* Create queue element leading to view finder, attaches it to the tee */
-  img->pad_tee_view = gst_element_get_request_pad (img->tee, "src%d");
-  if (!(img->queue = gst_camerabin_create_and_add_element (imgbin, "queue"))) {
-    goto done;
-  }
-
-  /* Set properties */
-  g_object_set (G_OBJECT (img->sink), "location", img->filename->str, NULL);
-  g_object_set (G_OBJECT (img->sink), "async", FALSE, NULL);
-
-  g_object_set (G_OBJECT (img->queue), "max-size-buffers", 1, "leaky", 2, NULL);
-
-  /* Set up src ghost pad for img bin */
-  img_srcpad = gst_element_get_static_pad (img->queue, "src");
-  gst_ghost_pad_set_target (GST_GHOST_PAD (img->srcpad), img_srcpad);
-
-  /* Never let image bin eos events reach view finder */
-  gst_pad_add_event_probe (img->srcpad,
-      G_CALLBACK (gst_camerabin_drop_eos_probe), img);
-
-  ret = TRUE;
-
-done:
-
-  if (img_srcpad) {
-    gst_object_unref (img_srcpad);
-  }
-  if (img_sinkpad) {
-    gst_object_unref (img_sinkpad);
-  }
-  if (!ret) {
-    gst_camerabin_image_destroy_elements (img);
-  }
-
-  return ret;
-}
-
-
-/**
- * gst_camerabin_image_destroy_elements:
- * @img: a pointer to #GstCameraBinImage object
- *
- * This function releases resources allocated in
- * gst_camerabin_image_create_elements.
- *
- */
-static void
-gst_camerabin_image_destroy_elements (GstCameraBinImage * img)
-{
-  GST_LOG ("destroying img elements");
-  if (img->pad_tee_enc) {
-    gst_element_release_request_pad (img->tee, img->pad_tee_enc);
-    img->pad_tee_enc = NULL;
-  }
-
-  if (img->pad_tee_view) {
-    gst_element_release_request_pad (img->tee, img->pad_tee_view);
-    img->pad_tee_view = NULL;
-  }
-
-  gst_ghost_pad_set_target (GST_GHOST_PAD (img->sinkpad), NULL);
-  gst_ghost_pad_set_target (GST_GHOST_PAD (img->srcpad), NULL);
-
-  gst_camerabin_remove_elements_from_bin (GST_BIN (img));
-
-  img->post = NULL;
-  img->tee = NULL;
-  img->enc = NULL;
-  img->meta_mux = NULL;
-  img->sink = NULL;
-  img->queue = NULL;
-
-  img->elements_created = FALSE;
-}
-
-void
-gst_camerabin_image_set_encoder (GstCameraBinImage * img, GstElement * encoder)
-{
-  if (img->user_enc)
-    gst_object_unref (img->user_enc);
-  if (encoder)
-    gst_object_ref (encoder);
-
-  img->user_enc = encoder;
-}
-
-void
-gst_camerabin_image_set_postproc (GstCameraBinImage * img,
-    GstElement * postproc)
-{
-  if (img->post)
-    gst_object_unref (img->post);
-  if (postproc)
-    gst_object_ref (postproc);
-
-  img->post = postproc;
-}
-
-GstElement *
-gst_camerabin_image_get_encoder (GstCameraBinImage * img)
-{
-  GstElement *enc;
-
-  if (img->user_enc) {
-    enc = img->user_enc;
-  } else {
-    enc = img->enc;
-  }
-
-  return enc;
-}
-
-GstElement *
-gst_camerabin_image_get_postproc (GstCameraBinImage * img)
-{
-  return img->post;
-}
--- a/gst_plugins_good/gst/camerabin/camerabinimage.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __CAMERABIN_IMAGE_H__
-#define __CAMERABIN_IMAGE_H__
-
-#include <gst/gstbin.h>
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_CAMERABIN_IMAGE             (gst_camerabin_image_get_type())
-#define GST_CAMERABIN_IMAGE_CAST(obj)        ((GstCameraBinImage*)(obj))
-#define GST_CAMERABIN_IMAGE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CAMERABIN_IMAGE,GstCameraBinImage))
-#define GST_CAMERABIN_IMAGE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CAMERABIN_IMAGE,GstCameraBinImageClass))
-#define GST_IS_CAMERABIN_IMAGE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CAMERABIN_IMAGE))
-#define GST_IS_CAMERABIN_IMAGE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CAMERABIN_IMAGE))
-
-/**
- * GstCameraBinImage:
- *
- * The opaque #GstCameraBinImage structure.
- */
-
-typedef struct _GstCameraBinImage GstCameraBinImage;
-typedef struct _GstCameraBinImageClass GstCameraBinImageClass;
-
-struct _GstCameraBinImage
-{
-  GstBin parent;
-  GString *filename;
-
-  /* Ghost pads of image bin */
-  GstPad *sinkpad;
-  GstPad *srcpad;
-
-  /* Tee src pad leading to image encoder */
-  GstPad *pad_tee_enc;
-  /* Tee src pad leading to view finder */
-  GstPad *pad_tee_view;
-
-  GstElement *post;
-
-  GstElement *tee;
-  GstElement *enc;
-  GstElement *user_enc;
-  GstElement *meta_mux;
-  GstElement *sink;
-  GstElement *queue;
-
-  gboolean elements_created;
-};
-
-struct _GstCameraBinImageClass
-{
-  GstBinClass parent_class;
-};
-
-#ifdef __SYMBIAN32__
-IMPORT_C
-#endif
-GType gst_camerabin_image_get_type (void);
-
-void
-gst_camerabin_image_set_encoder (GstCameraBinImage * img, GstElement * encoder);
-
-void
-gst_camerabin_image_set_postproc (GstCameraBinImage * img,
-    GstElement * postproc);
-
-GstElement *gst_camerabin_image_get_encoder (GstCameraBinImage * img);
-
-GstElement *gst_camerabin_image_get_postproc (GstCameraBinImage * img);
-
-G_END_DECLS
-
-#endif /* #ifndef __CAMERABIN_IMAGE_H__ */
--- a/gst_plugins_good/gst/camerabin/camerabinvideo.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,829 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:camerabinvideo
- * @short_description: video recording module of #GstCameraBin
- *
- * <refsect2>
- * <para>
- *
- * The pipeline for this module is:
- *
- * <informalexample>
- * <programlisting>
- *-----------------------------------------------------------------------------
- * audiosrc -> audio_queue -> audioconvert -> volume -> audioenc
- *                                                       > videomux -> filesink
- *                       video_queue -> [timeoverlay] -> videoenc
- * -> [post proc] -> tee <
- *                       queue ->
- *-----------------------------------------------------------------------------
- * </programlisting>
- * </informalexample>
- *
- * The properties of elements are:
- *
- * queue - "leaky", 2 (Leaky on downstream (old buffers))
- *
- * </para>
- * </refsect2>
- */
-
-/*
- * includes
- */
-
-
-#include <gst/gst.h>
-#include "camerabingeneral.h"
-
-#include "camerabinvideo.h"
-
-#ifdef __SYMBIAN32__
-#include <glib_global.h>
-#endif
-/*
- * defines and static global vars
- */
-
-/* internal element names */
-
-#define DEFAULT_AUD_SRC "pulsesrc"
-#define DEFAULT_AUD_ENC "vorbisenc"
-#define DEFAULT_VID_ENC "theoraenc"
-#define DEFAULT_MUX "oggmux"
-#define DEFAULT_SINK "filesink"
-
-#define USE_AUDIO_CONVERSION 1
-
-enum
-{
-  PROP_0,
-  PROP_FILENAME
-};
-
-static void gst_camerabin_video_dispose (GstCameraBinVideo * sink);
-static void gst_camerabin_video_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec);
-static void gst_camerabin_video_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec);
-
-static GstClock *gst_camerabin_video_provide_clock (GstElement * elem);
-static GstStateChangeReturn
-gst_camerabin_video_change_state (GstElement * element,
-    GstStateChange transition);
-
-static
-    gboolean camerabin_video_pad_tee_src0_have_buffer (GstPad * pad,
-    GstBuffer * buffer, gpointer u_data);
-static gboolean camerabin_video_pad_aud_src_have_buffer (GstPad * pad,
-    GstBuffer * buffer, gpointer u_data);
-static gboolean camerabin_video_sink_have_event (GstPad * pad, GstEvent * event,
-    gpointer u_data);
-static gboolean gst_camerabin_video_create_elements (GstCameraBinVideo * vid);
-static void gst_camerabin_video_destroy_elements (GstCameraBinVideo * vid);
-
-GST_BOILERPLATE (GstCameraBinVideo, gst_camerabin_video, GstBin, GST_TYPE_BIN);
-
-static const GstElementDetails gst_camerabin_video_details =
-GST_ELEMENT_DETAILS ("Video capture bin for camerabin",
-    "Bin/Video",
-    "Process and store video data",
-    "Edgard Lima <edgard.lima@indt.org.br>\n"
-    "Nokia Corporation <multimedia@maemo.org>");
-
-static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS_ANY);
-
-static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS_ANY);
-
-
-/* GObject methods implementation */
-
-static void
-gst_camerabin_video_base_init (gpointer klass)
-{
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_add_pad_template (eklass,
-      gst_static_pad_template_get (&sink_template));
-  gst_element_class_add_pad_template (eklass,
-      gst_static_pad_template_get (&src_template));
-  gst_element_class_set_details (eklass, &gst_camerabin_video_details);
-}
-
-static void
-gst_camerabin_video_class_init (GstCameraBinVideoClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
-
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->dispose =
-      (GObjectFinalizeFunc) GST_DEBUG_FUNCPTR (gst_camerabin_video_dispose);
-  eklass->change_state = GST_DEBUG_FUNCPTR (gst_camerabin_video_change_state);
-
-  eklass->provide_clock = GST_DEBUG_FUNCPTR (gst_camerabin_video_provide_clock);
-
-  gobject_class->set_property =
-      GST_DEBUG_FUNCPTR (gst_camerabin_video_set_property);
-  gobject_class->get_property =
-      GST_DEBUG_FUNCPTR (gst_camerabin_video_get_property);
-
-  /**
-   * GstCameraBinVideo:filename:
-   *
-   * This property can be used to specify the filename of the video.
-   *
-   **/
-  g_object_class_install_property (gobject_class, PROP_FILENAME,
-      g_param_spec_string ("filename", "Filename",
-          "Filename of the video to save", NULL, G_PARAM_READWRITE));
-}
-
-static void
-gst_camerabin_video_init (GstCameraBinVideo * vid,
-    GstCameraBinVideoClass * g_class)
-{
-  vid->filename = g_string_new ("");
-
-  vid->user_post = NULL;
-  vid->user_vid_enc = NULL;
-  vid->user_aud_enc = NULL;
-  vid->user_aud_src = NULL;
-  vid->user_mux = NULL;
-
-  vid->aud_src = NULL;
-  vid->sink = NULL;
-  vid->tee = NULL;
-  vid->volume = NULL;
-  vid->video_queue = NULL;
-
-  vid->tee_video_srcpad = NULL;
-  vid->tee_vf_srcpad = NULL;
-
-  vid->pending_eos = NULL;
-
-  /* Create src and sink ghost pads */
-  vid->sinkpad = gst_ghost_pad_new_no_target ("sink", GST_PAD_SINK);
-  gst_element_add_pad (GST_ELEMENT (vid), vid->sinkpad);
-
-  vid->srcpad = gst_ghost_pad_new_no_target ("src", GST_PAD_SRC);
-  gst_element_add_pad (GST_ELEMENT (vid), vid->srcpad);
-
-  /* Add probe for handling eos when stopping recording */
-  gst_pad_add_event_probe (vid->sinkpad,
-      G_CALLBACK (camerabin_video_sink_have_event), vid);
-}
-
-static void
-gst_camerabin_video_dispose (GstCameraBinVideo * vid)
-{
-  GST_DEBUG_OBJECT (vid, "disposing");
-
-  g_string_free (vid->filename, TRUE);
-  vid->filename = NULL;
-
-  if (vid->user_post) {
-    gst_object_unref (vid->user_post);
-    vid->user_post = NULL;
-  }
-
-  if (vid->user_vid_enc) {
-    gst_object_unref (vid->user_vid_enc);
-    vid->user_vid_enc = NULL;
-  }
-
-  if (vid->user_aud_enc) {
-    gst_object_unref (vid->user_aud_enc);
-    vid->user_aud_enc = NULL;
-  }
-
-  if (vid->user_aud_src) {
-    gst_object_unref (vid->user_aud_src);
-    vid->user_aud_src = NULL;
-  }
-
-  if (vid->user_mux) {
-    gst_object_unref (vid->user_mux);
-    vid->user_mux = NULL;
-  }
-
-  G_OBJECT_CLASS (parent_class)->dispose ((GObject *) vid);
-}
-
-
-static void
-gst_camerabin_video_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstCameraBinVideo *bin = GST_CAMERABIN_VIDEO (object);
-
-  switch (prop_id) {
-    case PROP_FILENAME:
-      g_string_assign (bin->filename, g_value_get_string (value));
-      if (bin->sink) {
-        g_object_set (G_OBJECT (bin->sink), "location", bin->filename->str,
-            NULL);
-      } else {
-        GST_INFO ("no sink, not setting name yet");
-      }
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_camerabin_video_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstCameraBinVideo *bin = GST_CAMERABIN_VIDEO (object);
-
-  switch (prop_id) {
-    case PROP_FILENAME:
-      g_value_set_string (value, bin->filename->str);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-/* GstElement methods implementation */
-
-static GstClock *
-gst_camerabin_video_provide_clock (GstElement * elem)
-{
-  GstElement *aud_src = GST_CAMERABIN_VIDEO (elem)->aud_src;
-  if (aud_src) {
-    return gst_element_provide_clock (aud_src);
-  } else {
-    return NULL;
-  }
-}
-
-static GstStateChangeReturn
-gst_camerabin_video_change_state (GstElement * element,
-    GstStateChange transition)
-{
-  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-  GstCameraBinVideo *vid = GST_CAMERABIN_VIDEO (element);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!gst_camerabin_video_create_elements (vid)) {
-        return GST_STATE_CHANGE_FAILURE;
-      }
-      /* Don't change sink to READY yet to allow changing the
-         filename in READY state. */
-      gst_element_set_locked_state (vid->sink, TRUE);
-      break;
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      vid->calculate_adjust_ts_video = TRUE;
-      vid->calculate_adjust_ts_aud = TRUE;
-      g_object_set (G_OBJECT (vid->sink), "async", FALSE, NULL);
-      gst_element_set_locked_state (vid->sink, FALSE);
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      vid->calculate_adjust_ts_video = TRUE;
-      vid->calculate_adjust_ts_aud = TRUE;
-      break;
-
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      /* Set sink to NULL in order to write the file _now_ */
-      GST_INFO ("write vid file: %s", vid->filename->str);
-      gst_element_set_locked_state (vid->sink, TRUE);
-      gst_element_set_state (vid->sink, GST_STATE_NULL);
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      if (vid->pending_eos) {
-        /* Video bin is still paused, so push eos directly to video queue */
-        GST_DEBUG_OBJECT (vid, "pushing pending eos");
-        gst_pad_push_event (vid->tee_video_srcpad, vid->pending_eos);
-        vid->pending_eos = NULL;
-      }
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      /* Reset counters related to timestamp rewriting */
-      vid->adjust_ts_video = 0;
-      vid->last_ts_video = 0;
-      vid->adjust_ts_aud = 0;
-      vid->last_ts_aud = 0;
-
-      if (vid->pending_eos) {
-        gst_event_unref (vid->pending_eos);
-        vid->pending_eos = NULL;
-      }
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_camerabin_video_destroy_elements (vid);
-      break;
-    default:
-      break;
-  }
-
-  return ret;
-}
-
-/*
- * static helper functions implementation
- */
-
-/**
- * camerabin_video_pad_tee_src0_have_buffer:
- * @pad: tee src pad leading to video encoding
- * @event: received buffer
- * @u_data: video bin object
- *
- * Buffer probe for rewriting video buffer timestamps.
- *
- * Returns: TRUE always
- */
-static gboolean
-camerabin_video_pad_tee_src0_have_buffer (GstPad * pad, GstBuffer * buffer,
-    gpointer u_data)
-{
-  GstCameraBinVideo *vid = (GstCameraBinVideo *) u_data;
-
-  GST_LOG ("buffer in with size %d ts %" GST_TIME_FORMAT,
-      GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
-
-  if (G_UNLIKELY (vid->calculate_adjust_ts_video)) {
-    GstEvent *event;
-    GstObject *tee;
-    GstPad *sinkpad;
-    vid->adjust_ts_video = GST_BUFFER_TIMESTAMP (buffer) - vid->last_ts_video;
-    vid->calculate_adjust_ts_video = FALSE;
-    event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME,
-        0, GST_CLOCK_TIME_NONE, vid->last_ts_video);
-    /* Send the newsegment to both view finder and video bin */
-    tee = gst_pad_get_parent (pad);
-    sinkpad = gst_element_get_static_pad (GST_ELEMENT (tee), "sink");
-    gst_pad_send_event (sinkpad, event);
-    gst_object_unref (tee);
-    gst_object_unref (sinkpad);
-    GST_LOG_OBJECT (vid, "vid ts adjustment: %" GST_TIME_FORMAT,
-        GST_TIME_ARGS (vid->adjust_ts_video));
-    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
-  }
-  GST_BUFFER_TIMESTAMP (buffer) -= vid->adjust_ts_video;
-  vid->last_ts_video = GST_BUFFER_TIMESTAMP (buffer);
-  if (GST_BUFFER_DURATION_IS_VALID (buffer))
-    vid->last_ts_video += GST_BUFFER_DURATION (buffer);
-
-
-  GST_LOG ("buffer out with size %d ts %" GST_TIME_FORMAT,
-      GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
-  return TRUE;
-}
-
-/**
- * camerabin_video_pad_aud_src_have_buffer:
- * @pad: audio source src pad
- * @event: received buffer
- * @u_data: video bin object
- *
- * Buffer probe for rewriting audio buffer timestamps.
- *
- * Returns: TRUE always
- */
-static gboolean
-camerabin_video_pad_aud_src_have_buffer (GstPad * pad, GstBuffer * buffer,
-    gpointer u_data)
-{
-  GstCameraBinVideo *vid = (GstCameraBinVideo *) u_data;
-
-  if (vid->calculate_adjust_ts_aud) {
-    GstEvent *event;
-    GstPad *peerpad = NULL;
-    vid->adjust_ts_aud = GST_BUFFER_TIMESTAMP (buffer) - vid->last_ts_aud;
-    vid->calculate_adjust_ts_aud = FALSE;
-    event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME,
-        0, GST_CLOCK_TIME_NONE, vid->last_ts_aud);
-    peerpad = gst_pad_get_peer (pad);
-    if (peerpad) {
-      gst_pad_send_event (peerpad, event);
-      gst_object_unref (peerpad);
-    }
-    GST_LOG_OBJECT (vid, "aud ts adjustment: %" GST_TIME_FORMAT,
-        GST_TIME_ARGS (vid->adjust_ts_aud));
-    GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
-  }
-  GST_BUFFER_TIMESTAMP (buffer) -= vid->adjust_ts_aud;
-  vid->last_ts_aud = GST_BUFFER_TIMESTAMP (buffer);
-  if (GST_BUFFER_DURATION_IS_VALID (buffer))
-    vid->last_ts_aud += GST_BUFFER_DURATION (buffer);
-  GST_LOG ("buffer out with size %d ts %" GST_TIME_FORMAT,
-      GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
-  return TRUE;
-}
-
-/**
- * camerabin_video_sink_have_event:
- * @pad: video bin sink pad
- * @event: received event
- * @u_data: video bin object
- *
- * Event probe for video bin eos handling.
- * Copies the eos event to audio branch of video bin.
- *
- * Returns: FALSE to drop the event, TRUE otherwise
- */
-static gboolean
-camerabin_video_sink_have_event (GstPad * pad, GstEvent * event,
-    gpointer u_data)
-{
-  GstCameraBinVideo *vid = (GstCameraBinVideo *) u_data;
-  gboolean ret = TRUE;
-
-  GST_DEBUG_OBJECT (vid, "got videobin sink event: %s",
-      GST_EVENT_TYPE_NAME (event));
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_EOS:
-      if (vid->aud_src) {
-        GST_DEBUG_OBJECT (vid, "copying %s to audio branch",
-            GST_EVENT_TYPE_NAME (event));
-        gst_element_send_event (vid->aud_src, gst_event_copy (event));
-      }
-
-      /* If we're paused, we can't pass eos to video now to avoid blocking.
-         Instead send eos when changing to playing next time. */
-      if (GST_STATE (GST_ELEMENT (vid)) == GST_STATE_PAUSED) {
-        GST_DEBUG_OBJECT (vid, "paused, delay eos sending");
-        vid->pending_eos = gst_event_ref (event);
-        ret = FALSE;            /* Drop the event */
-      }
-      break;
-    default:
-      break;
-  }
-  return ret;
-}
-
-/**
- * gst_camerabin_video_create_elements:
- * @vid: a pointer to #GstCameraBinVideo
- *
- * This function creates the needed #GstElements and resources to record videos.
- * Use gst_camerabin_video_destroy_elements() to free these resources.
- *
- * Returns: %TRUE if succeeded or FALSE if failed
- */
-static gboolean
-gst_camerabin_video_create_elements (GstCameraBinVideo * vid)
-{
-  GstPad *pad = NULL, *vid_sinkpad = NULL, *vid_srcpad = NULL;
-  GstBin *vidbin = GST_BIN (vid);
-  GstElement *queue = NULL;
-
-  vid->adjust_ts_video = 0;
-  vid->last_ts_video = 0;
-  vid->calculate_adjust_ts_video = FALSE;
-
-  vid->adjust_ts_aud = 0;
-  vid->last_ts_aud = 0;
-  vid->calculate_adjust_ts_aud = FALSE;
-
-  /* Add video post processing element if any */
-  if (vid->user_post) {
-    if (!gst_camerabin_add_element (vidbin, vid->user_post)) {
-      goto error;
-    }
-    vid_sinkpad = gst_element_get_static_pad (vid->user_post, "sink");
-  }
-
-  /* Add tee element */
-  if (!(vid->tee = gst_camerabin_create_and_add_element (vidbin, "tee"))) {
-    goto error;
-  }
-
-  /* Set up sink ghost pad for video bin */
-  if (!vid_sinkpad) {
-    vid_sinkpad = gst_element_get_static_pad (vid->tee, "sink");
-  }
-  gst_ghost_pad_set_target (GST_GHOST_PAD (vid->sinkpad), vid_sinkpad);
-
-
-  /* Add queue element for video */
-  vid->tee_video_srcpad = gst_element_get_request_pad (vid->tee, "src%d");
-  if (!(vid->video_queue =
-          gst_camerabin_create_and_add_element (vidbin, "queue"))) {
-    goto error;
-  }
-
-  /* Add probe for rewriting video timestamps */
-  gst_pad_add_buffer_probe (vid->tee_video_srcpad,
-      G_CALLBACK (camerabin_video_pad_tee_src0_have_buffer), vid);
-
-
-#ifdef USE_TIMEOVERLAY
-  /* Add timeoverlay element to visualize elapsed time for debugging */
-  if (!(gst_camerabin_create_and_add_element (vidbin, "timeoverlay"))) {
-    goto error;
-  }
-#endif
-
-  /* Add user set or default video encoder element */
-  if (vid->user_vid_enc) {
-    vid->vid_enc = vid->user_vid_enc;
-    if (!gst_camerabin_add_element (vidbin, vid->vid_enc)) {
-      goto error;
-    }
-  } else if (!(vid->vid_enc =
-          gst_camerabin_create_and_add_element (vidbin, DEFAULT_VID_ENC))) {
-    goto error;
-  }
-
-  /* Add user set or default muxer element */
-  if (vid->user_mux) {
-    vid->muxer = vid->user_mux;
-    if (!gst_camerabin_add_element (vidbin, vid->muxer)) {
-      goto error;
-    }
-  } else if (!(vid->muxer =
-          gst_camerabin_create_and_add_element (vidbin, DEFAULT_MUX))) {
-    goto error;
-  }
-
-  /* Add sink element for storing the video */
-  if (!(vid->sink =
-          gst_camerabin_create_and_add_element (vidbin, DEFAULT_SINK))) {
-    goto error;
-  }
-  g_object_set (G_OBJECT (vid->sink), "location", vid->filename->str, NULL);
-
-
-  /* Add user set or default audio source element */
-  if (vid->user_aud_src) {
-    vid->aud_src = vid->user_aud_src;
-    if (!gst_camerabin_add_element (vidbin, vid->aud_src)) {
-      goto error;
-    }
-  } else if (!(vid->aud_src =
-          gst_camerabin_create_and_add_element (vidbin, DEFAULT_AUD_SRC))) {
-    goto error;
-  }
-
-  /* Add queue element for audio */
-  if (!(queue = gst_camerabin_create_and_add_element (vidbin, "queue"))) {
-    goto error;
-  }
-  queue = NULL;
-
-  /* Add optional audio conversion and volume elements and
-     raise no errors if adding them fails */
-#ifdef USE_AUDIO_CONVERSION
-  if (!gst_camerabin_try_add_element (vidbin,
-          gst_element_factory_make ("audioconvert", NULL))) {
-    GST_WARNING_OBJECT (vid, "unable to add audio conversion element");
-    /* gst_camerabin_try_add_element() destroyed the element */
-  }
-#endif
-  vid->volume = gst_element_factory_make ("volume", NULL);
-  if (!gst_camerabin_try_add_element (vidbin, vid->volume)) {
-    GST_WARNING_OBJECT (vid, "unable to add volume element");
-    /* gst_camerabin_try_add_element() destroyed the element */
-    vid->volume = NULL;
-  }
-
-  /* Add user set or default audio encoder element */
-  if (vid->user_aud_enc) {
-    vid->aud_enc = vid->user_aud_enc;
-    if (!gst_camerabin_add_element (vidbin, vid->aud_enc)) {
-      goto error;
-    }
-  } else if (!(vid->aud_enc =
-          gst_camerabin_create_and_add_element (vidbin, DEFAULT_AUD_ENC))) {
-    goto error;
-  }
-
-  /* Link audio part to the muxer */
-  if (!gst_element_link (vid->aud_enc, vid->muxer)) {
-    GST_ELEMENT_ERROR (vid, CORE, NEGOTIATION, (NULL),
-        ("linking audio encoder and muxer failed"));
-    goto error;
-  }
-
-  /* Add queue leading out of the video bin and to view finder */
-  vid->tee_vf_srcpad = gst_element_get_request_pad (vid->tee, "src%d");
-  if (!(queue = gst_camerabin_create_and_add_element (vidbin, "queue"))) {
-    goto error;
-  }
-  /* Set queue leaky, we don't want to block video encoder feed, but
-     prefer leaking view finder buffers instead. */
-  g_object_set (G_OBJECT (queue), "leaky", 2, NULL);
-
-  /* Set up src ghost pad for video bin */
-  vid_srcpad = gst_element_get_static_pad (queue, "src");
-  gst_ghost_pad_set_target (GST_GHOST_PAD (vid->srcpad), vid_srcpad);
-  /* Never let video bin eos events reach view finder */
-  gst_pad_add_event_probe (vid_srcpad,
-      G_CALLBACK (gst_camerabin_drop_eos_probe), vid);
-
-  pad = gst_element_get_static_pad (vid->aud_src, "src");
-  gst_pad_add_buffer_probe (pad,
-      G_CALLBACK (camerabin_video_pad_aud_src_have_buffer), vid);
-  gst_object_unref (pad);
-
-  GST_DEBUG ("created video elements");
-
-  return TRUE;
-
-error:
-
-  gst_camerabin_video_destroy_elements (vid);
-
-  return FALSE;
-
-}
-
-/**
- * gst_camerabin_video_destroy_elements:
- * @vid: a pointer to #GstCameraBinVideo
- *
- * This function destroys all the elements created by
- * gst_camerabin_video_create_elements().
- *
- */
-static void
-gst_camerabin_video_destroy_elements (GstCameraBinVideo * vid)
-{
-  GST_DEBUG ("destroying video elements");
-
-  /* Release tee request pads */
-  if (vid->tee_video_srcpad) {
-    gst_element_release_request_pad (vid->tee, vid->tee_video_srcpad);
-    vid->tee_video_srcpad = NULL;
-  }
-  if (vid->tee_vf_srcpad) {
-    gst_element_release_request_pad (vid->tee, vid->tee_vf_srcpad);
-    vid->tee_vf_srcpad = NULL;
-  }
-
-  gst_ghost_pad_set_target (GST_GHOST_PAD (vid->sinkpad), NULL);
-  gst_ghost_pad_set_target (GST_GHOST_PAD (vid->srcpad), NULL);
-
-  gst_camerabin_remove_elements_from_bin (GST_BIN (vid));
-
-  vid->aud_src = NULL;
-  vid->sink = NULL;
-  vid->tee = NULL;
-  vid->volume = NULL;
-  vid->video_queue = NULL;
-  vid->vid_enc = NULL;
-  vid->aud_enc = NULL;
-  vid->muxer = NULL;
-
-  if (vid->pending_eos) {
-    gst_event_unref (vid->pending_eos);
-    vid->pending_eos = NULL;
-  }
-
-  return;
-}
-
-/*
- * Set & get mute and video capture elements
- */
-
-void
-gst_camerabin_video_set_mute (GstCameraBinVideo * vid, gboolean mute)
-{
-  if (vid && vid->volume) {
-    GST_DEBUG_OBJECT (vid, "setting mute %s", mute ? "on" : "off");
-    g_object_set (vid->volume, "mute", mute, NULL);
-  }
-}
-
-void
-gst_camerabin_video_set_post (GstCameraBinVideo * vid, GstElement * post)
-{
-  GstElement **user_post;
-  GST_DEBUG_OBJECT (vid, "setting video post processing: %" GST_PTR_FORMAT,
-      post);
-  GST_OBJECT_LOCK (vid);
-  user_post = &vid->user_post;
-  gst_object_replace ((GstObject **) user_post, GST_OBJECT (post));
-  GST_OBJECT_UNLOCK (vid);
-}
-
-void
-gst_camerabin_video_set_video_enc (GstCameraBinVideo * vid,
-    GstElement * video_enc)
-{
-  GstElement **user_vid_enc;
-  GST_DEBUG_OBJECT (vid, "setting video encoder: %" GST_PTR_FORMAT, video_enc);
-  GST_OBJECT_LOCK (vid);
-  user_vid_enc = &vid->user_vid_enc;
-  gst_object_replace ((GstObject **) user_vid_enc, GST_OBJECT (video_enc));
-  GST_OBJECT_UNLOCK (vid);
-}
-
-void
-gst_camerabin_video_set_audio_enc (GstCameraBinVideo * vid,
-    GstElement * audio_enc)
-{
-  GstElement **user_aud_enc;
-  GST_DEBUG_OBJECT (vid, "setting audio encoder: %" GST_PTR_FORMAT, audio_enc);
-  GST_OBJECT_LOCK (vid);
-  user_aud_enc = &vid->user_aud_enc;
-  gst_object_replace ((GstObject **) user_aud_enc, GST_OBJECT (audio_enc));
-  GST_OBJECT_UNLOCK (vid);
-}
-
-void
-gst_camerabin_video_set_muxer (GstCameraBinVideo * vid, GstElement * muxer)
-{
-  GstElement **user_mux;
-  GST_DEBUG_OBJECT (vid, "setting muxer: %" GST_PTR_FORMAT, muxer);
-  GST_OBJECT_LOCK (vid);
-  user_mux = &vid->user_mux;
-  gst_object_replace ((GstObject **) user_mux, GST_OBJECT (muxer));
-  GST_OBJECT_UNLOCK (vid);
-}
-
-void
-gst_camerabin_video_set_audio_src (GstCameraBinVideo * vid,
-    GstElement * audio_src)
-{
-  GstElement **user_aud_src;
-  GST_DEBUG_OBJECT (vid, "setting audio source: %" GST_PTR_FORMAT, audio_src);
-  GST_OBJECT_LOCK (vid);
-  user_aud_src = &vid->user_aud_src;
-  gst_object_replace ((GstObject **) user_aud_src, GST_OBJECT (audio_src));
-  GST_OBJECT_UNLOCK (vid);
-}
-
-gboolean
-gst_camerabin_video_get_mute (GstCameraBinVideo * vid)
-{
-  gboolean mute = ARG_DEFAULT_MUTE;
-
-  if (vid && vid->volume) {
-    g_object_get (vid->volume, "mute", &mute, NULL);
-  }
-  return mute;
-}
-
-GstElement *
-gst_camerabin_video_get_post (GstCameraBinVideo * vid)
-{
-  return vid->user_post;
-}
-
-GstElement *
-gst_camerabin_video_get_video_enc (GstCameraBinVideo * vid)
-{
-  return vid->vid_enc ? vid->vid_enc : vid->user_vid_enc;
-}
-
-GstElement *
-gst_camerabin_video_get_audio_enc (GstCameraBinVideo * vid)
-{
-  return vid->aud_enc ? vid->aud_enc : vid->user_aud_enc;
-}
-
-GstElement *
-gst_camerabin_video_get_muxer (GstCameraBinVideo * vid)
-{
-  return vid->muxer ? vid->muxer : vid->user_mux;
-}
-
-GstElement *
-gst_camerabin_video_get_audio_src (GstCameraBinVideo * vid)
-{
-  return vid->aud_src ? vid->aud_src : vid->user_aud_src;
-}
--- a/gst_plugins_good/gst/camerabin/camerabinvideo.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __CAMERABIN_VIDEO_H__
-#define __CAMERABIN_VIDEO_H__
-
-#include <gst/gstbin.h>
-
-G_BEGIN_DECLS
-
-//#define USE_TIMEOVERLAY 1
-
-#define ARG_DEFAULT_MUTE FALSE
-
-#define GST_TYPE_CAMERABIN_VIDEO             (gst_camerabin_video_get_type())
-#define GST_CAMERABIN_VIDEO_CAST(obj)        ((GstCameraBinVideo*)(obj))
-#define GST_CAMERABIN_VIDEO(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CAMERABIN_VIDEO,GstCameraBinVideo))
-#define GST_CAMERABIN_VIDEO_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CAMERABIN_VIDEO,GstCameraBinVideoClass))
-#define GST_IS_CAMERABIN_VIDEO(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CAMERABIN_VIDEO))
-#define GST_IS_CAMERABIN_VIDEO_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CAMERABIN_VIDEO))
-
-/**
- * GstCameraBinVideo:
- *
- * The opaque #GstCameraBinVideo structure.
- */
-
-typedef struct _GstCameraBinVideo GstCameraBinVideo;
-typedef struct _GstCameraBinVideoClass GstCameraBinVideoClass;
-
-struct _GstCameraBinVideo
-{
-  GstBin parent;
-
-  GString *filename;
-
-  /* A/V timestamp rewriting */
-  guint64 adjust_ts_video;
-  guint64 last_ts_video;
-  gboolean calculate_adjust_ts_video;
-
-  guint64 adjust_ts_aud;
-  guint64 last_ts_aud;
-  gboolean calculate_adjust_ts_aud;
-
-  /* Sink and src pads of video bin */
-  GstPad *sinkpad;
-  GstPad *srcpad;
-
-  /* Tee src pads leading to video encoder and view finder */
-  GstPad *tee_video_srcpad;
-  GstPad *tee_vf_srcpad;
-
-  /* User set elements */
-  GstElement *user_post;        /* Video post processing */
-  GstElement *user_vid_enc;
-  GstElement *user_aud_enc;
-  GstElement *user_aud_src;
-  GstElement *user_mux;
-
-  /* Other elements */
-  GstElement *aud_src;          /* Audio source */
-  GstElement *sink;             /* Sink for recorded video */
-  GstElement *tee;              /* Split output to view finder and recording sink */
-  GstElement *volume;           /* Volume for muting */
-  GstElement *video_queue;      /* Buffer for raw video frames */
-  GstElement *vid_enc;          /* Video encoder */
-  GstElement *aud_enc;          /* Audio encoder */
-  GstElement *muxer;            /* Muxer */
-
-  GstEvent *pending_eos;
-};
-
-struct _GstCameraBinVideoClass
-{
-  GstBinClass parent_class;
-};
-
-#ifdef __SYMBIAN32__
-IMPORT_C
-#endif
-GType gst_camerabin_video_get_type (void);
-
-/*
- * external function prototypes
- */
-
-void gst_camerabin_video_set_mute (GstCameraBinVideo * vid, gboolean mute);
-
-void gst_camerabin_video_set_post (GstCameraBinVideo * vid, GstElement * post);
-
-void
-gst_camerabin_video_set_video_enc (GstCameraBinVideo * vid,
-    GstElement * video_enc);
-
-void
-gst_camerabin_video_set_audio_enc (GstCameraBinVideo * vid,
-    GstElement * audio_enc);
-
-void
-gst_camerabin_video_set_muxer (GstCameraBinVideo * vid, GstElement * muxer);
-
-void
-gst_camerabin_video_set_audio_src (GstCameraBinVideo * vid,
-    GstElement * audio_src);
-
-
-gboolean gst_camerabin_video_get_mute (GstCameraBinVideo * vid);
-
-GstElement *gst_camerabin_video_get_post (GstCameraBinVideo * vid);
-
-GstElement *gst_camerabin_video_get_video_enc (GstCameraBinVideo * vid);
-
-GstElement *gst_camerabin_video_get_audio_enc (GstCameraBinVideo * vid);
-
-GstElement *gst_camerabin_video_get_muxer (GstCameraBinVideo * vid);
-
-GstElement *gst_camerabin_video_get_audio_src (GstCameraBinVideo * vid);
-
-G_END_DECLS
-
-#endif /* #ifndef __CAMERABIN_VIDEO_H__ */
--- a/gst_plugins_good/gst/camerabin/gstcamerabin-marshal.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-
-#include	<glib-object.h>
-
-
-#ifdef G_ENABLE_DEBUG
-#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v)     g_value_get_char (v)
-#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
-#define g_marshal_value_peek_int(v)      g_value_get_int (v)
-#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
-#define g_marshal_value_peek_long(v)     g_value_get_long (v)
-#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
-#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
-#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
-#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
-#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
-#define g_marshal_value_peek_float(v)    g_value_get_float (v)
-#define g_marshal_value_peek_double(v)   g_value_get_double (v)
-#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
-#define g_marshal_value_peek_param(v)    g_value_get_param (v)
-#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
-#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
-#define g_marshal_value_peek_object(v)   g_value_get_object (v)
-#else /* !G_ENABLE_DEBUG */
-/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
- *          Do not access GValues directly in your code. Instead, use the
- *          g_value_get_*() functions
- */
-#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
-#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
-#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
-#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
-#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
-#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
-#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
-#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
-#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
-#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
-#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
-#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
-#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
-#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
-#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
-#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
-#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
-#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
-#endif /* !G_ENABLE_DEBUG */
-
-
-/* VOID:INT,INT,INT,INT (gstcamerabin-marshal.list:4) */
-void
-gst_camerabin_marshal_VOID__INT_INT_INT_INT (GClosure     *closure,
-                                     GValue       *return_value,
-                                     guint         n_param_values,
-                                     const GValue *param_values,
-                                     gpointer      invocation_hint,
-                                     gpointer      marshal_data)
-{
-  typedef void (*GMarshalFunc_VOID__INT_INT_INT_INT) (gpointer     data1,
-                                                      gint         arg_1,
-                                                      gint         arg_2,
-                                                      gint         arg_3,
-                                                      gint         arg_4,
-                                                      gpointer     data2);
-  register GMarshalFunc_VOID__INT_INT_INT_INT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-
-  g_return_if_fail (n_param_values == 5);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_VOID__INT_INT_INT_INT) (marshal_data ? marshal_data : cc->callback);
-
-  callback (data1,
-            g_marshal_value_peek_int (param_values + 1),
-            g_marshal_value_peek_int (param_values + 2),
-            g_marshal_value_peek_int (param_values + 3),
-            g_marshal_value_peek_int (param_values + 4),
-            data2);
-}
-
-/* VOID:INT,INT (gstcamerabin-marshal.list:5) */
-void
-gst_camerabin_marshal_VOID__INT_INT (GClosure     *closure,
-                             GValue       *return_value,
-                             guint         n_param_values,
-                             const GValue *param_values,
-                             gpointer      invocation_hint,
-                             gpointer      marshal_data)
-{
-  typedef void (*GMarshalFunc_VOID__INT_INT) (gpointer     data1,
-                                              gint         arg_1,
-                                              gint         arg_2,
-                                              gpointer     data2);
-  register GMarshalFunc_VOID__INT_INT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-
-  g_return_if_fail (n_param_values == 3);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback);
-
-  callback (data1,
-            g_marshal_value_peek_int (param_values + 1),
-            g_marshal_value_peek_int (param_values + 2),
-            data2);
-}
-
--- a/gst_plugins_good/gst/camerabin/gstcamerabin-marshal.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-
-#ifndef __gst_camerabin_MARSHAL_H__
-#define __gst_camerabin_MARSHAL_H__
-
-#include	<glib-object.h>
-
-G_BEGIN_DECLS
-
-/* VOID:INT,INT,INT,INT (gstcamerabin-marshal.list:4) */
-extern void gst_camerabin_marshal_VOID__INT_INT_INT_INT (GClosure     *closure,
-                                                 GValue       *return_value,
-                                                 guint         n_param_values,
-                                                 const GValue *param_values,
-                                                 gpointer      invocation_hint,
-                                                 gpointer      marshal_data);
-
-/* VOID:INT,INT (gstcamerabin-marshal.list:5) */
-extern void gst_camerabin_marshal_VOID__INT_INT (GClosure     *closure,
-                                         GValue       *return_value,
-                                         guint         n_param_values,
-                                         const GValue *param_values,
-                                         gpointer      invocation_hint,
-                                         gpointer      marshal_data);
-
-G_END_DECLS
-
-#endif /* __gst_camerabin_MARSHAL_H__ */
-
--- a/gst_plugins_good/gst/camerabin/gstcamerabin.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2769 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:gstcamerabin
- * @short_description: camera capture bin
- *
- * <refsect2>
- * <para>
- * GstCameraBin is a high-level camera object that encapsulates the gstreamer
- * internals and provides a task based API for the application. It consists of
- * three main data paths: view-finder, image capture and video capture.
- * </para>
- * <informalfigure>
- *   <mediaobject>
- *     <imageobject><imagedata fileref="camerabin.png"/></imageobject>
- *     <textobject><phrase>CameraBin structure</phrase></textobject>
- *     <caption><para>Structural decomposition of CameraBin object.</para></caption>
- *   </mediaobject>
- * </informalfigure>
- * </refsect2>
- * <refsect2>
- * <title>Example launch line</title>
- * <para>
- * <programlisting>
- * gst-launch -v -m camerabin filename=test.jpeg
- * </programlisting>
- * </para>
- * </refsect2>
- * <refsect2>
- * <title>Image capture</title>
- * <para>
- * Taking still images is initiated with the #GstCameraBin::user-start action
- * signal. Once the image has captured, #GstCameraBin::img-done signal is fired.
- * It allows to decide wheter to take another picture (burst capture, bracketing
- * shot) or stop capturing. The last captured image is shown
- * until one switches back to view finder using #GstCameraBin::user-stop action
- * signal.
- * </para>
- * <para>
- * Available resolutions can be taken from the #GstCameraBin:inputcaps property.
- * Image capture resolution can be set with #GstCameraBin::user-image-res
- * action signal.
- * </para>
- * </refsect2>
- * <refsect2>
- * <title>Video capture</title>
- * <para>
- * Video capture is started with the #GstCameraBin::user-start action signal too.
- * In addition to image capture one can use #GstCameraBin::user-pause to
- * pause recording and #GstCameraBin::user-stop to end recording.
- * </para>
- * <para>
- * Available resolutions and fps can be taken from the #GstCameraBin:inputcaps
- * property. #GstCameraBin::user-res-fps action signal can be used to set frame
- * rate and resolution for the video recording and view finder as well.
- * </para>
- * </refsect2>
- * <refsect2>
- * <title>Photography interface</title>
- * <para>
- * GstCameraBin implements gst photography interface, which can be used to set
- * and get different settings related to digital imaging. Since currently many
- * of these settings require low-level support the photography interface support
- * is dependent on video src element. In practice photography interface settings
- * cannot be used successfully until in PAUSED state when the video src has
- * opened the video device.
- * </para>
- * </refsect2>
- * <refsect2>
- * <title>States</title>
- * <para>
- * Elements within GstCameraBin are created and destroyed when switching
- * between NULL and READY states. Therefore element properties should be set
- * in NULL state. User set elements are not unreffed until GstCameraBin is
- * unreffed or replaced by a new user set element. Initially only elements needed
- * for view finder mode are created to speed up startup. Image bin and video bin
- * elements are created when setting the mode or starting capture.
- * </para>
- * </refsect2>
- * <refsect2>
- * <note>
- * <para>
- * Since the muxers tested so far have problems with discontinous buffers, QoS
- * has been disabled, and then in order to record video, you MUST ensure that
- * there is enough CPU to encode the video. Thus choose smart resolution and
- * frames per second values. It is also highly recommended to avoid color
- * conversions; make sure all the elements involved work with the same colorspace
- * (i.e. rgb or yuv i420 or whatelse).
- * </para>
- * </note>
- * </refsect2>
- */
-
-/*
- * The pipeline in the camerabin is
- *
- *                                   "image bin"
- * videosrc ! crop ! scale ! out-sel <------> in-sel ! scale ! ffmpegcsp ! vfsink
- *                                   "video bin"
- *
- * it is possible to have 'ffmpegcolorspace' and 'capsfilter' just after
- * v4l2camsrc
- *
- * The properties of elements are:
- *
- *   vfsink - "sync", FALSE, "qos", FALSE
- *   output-selector - "resend-latest", FALSE
- *   input-selector - "select-all", TRUE
- */
-
-/*
- * includes
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <string.h>
-#include <stdlib.h>
-
-#include <gst/gst.h>
-/* FIXME: include #include <gst/gst-i18n-plugin.h> and use _(" ") */
-
-#ifndef __SYMBIAN32__
-#include <gst/gst-i18n-plugin.h>
-#else
-#include <gst/gst-i18n-plugin.h>
-#endif
-
-#ifdef __SYMBIAN32__
-#include <gst/gstinfo.h>
-#endif
-
-
-
-
-#include "gstcamerabin.h"
-#include "gstcamerabinxoverlay.h"
-#include "gstcamerabincolorbalance.h"
-#include "gstcamerabinphotography.h"
-
-#include "camerabingeneral.h"
-
-#include "gstcamerabin-marshal.h"
-
-#ifdef __SYMBIAN32__
-#include <glib_global.h>
-#endif
-/*
- * enum and types
- */
-
-enum
-{
-  /* action signals */
-  USER_START_SIGNAL,
-  USER_STOP_SIGNAL,
-  USER_PAUSE_SIGNAL,
-  USER_RES_FPS_SIGNAL,
-  USER_IMAGE_RES_SIGNAL,
-  /* emit signals */
-  IMG_DONE_SIGNAL,
-  LAST_SIGNAL
-};
-
-enum
-{
-  ARG_0,
-  ARG_FILENAME,
-  ARG_MODE,
-  ARG_MUTE,
-  ARG_ZOOM,
-  ARG_IMAGE_POST,
-  ARG_IMAGE_ENC,
-  ARG_VIDEO_POST,
-  ARG_VIDEO_ENC,
-  ARG_AUDIO_ENC,
-  ARG_VIDEO_MUX,
-  ARG_VF_SINK,
-  ARG_VIDEO_SRC,
-  ARG_AUDIO_SRC,
-  ARG_INPUT_CAPS,
-  ARG_FILTER_CAPS
-};
-
-/*
- * defines and static global vars
- */
-
-static guint camerabin_signals[LAST_SIGNAL];
-
-#define GST_TYPE_CAMERABIN_MODE (gst_camerabin_mode_get_type ())
-
-/* default and range values for args */
-
-#define DEFAULT_MODE MODE_IMAGE
-#define DEFAULT_ZOOM 100
-#define DEFAULT_WIDTH 640
-#define DEFAULT_HEIGHT 480
-#define DEFAULT_CAPTURE_WIDTH 800
-#define DEFAULT_CAPTURE_HEIGHT 600
-#define DEFAULT_FPS_N 0         /* makes it use the default */
-#define DEFAULT_FPS_D 1
-#define CAMERABIN_DEFAULT_VF_CAPS "video/x-raw-yuv,format=(fourcc)I420"
-/* Using "bilinear" as default zoom method */
-#define CAMERABIN_DEFAULT_ZOOM_METHOD 1
-
-#define MIN_ZOOM 100
-#define MAX_ZOOM 1000
-#define ZOOM_1X MIN_ZOOM
-
-#define DEFAULT_V4L2CAMSRC_DRIVER_NAME "omap3cam"
-
-/* internal element names */
-
-#define USE_COLOR_CONVERTER 1
-
-/* FIXME: Make sure this can work with autovideosrc and use that. */
-#define DEFAULT_SRC_VID_SRC "v4l2src"
-
-#define DEFAULT_VIEW_SINK "autovideosink"
-
-/*
- * static helper functions declaration
- */
-
-static void camerabin_setup_src_elements (GstCameraBin * camera);
-
-static gboolean camerabin_create_src_elements (GstCameraBin * camera);
-
-static void camerabin_setup_view_elements (GstCameraBin * camera);
-
-static gboolean camerabin_create_view_elements (GstCameraBin * camera);
-
-static gboolean camerabin_create_elements (GstCameraBin * camera);
-
-static void camerabin_destroy_elements (GstCameraBin * camera);
-
-static void camerabin_dispose_elements (GstCameraBin * camera);
-
-static void gst_camerabin_change_mode (GstCameraBin * camera, gint mode);
-
-static void
-gst_camerabin_change_filename (GstCameraBin * camera, const gchar * name);
-
-static void gst_camerabin_setup_zoom (GstCameraBin * camera);
-
-static GstCaps *gst_camerabin_get_allowed_input_caps (GstCameraBin * camera);
-
-static void gst_camerabin_rewrite_tags (GstCameraBin * camera);
-
-static void
-gst_camerabin_set_capsfilter_caps (GstCameraBin * camera, GstCaps * new_caps);
-
-static void gst_camerabin_start_image_capture (GstCameraBin * camera);
-
-static void gst_camerabin_start_video_recording (GstCameraBin * camera);
-
-static gboolean
-gst_camerabin_have_img_buffer (GstPad * pad, GstBuffer * buffer,
-    gpointer u_data);
-static gboolean
-gst_camerabin_have_vid_buffer (GstPad * pad, GstBuffer * buffer,
-    gpointer u_data);
-
-static void gst_camerabin_reset_to_view_finder (GstCameraBin * camera);
-
-static void gst_camerabin_do_stop (GstCameraBin * camera);
-
-static void
-gst_camerabin_set_allowed_framerate (GstCameraBin * camera,
-    GstCaps * filter_caps);
-
-/*
- * GObject callback functions declaration
- */
-
-static void gst_camerabin_base_init (gpointer gclass);
-
-static void gst_camerabin_class_init (GstCameraBinClass * klass);
-
-static void
-gst_camerabin_init (GstCameraBin * camera, GstCameraBinClass * gclass);
-
-static void gst_camerabin_dispose (GObject * object);
-
-static void gst_camerabin_finalize (GObject * object);
-
-static void gst_camerabin_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec);
-
-static void gst_camerabin_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec);
-
-static const GValue *gst_camerabin_find_better_framerate (GstCameraBin * camera,
-    GstStructure * st, const GValue * orig_framerate);
-/*
- * GstElement function declarations
- */
-
-static GstStateChangeReturn
-gst_camerabin_change_state (GstElement * element, GstStateChange transition);
-
-
-/*
- * GstBin function declarations
- */
-static void
-gst_camerabin_handle_message_func (GstBin * bin, GstMessage * message);
-
-
-/*
- * Action signal function declarations
- */
-
-static void gst_camerabin_user_start (GstCameraBin * camera);
-
-static void gst_camerabin_user_stop (GstCameraBin * camera);
-
-static void gst_camerabin_user_pause (GstCameraBin * camera);
-
-static void
-gst_camerabin_user_res_fps (GstCameraBin * camera, gint width, gint height,
-    gint fps_n, gint fps_d);
-
-static void
-gst_camerabin_user_image_res (GstCameraBin * camera, gint width, gint height);
-
-
-/*
- * GST BOILERPLATE and GObject types
- */
-
-static GType
-gst_camerabin_mode_get_type (void)
-{
-  static GType gtype = 0;
-
-  if (gtype == 0) {
-    static const GEnumValue values[] = {
-      {MODE_IMAGE, "Still image capture (default)", "mode-image"},
-      {MODE_VIDEO, "Video recording", "mode-video"},
-      {0, NULL, NULL}
-    };
-
-    gtype = g_enum_register_static ("GstCameraBinMode", values);
-  }
-  return gtype;
-}
-
-static gboolean
-gst_camerabin_iface_supported (GstImplementsInterface * iface, GType iface_type)
-{
-  GstCameraBin *camera = GST_CAMERABIN (iface);
-
-  if (iface_type == GST_TYPE_X_OVERLAY) {
-    if (camera->view_sink) {
-      return GST_IS_X_OVERLAY (camera->view_sink);
-    }
-  } else if (iface_type == GST_TYPE_COLOR_BALANCE) {
-    if (camera->src_vid_src) {
-      return GST_IS_COLOR_BALANCE (camera->src_vid_src);
-    }
-  } else if (iface_type == GST_TYPE_TAG_SETTER) {
-    /* Note: Tag setter elements aren't
-       present when image and video bin in NULL */
-    GstElement *setter;
-    setter = gst_bin_get_by_interface (GST_BIN (camera), iface_type);
-    if (setter) {
-      gst_object_unref (setter);
-      return TRUE;
-    } else {
-      return FALSE;
-    }
-  } else if (iface_type == GST_TYPE_PHOTOGRAPHY) {
-    if (camera->src_vid_src) {
-      return GST_IS_PHOTOGRAPHY (camera->src_vid_src);
-    }
-  }
-
-  return FALSE;
-}
-
-static void
-gst_camerabin_interface_init (GstImplementsInterfaceClass * klass)
-{
-  /*
-   * default virtual functions
-   */
-  klass->supported = gst_camerabin_iface_supported;
-}
-
-static void
-camerabin_init_interfaces (GType type)
-{
-
-  static const GInterfaceInfo camerabin_info = {
-    (GInterfaceInitFunc) gst_camerabin_interface_init,
-    NULL,
-    NULL,
-  };
-
-  static const GInterfaceInfo camerabin_xoverlay_info = {
-    (GInterfaceInitFunc) gst_camerabin_xoverlay_init,
-    NULL,
-    NULL,
-  };
-
-  static const GInterfaceInfo camerabin_color_balance_info = {
-    (GInterfaceInitFunc) gst_camerabin_color_balance_init,
-    NULL,
-    NULL,
-  };
-
-  static const GInterfaceInfo camerabin_tagsetter_info = {
-    NULL,
-    NULL,
-    NULL,
-  };
-  static const GInterfaceInfo camerabin_photography_info = {
-    (GInterfaceInitFunc) gst_camerabin_photography_init,
-    NULL,
-    NULL,
-  };
-
-  g_type_add_interface_static (type,
-      GST_TYPE_IMPLEMENTS_INTERFACE, &camerabin_info);
-
-  g_type_add_interface_static (type, GST_TYPE_X_OVERLAY,
-      &camerabin_xoverlay_info);
-
-  g_type_add_interface_static (type, GST_TYPE_COLOR_BALANCE,
-      &camerabin_color_balance_info);
-
-  g_type_add_interface_static (type, GST_TYPE_TAG_SETTER,
-      &camerabin_tagsetter_info);
-
-  g_type_add_interface_static (type, GST_TYPE_PHOTOGRAPHY,
-      &camerabin_photography_info);
-}
-
-GST_BOILERPLATE_FULL (GstCameraBin, gst_camerabin, GstPipeline,
-    GST_TYPE_PIPELINE, camerabin_init_interfaces);
-
-/*
- * static helper functions implementation
- */
-
-/*
- * camerabin_setup_src_elements:
- * @camera: camerabin object
- *
- * This function updates camerabin capsfilters according
- * to fps, resolution and zoom that have been configured
- * to camerabin.
- */
-static void
-camerabin_setup_src_elements (GstCameraBin * camera)
-{
-  GstStructure *st;
-  GstCaps *new_caps;
-  gboolean detect_framerate = FALSE;
-
-  if (!camera->view_finder_caps) {
-    st = gst_structure_from_string (CAMERABIN_DEFAULT_VF_CAPS, NULL);
-  } else {
-    st = gst_structure_copy (gst_caps_get_structure (camera->view_finder_caps,
-            0));
-  }
-
-  if (camera->width > 0 && camera->height > 0) {
-    gst_structure_set (st,
-        "width", G_TYPE_INT, camera->width,
-        "height", G_TYPE_INT, camera->height, NULL);
-  }
-
-  if (camera->fps_n > 0 && camera->fps_d > 0) {
-    if (camera->night_mode) {
-      GST_WARNING_OBJECT (camera,
-          "night mode, lowest allowed fps will be forced");
-      camera->pre_night_fps_n = camera->fps_n;
-      camera->pre_night_fps_d = camera->fps_d;
-      detect_framerate = TRUE;
-    } else {
-      gst_structure_set (st,
-          "framerate", GST_TYPE_FRACTION, camera->fps_n, camera->fps_d, NULL);
-      new_caps = gst_caps_new_full (st, NULL);
-    }
-  } else {
-    GST_DEBUG_OBJECT (camera, "no framerate specified");
-    detect_framerate = TRUE;
-  }
-
-  if (detect_framerate) {
-    GST_DEBUG_OBJECT (camera, "detecting allowed framerate");
-    /* Remove old framerate if any */
-    if (gst_structure_has_field (st, "framerate")) {
-      gst_structure_remove_field (st, "framerate");
-    }
-    new_caps = gst_caps_new_full (st, NULL);
-
-    /* Set allowed framerate for the resolution */
-    gst_camerabin_set_allowed_framerate (camera, new_caps);
-  }
-
-  /* Set default zoom method */
-  g_object_set (camera->src_zoom_scale, "method",
-      CAMERABIN_DEFAULT_ZOOM_METHOD, NULL);
-
-  gst_caps_replace (&camera->view_finder_caps, new_caps);
-
-  /* Set caps for view finder mode */
-  gst_camerabin_set_capsfilter_caps (camera, camera->view_finder_caps);
-}
-
-/*
- * camerabin_create_src_elements:
- * @camera: camerabin object
- *
- * This function creates and links upstream side elements for camerabin.
- * videosrc ! cspconv ! capsfilter ! crop ! scale ! capsfilter ! out-sel !
- *
- * Returns: TRUE, if elements were successfully created, FALSE otherwise
- */
-static gboolean
-camerabin_create_src_elements (GstCameraBin * camera)
-{
-  gboolean ret = FALSE;
-  GstBin *cbin = GST_BIN (camera);
-  gchar *driver_name = NULL;
-
-  if (camera->user_vid_src) {
-    camera->src_vid_src = camera->user_vid_src;
-
-    if (!gst_camerabin_add_element (cbin, camera->src_vid_src)) {
-      camera->src_vid_src = NULL;
-      goto done;
-    }
-  } else if (!(camera->src_vid_src =
-          gst_camerabin_create_and_add_element (cbin, DEFAULT_SRC_VID_SRC)))
-    goto done;
-#ifdef USE_COLOR_CONVERTER
-  if (!gst_camerabin_create_and_add_element (cbin, "ffmpegcolorspace"))
-    goto done;
-#endif
-  if (!(camera->src_filter =
-          gst_camerabin_create_and_add_element (cbin, "capsfilter")))
-    goto done;
-  if (!(camera->src_zoom_crop =
-          gst_camerabin_create_and_add_element (cbin, "videocrop")))
-    goto done;
-  if (!(camera->src_zoom_scale =
-          gst_camerabin_create_and_add_element (cbin, "videoscale")))
-    goto done;
-  if (!(camera->src_zoom_filter =
-          gst_camerabin_create_and_add_element (cbin, "capsfilter")))
-    goto done;
-  if (!(camera->src_out_sel =
-          gst_camerabin_create_and_add_element (cbin, "output-selector")))
-    goto done;
-
-  camera->srcpad_zoom_filter =
-      gst_element_get_static_pad (camera->src_zoom_filter, "src");
-
-  /* Set default "driver-name" for v4l2camsrc if not set */
-  if (g_object_class_find_property (G_OBJECT_GET_CLASS (camera->src_vid_src),
-          "driver-name")) {
-    g_object_get (G_OBJECT (camera->src_vid_src), "driver-name",
-        &driver_name, NULL);
-    if (!driver_name) {
-      g_object_set (G_OBJECT (camera->src_vid_src), "driver-name",
-          DEFAULT_V4L2CAMSRC_DRIVER_NAME, NULL);
-    }
-  }
-
-  ret = TRUE;
-done:
-  return ret;
-}
-
-/*
- * camerabin_setup_view_elements:
- * @camera: camerabin object
- *
- * This function configures properties for view finder sink element.
- */
-static void
-camerabin_setup_view_elements (GstCameraBin * camera)
-{
-  GST_DEBUG_OBJECT (camera, "setting view finder properties");
-  g_object_set (G_OBJECT (camera->view_in_sel), "select-all", TRUE, NULL);
-  /* Set properties for view finder sink */
-  /* Find the actual sink if using bin like autovideosink */
-  if (GST_IS_BIN (camera->view_sink)) {
-    GList *child = NULL, *children = GST_BIN_CHILDREN (camera->view_sink);
-    for (child = children; child != NULL; child = g_list_next (children)) {
-      GObject *ch = G_OBJECT (child->data);
-      if (g_object_class_find_property (G_OBJECT_GET_CLASS (ch), "sync")) {
-        g_object_set (G_OBJECT (ch), "sync", FALSE, "qos", FALSE, "async",
-            FALSE, NULL);
-      }
-    }
-  } else {
-    g_object_set (G_OBJECT (camera->view_sink), "sync", FALSE, "qos", FALSE,
-        "async", FALSE, NULL);
-  }
-}
-
-/*
- * camerabin_create_view_elements:
- * @camera: camerabin object
- *
- * This function creates and links downstream side elements for camerabin.
- * ! scale ! cspconv ! view finder sink
- *
- * Returns: TRUE, if elements were successfully created, FALSE otherwise
- */
-static gboolean
-camerabin_create_view_elements (GstCameraBin * camera)
-{
-  const GList *pads;
-
-  if (!(camera->view_in_sel =
-          gst_camerabin_create_and_add_element (GST_BIN (camera),
-              "input-selector"))) {
-    goto error;
-  }
-
-  /* Look for recently added input selector sink pad, we need to release it later */
-  pads = GST_ELEMENT_PADS (camera->view_in_sel);
-  while (pads != NULL
-      && (GST_PAD_DIRECTION (GST_PAD (pads->data)) != GST_PAD_SINK)) {
-    pads = g_list_next (pads);
-  }
-  camera->pad_view_img = GST_PAD (pads->data);
-
-  if (!(camera->view_scale =
-          gst_camerabin_create_and_add_element (GST_BIN (camera),
-              "videoscale"))) {
-    goto error;
-  }
-#ifdef USE_COLOR_CONVERTER
-  if (!gst_camerabin_create_and_add_element (GST_BIN (camera),
-          "ffmpegcolorspace")) {
-    goto error;
-  }
-#endif
-  if (camera->user_vf_sink) {
-    camera->view_sink = camera->user_vf_sink;
-    if (!gst_camerabin_add_element (GST_BIN (camera), camera->view_sink)) {
-      goto error;
-    }
-  } else if (!(camera->view_sink =
-          gst_camerabin_create_and_add_element (GST_BIN (camera),
-              DEFAULT_VIEW_SINK))) {
-    goto error;
-  }
-
-  return TRUE;
-error:
-  return FALSE;
-}
-
-/*
- * camerabin_create_elements:
- * @camera: camerabin object
- *
- * This function creates and links all elements for camerabin,
- *
- * Returns: TRUE, if elements were successfully created, FALSE otherwise
- */
-static gboolean
-camerabin_create_elements (GstCameraBin * camera)
-{
-  gboolean ret = FALSE;
-  GstPadLinkReturn link_ret = GST_PAD_LINK_REFUSED;
-  GstPad *unconnected_pad;
-
-  GST_LOG_OBJECT (camera, "creating elems");
-
-  /* Create "src" elements */
-  if (!camerabin_create_src_elements (camera)) {
-    goto done;
-  }
-
-  /* Add image bin */
-  camera->pad_src_img =
-      gst_element_get_request_pad (camera->src_out_sel, "src%d");
-  if (!gst_camerabin_add_element (GST_BIN (camera), camera->imgbin)) {
-    goto done;
-  }
-  gst_pad_add_buffer_probe (camera->pad_src_img,
-      G_CALLBACK (gst_camerabin_have_img_buffer), camera);
-
-  /* Create view finder elements, this also links it to image bin */
-  if (!camerabin_create_view_elements (camera)) {
-    GST_WARNING_OBJECT (camera, "creating view failed");
-    goto done;
-  }
-
-  /* Link output selector ! view_finder */
-  camera->pad_src_view =
-      gst_element_get_request_pad (camera->src_out_sel, "src%d");
-  camera->pad_view_src =
-      gst_element_get_request_pad (camera->view_in_sel, "sink%d");
-  link_ret = gst_pad_link (camera->pad_src_view, camera->pad_view_src);
-  if (GST_PAD_LINK_FAILED (link_ret)) {
-    GST_ELEMENT_ERROR (camera, CORE, NEGOTIATION,
-        ("linking view finder failed"), (NULL));
-    goto done;
-  }
-
-  /* Set view finder active as default */
-  g_object_set (G_OBJECT (camera->src_out_sel), "active-pad",
-      camera->pad_src_view, NULL);
-
-  /* Add video bin */
-  camera->pad_src_vid =
-      gst_element_get_request_pad (camera->src_out_sel, "src%d");
-  if (!gst_camerabin_add_element (GST_BIN (camera), camera->vidbin)) {
-    goto done;
-  }
-  gst_pad_add_buffer_probe (camera->pad_src_vid,
-      G_CALLBACK (gst_camerabin_have_vid_buffer), camera);
-
-  /* Link video bin ! view finder */
- // unconnected_pad = gst_bin_find_unlinked_pad (GST_BIN (camera), GST_PAD_SRC);
-   unconnected_pad = gst_bin_find_unconnected_pad (GST_BIN (camera), GST_PAD_SRC);
-  camera->pad_view_vid =
-      gst_element_get_request_pad (camera->view_in_sel, "sink%d");
-  link_ret = gst_pad_link (unconnected_pad, camera->pad_view_vid);
-  gst_object_unref (unconnected_pad);
-  if (GST_PAD_LINK_FAILED (link_ret)) {
-    GST_ELEMENT_ERROR (camera, CORE, NEGOTIATION, (NULL),
-        ("linking video bin and view finder failed"));
-    goto done;
-  }
-
-  ret = TRUE;
-
-done:
-
-  if (FALSE == ret)
-    camerabin_destroy_elements (camera);
-
-  return ret;
-}
-
-/*
- * camerabin_destroy_elements:
- * @camera: camerabin object
- *
- * This function removes all elements from camerabin.
- */
-static void
-camerabin_destroy_elements (GstCameraBin * camera)
-{
-  GST_DEBUG_OBJECT (camera, "destroying elements");
-
-  /* Release request pads */
-  if (camera->pad_view_vid) {
-    gst_element_release_request_pad (camera->view_in_sel, camera->pad_view_vid);
-    camera->pad_view_vid = NULL;
-  }
-  if (camera->pad_src_vid) {
-    gst_element_release_request_pad (camera->src_out_sel, camera->pad_src_vid);
-    camera->pad_src_vid = NULL;
-  }
-  if (camera->pad_view_img) {
-    gst_element_release_request_pad (camera->view_in_sel, camera->pad_view_img);
-    camera->pad_view_img = NULL;
-  }
-  if (camera->pad_src_img) {
-    gst_element_release_request_pad (camera->src_out_sel, camera->pad_src_img);
-    camera->pad_src_img = NULL;
-  }
-  if (camera->pad_view_src) {
-    gst_element_release_request_pad (camera->view_in_sel, camera->pad_view_src);
-    camera->pad_view_src = NULL;
-  }
-  if (camera->pad_src_view) {
-    gst_element_release_request_pad (camera->src_out_sel, camera->pad_src_view);
-    camera->pad_src_view = NULL;
-  }
-
-  camera->view_sink = NULL;
-  camera->view_scale = NULL;
-  camera->view_in_sel = NULL;
-
-  camera->src_out_sel = NULL;
-  camera->src_filter = NULL;
-  camera->src_zoom_crop = NULL;
-  camera->src_zoom_scale = NULL;
-  camera->src_zoom_filter = NULL;
-  camera->src_vid_src = NULL;
-
-  camera->active_bin = NULL;
-
-  /* Remove elements */
-  gst_camerabin_remove_elements_from_bin (GST_BIN (camera));
-}
-
-/*
- * camerabin_dispose_elements:
- * @camera: camerabin object
- *
- * This function releases all allocated camerabin resources.
- */
-static void
-camerabin_dispose_elements (GstCameraBin * camera)
-{
-  if (camera->capture_mutex) {
-    g_mutex_free (camera->capture_mutex);
-    camera->capture_mutex = NULL;
-  }
-  if (camera->cond) {
-    g_cond_free (camera->cond);
-    camera->cond = NULL;
-  }
-  if (camera->filename) {
-    g_string_free (camera->filename, TRUE);
-    camera->filename = NULL;
-  }
-  /* Unref user set elements */
-  if (camera->user_vf_sink) {
-    gst_object_unref (camera->user_vf_sink);
-    camera->user_vf_sink = NULL;
-  }
-  if (camera->user_vid_src) {
-    gst_object_unref (camera->user_vid_src);
-    camera->user_vid_src = NULL;
-  }
-
-  if (camera->image_capture_caps) {
-    gst_caps_unref (camera->image_capture_caps);
-    camera->image_capture_caps = NULL;
-  }
-
-  if (camera->view_finder_caps) {
-    gst_caps_unref (camera->view_finder_caps);
-    camera->view_finder_caps = NULL;
-  }
-
-  if (camera->allowed_caps) {
-    gst_caps_unref (camera->allowed_caps);
-    camera->allowed_caps = NULL;
-  }
-}
-
-/*
- * gst_camerabin_image_capture_continue:
- * @camera: camerabin object
- * @filename: new filename set by user
- * @cont: TRUE to continue image capture, FALSE otherwise
- *
- * Check if user wants to continue image capturing by using g_signal.
- */
-static void
-gst_camerabin_image_capture_continue (GstCameraBin * camera, GString * filename,
-    gboolean * cont)
-{
-  GST_DEBUG_OBJECT (camera, "emitting img_done signal, filename: %s",
-      filename->str);
-  g_signal_emit (G_OBJECT (camera), camerabin_signals[IMG_DONE_SIGNAL], 0,
-      filename, cont);
-
-  GST_DEBUG_OBJECT (camera, "emitted img_done, new filename:%s, continue:%d",
-      filename->str, *cont);
-}
-
-/*
- * gst_camerabin_change_mode:
- * @camera: camerabin object
- * @mode: image or video mode
- *
- * Change camerabin mode between image and video capture.
- * Changing mode will stop ongoing capture.
- */
-static void
-gst_camerabin_change_mode (GstCameraBin * camera, gint mode)
-{
-  if (camera->mode != mode || !camera->active_bin) {
-    GST_DEBUG_OBJECT (camera, "setting mode: %d", mode);
-    /* Interrupt ongoing capture */
-    gst_camerabin_do_stop (camera);
-    camera->mode = mode;
-    if (camera->active_bin) {
-      gst_element_set_state (camera->active_bin, GST_STATE_NULL);
-    }
-    if (camera->mode == MODE_IMAGE) {
-      camera->active_bin = camera->imgbin;
-    } else if (camera->mode == MODE_VIDEO) {
-      camera->active_bin = camera->vidbin;
-    }
-    gst_camerabin_reset_to_view_finder (camera);
-  }
-}
-
-/*
- * gst_camerabin_change_filename:
- * @camera: camerabin object
- * @name: new filename for capture
- *
- * Change filename for image or video capture.
- * Changing filename will stop ongoing capture.
- */
-static void
-gst_camerabin_change_filename (GstCameraBin * camera, const gchar * name)
-{
-  if (0 != strcmp (camera->filename->str, name)) {
-    GST_DEBUG_OBJECT (camera, "changing filename from %s to %s",
-        camera->filename->str, name);
-    /* Interrupt ongoing capture */
-    gst_camerabin_do_stop (camera);
-    gst_camerabin_reset_to_view_finder (camera);
-
-    if (camera->active_bin) {
-      g_object_set (G_OBJECT (camera->active_bin), "filename", name, NULL);
-    }
-
-    g_string_assign (camera->filename, name);
-  }
-}
-
-/*
- * gst_camerabin_setup_zoom:
- * @camera: camerabin object
- *
- * Apply zoom configured to camerabin to capture.
- */
-static void
-gst_camerabin_setup_zoom (GstCameraBin * camera)
-{
-  gint zoom;
-  gboolean done = FALSE;
-
-  g_return_if_fail (camera != NULL);
-  g_return_if_fail (camera->src_zoom_crop != NULL);
-
-  zoom = g_atomic_int_get (&camera->zoom);
-
-  g_return_if_fail (zoom);
-
-  if (GST_IS_ELEMENT (camera->src_vid_src) &&
-      gst_element_implements_interface (camera->src_vid_src,
-          GST_TYPE_PHOTOGRAPHY)) {
-    /* Try setting (hardware) zoom using photography interface */
-    GstPhotography *photo;
-    GstPhotoCaps pcaps;
-
-    photo = GST_PHOTOGRAPHY (camera->src_vid_src);
-    pcaps = gst_photography_get_capabilities (photo);
-
-    if (pcaps & GST_PHOTOGRAPHY_CAPS_ZOOM) {
-      done = gst_photography_set_zoom (photo, (gfloat) zoom / 100.0);
-    }
-  }
-
-  if (!done) {
-    /* Update capsfilters to apply the (software) zoom */
-    gint w2_crop = 0;
-    gint h2_crop = 0;
-    GstPad *pad_zoom_sink = NULL;
-
-    GST_INFO_OBJECT (camera, "zoom: %d, orig size: %dx%d", zoom,
-        camera->width, camera->height);
-
-    if (zoom != ZOOM_1X) {
-      w2_crop = (camera->width - (camera->width * ZOOM_1X / zoom)) / 2;
-      h2_crop = (camera->height - (camera->height * ZOOM_1X / zoom)) / 2;
-    }
-
-    pad_zoom_sink = gst_element_get_static_pad (camera->src_zoom_crop, "sink");
-
-    GST_INFO_OBJECT (camera,
-        "sw cropping: left:%d, right:%d, top:%d, bottom:%d", w2_crop, w2_crop,
-        h2_crop, h2_crop);
-
-    GST_PAD_STREAM_LOCK (pad_zoom_sink);
-    g_object_set (camera->src_zoom_crop, "left", w2_crop, "right", w2_crop,
-        "top", h2_crop, "bottom", h2_crop, NULL);
-
-    GST_PAD_STREAM_UNLOCK (pad_zoom_sink);
-    gst_object_unref (pad_zoom_sink);
-  }
-  GST_LOG_OBJECT (camera, "zoom set");
-}
-
-/*
- * gst_camerabin_get_allowed_input_caps:
- * @camera: camerabin object
- *
- * Retrieve caps from videosrc describing formats it supports
- *
- * Returns: caps object from videosrc
- */
-static GstCaps *
-gst_camerabin_get_allowed_input_caps (GstCameraBin * camera)
-{
-  GstCaps *caps = NULL;
-  GstPad *pad = NULL, *peer_pad = NULL;
-  GstState state;
-  gboolean temp_videosrc_pause = FALSE;
-  GstElement *videosrc;
-
-  g_return_val_if_fail (camera != NULL, NULL);
-
-  videosrc = camera->src_vid_src ? camera->src_vid_src : camera->user_vid_src;
-
-  if (!videosrc) {
-    GST_WARNING_OBJECT (camera, "no videosrc, can't get allowed caps");
-    goto failed;
-  }
-
-  if (camera->allowed_caps) {
-    GST_DEBUG_OBJECT (camera, "returning cached caps");
-    goto done;
-  }
-
-  pad = gst_element_get_static_pad (videosrc, "src");
-
-  if (!pad) {
-    GST_WARNING_OBJECT (camera, "no srcpad in videosrc");
-    goto failed;
-  }
-
-  state = GST_STATE (videosrc);
-
-  /* Make this function work also in READY and NULL state */
-  if (state == GST_STATE_READY || state == GST_STATE_NULL) {
-    GST_DEBUG_OBJECT (camera, "setting videosrc to paused temporarily");
-    temp_videosrc_pause = TRUE;
-    peer_pad = gst_pad_get_peer (pad);
-    if (peer_pad) {
-      gst_pad_unlink (pad, peer_pad);
-    }
-    /* Set videosrc to PAUSED to open video device */
-    gst_element_set_locked_state (videosrc, TRUE);
-    gst_element_set_state (videosrc, GST_STATE_PAUSED);
-  }
-
-  camera->allowed_caps = gst_pad_get_caps (pad);
-
-  /* Restore state and re-link if necessary */
-  if (temp_videosrc_pause) {
-    GST_DEBUG_OBJECT (camera, "restoring videosrc state %d", state);
-    /* Reset videosrc to NULL state, some drivers seem to need this */
-    gst_element_set_state (videosrc, GST_STATE_NULL);
-    gst_element_set_state (videosrc, state);
-    if (peer_pad) {
-      gst_pad_link (pad, peer_pad);
-      gst_object_unref (peer_pad);
-    }
-    gst_element_set_locked_state (videosrc, FALSE);
-  }
-
-  gst_object_unref (pad);
-
-done:
-  if (camera->allowed_caps) {
-    caps = gst_caps_copy (camera->allowed_caps);
-  }
-failed:
-  GST_INFO_OBJECT (camera, "allowed caps:%" GST_PTR_FORMAT, caps);
-  return caps;
-}
-
-/*
- * gst_camerabin_rewrite_tags_to_bin:
- * @bin: bin holding tag setter elements
- * @list: tag list to be written
- *
- * This function looks for certain tag setters from given bin
- * and REPLACES ALL setter tags with given tag list
- *
- */
-static void
-gst_camerabin_rewrite_tags_to_bin (GstBin * bin, const GstTagList * list)
-{
-  GstElement *setter;
-  GstElementFactory *setter_factory;
-  const gchar *klass;
-  GstIterator *iter;
-  GstIteratorResult res = GST_ITERATOR_OK;
-  gpointer data;
-
-  iter = gst_bin_iterate_all_by_interface (bin, GST_TYPE_TAG_SETTER);
-
-  while (res == GST_ITERATOR_OK || res == GST_ITERATOR_RESYNC) {
-    res = gst_iterator_next (iter, &data);
-    switch (res) {
-      case GST_ITERATOR_DONE:
-        break;
-      case GST_ITERATOR_RESYNC:
-        gst_iterator_resync (iter);
-        break;
-      case GST_ITERATOR_ERROR:
-        GST_WARNING ("error iterating tag setters");
-        break;
-      case GST_ITERATOR_OK:
-        setter = GST_ELEMENT (data);
-        GST_LOG ("iterating tag setters: %" GST_PTR_FORMAT, setter);
-        setter_factory = gst_element_get_factory (setter);
-        klass = gst_element_factory_get_klass (setter_factory);
-        /* FIXME: check if tags should be written to all tag setters,
-           set tags only to Muxer elements for now */
-        if (g_strrstr (klass, "Muxer")) {
-          GST_DEBUG ("replacement tags %" GST_PTR_FORMAT, list);
-          gst_tag_setter_merge_tags (GST_TAG_SETTER (setter), list,
-              GST_TAG_MERGE_REPLACE_ALL);
-        }
-        gst_object_unref (setter);
-        break;
-      default:
-        break;
-    }
-  }
-
-  gst_iterator_free (iter);
-}
-
-/*
- * gst_camerabin_get_internal_tags:
- * @camera: the camera bin element
- *
- * Returns tag list containing metadata from camerabin
- * and it's elements
- */
-static GstTagList *
-gst_camerabin_get_internal_tags (GstCameraBin * camera)
-{
-  GstTagList *list = gst_tag_list_new ();
-  GstColorBalance *balance = NULL;
-  const GList *controls = NULL, *item;
-  GstColorBalanceChannel *channel;
-  gint min_value, max_value, mid_value, cur_value;
-
-
-  if (camera->active_bin == camera->vidbin) {
-    /* FIXME: check if internal video tag setting is needed */
-    goto done;
-  }
-
-  gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
-      "image-width", camera->width, "image-height", camera->height, NULL);
-
-  gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
-      "capture-digital-zoom", camera->zoom, 100, NULL);
-
-  if (gst_element_implements_interface (GST_ELEMENT (camera),
-          GST_TYPE_COLOR_BALANCE)) {
-    balance = GST_COLOR_BALANCE (camera);
-  }
-
-  if (balance) {
-    controls = gst_color_balance_list_channels (balance);
-  }
-  for (item = controls; item; item = g_list_next (item)) {
-    channel = item->data;
-    min_value = channel->min_value;
-    max_value = channel->max_value;
-    /* the default value would probably better */
-    mid_value = min_value + ((max_value - min_value) / 2);
-    cur_value = gst_color_balance_get_value (balance, channel);
-
-    if (!strcasecmp (channel->label, "brightness")) {
-      /* The value of brightness. The unit is the APEX value (Additive System of Photographic Exposure).
-       * Ordinarily it is given in the range of -99.99 to 99.99. Note that
-       * if the numerator of the recorded value is 0xFFFFFFFF, Unknown shall be indicated.
-       *
-       * BrightnessValue (Bv) = log2 ( B/NK )
-       * Note that: B:cd/cm² (candela per square centimeter), N,K: constant
-       *
-       * http://johnlind.tripod.com/science/scienceexposure.html
-       *
-       */
-      gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
-          "capture-brightness", cur_value, 1, NULL);
-    } else if (!strcasecmp (channel->label, "contrast")) {
-      /* 0 = Normal, 1 = Soft, 2 = Hard */
-
-      gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
-          "capture-contrast",
-          (cur_value == mid_value) ? 0 : ((cur_value < mid_value) ? 1 : 2),
-          NULL);
-    } else if (!strcasecmp (channel->label, "gain")) {
-      /* 0 = Normal, 1 = Low Up, 2 = High Up, 3 = Low Down, 4 = Hight Down */
-      gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
-          "capture-gain",
-          (guint) (cur_value == mid_value) ? 0 : ((cur_value <
-                  mid_value) ? 1 : 3), NULL);
-    } else if (!strcasecmp (channel->label, "saturation")) {
-      /* 0 = Normal, 1 = Low, 2 = High */
-      gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
-          "capture-saturation",
-          (cur_value == mid_value) ? 0 : ((cur_value < mid_value) ? 1 : 2),
-          NULL);
-    }
-  }
-
-done:
-
-  return list;
-}
-
-/*
- * gst_camerabin_rewrite_tags:
- * @camera: the camera bin element
- *
- * Merges application set tags to camerabin internal tags,
- * and writes them using image or video bin tag setters.
- */
-static void
-gst_camerabin_rewrite_tags (GstCameraBin * camera)
-{
-  const GstTagList *app_tag_list = NULL;
-  GstTagList *list = NULL;
-
-  /* Get application set tags */
-  app_tag_list = gst_tag_setter_get_tag_list (GST_TAG_SETTER (camera));
-
-  /* Get tags from camerabin and it's elements */
-  list = gst_camerabin_get_internal_tags (camera);
-
-  if (app_tag_list) {
-    gst_tag_list_insert (list, app_tag_list, GST_TAG_MERGE_REPLACE);
-  }
-
-  /* Write tags */
-  gst_camerabin_rewrite_tags_to_bin (GST_BIN (camera->active_bin), list);
-
-  gst_tag_list_free (list);
-}
-
-/*
- * gst_camerabin_set_capsfilter_caps:
- * @camera: camerabin object
- * @new_caps: pointer to caps object to set
- *
- * Set given caps to camerabin capsfilters.
- */
-static void
-gst_camerabin_set_capsfilter_caps (GstCameraBin * camera, GstCaps * new_caps)
-{
-  GstStructure *st;
-
-  GST_INFO_OBJECT (camera, "new_caps:%" GST_PTR_FORMAT, new_caps);
-
-  st = gst_caps_get_structure (new_caps, 0);
-
-  gst_structure_get_int (st, "width", &camera->width);
-  gst_structure_get_int (st, "height", &camera->height);
-
-  if (gst_structure_has_field (st, "framerate")) {
-    gst_structure_get_fraction (st, "framerate", &camera->fps_n,
-        &camera->fps_d);
-  }
-
-  /* Update zoom */
-  gst_camerabin_setup_zoom (camera);
-
-  /* Update capsfilters */
-  g_object_set (G_OBJECT (camera->src_filter), "caps", new_caps, NULL);
-  g_object_set (G_OBJECT (camera->src_zoom_filter), "caps", new_caps, NULL);
-}
-
-/*
- * img_capture_prepared:
- * @data: camerabin object
- *
- * Callback which is called after image capture has been prepared.
- */
-static void
-img_capture_prepared (gpointer data)
-{
-  GstCameraBin *camera = GST_CAMERABIN (data);
-
-  GST_INFO_OBJECT (camera, "image capture prepared");
-
-  if (camera->image_capture_caps) {
-    /* Set capsfilters to match arriving image data */
-    gst_camerabin_set_capsfilter_caps (camera, camera->image_capture_caps);
-  }
-
-  g_object_set (G_OBJECT (camera->src_out_sel), "resend-latest", FALSE,
-      "active-pad", camera->pad_src_img, NULL);
-  gst_camerabin_rewrite_tags (camera);
-  gst_element_set_state (GST_ELEMENT (camera->imgbin), GST_STATE_PLAYING);
-}
-
-/*
- * gst_camerabin_start_image_capture:
- * @camera: camerabin object
- *
- * Initiates image capture.
- */
-static void
-gst_camerabin_start_image_capture (GstCameraBin * camera)
-{
-  GstStateChangeReturn state_ret;
-  gboolean wait_for_prepare = FALSE;
-  gint width = 0, height = 0, fps_n = 0, fps_d = 0;
-  GstStructure *st;
-
-  GST_INFO_OBJECT (camera, "starting image capture");
-
-  if (GST_IS_ELEMENT (camera->src_vid_src) &&
-      gst_element_implements_interface (camera->src_vid_src,
-          GST_TYPE_PHOTOGRAPHY)) {
-    /* Start image capture preparations using photography iface */
-    wait_for_prepare = TRUE;
-    g_mutex_lock (camera->capture_mutex);
-    if (camera->image_capture_caps) {
-      st = gst_caps_get_structure (camera->image_capture_caps, 0);
-    } else {
-      st = gst_caps_get_structure (camera->view_finder_caps, 0);
-    }
-    gst_structure_get_int (st, "width", &width);
-    gst_structure_get_int (st, "height", &height);
-    gst_structure_get_fraction (st, "framerate", &fps_n, &fps_d);
-    /* Set image capture resolution and frame rate */
-    g_signal_emit_by_name (camera->src_vid_src, "user-res-fps",
-        width, height, fps_n, fps_d, 0);
-
-    /* Enable still image capture mode in v4l2camsrc */
-    if (g_object_class_find_property (G_OBJECT_GET_CLASS (camera->src_vid_src),
-            "capture-mode")) {
-      g_object_set (G_OBJECT (camera->src_vid_src), "capture-mode", 1, NULL);
-    }
-
-    /* Start preparations for image capture */
-    gst_photography_prepare_for_capture (GST_PHOTOGRAPHY (camera->src_vid_src),
-        (GstPhotoCapturePrepared) img_capture_prepared, camera);
-    camera->capturing = TRUE;
-    g_mutex_unlock (camera->capture_mutex);
-  }
-
-  if (!wait_for_prepare) {
-    gst_camerabin_rewrite_tags (camera);
-    state_ret = gst_element_set_state (camera->imgbin, GST_STATE_PLAYING);
-    if (state_ret != GST_STATE_CHANGE_FAILURE) {
-      g_mutex_lock (camera->capture_mutex);
-      g_object_set (G_OBJECT (camera->src_out_sel), "resend-latest", TRUE,
-          "active-pad", camera->pad_src_img, NULL);
-      camera->capturing = TRUE;
-      g_mutex_unlock (camera->capture_mutex);
-    } else {
-      GST_WARNING_OBJECT (camera, "imagebin state change failed");
-      gst_element_set_state (camera->imgbin, GST_STATE_NULL);
-    }
-  }
-}
-
-/*
- * gst_camerabin_start_video_recording:
- * @camera: camerabin object
- *
- * Initiates video recording.
- */
-static void
-gst_camerabin_start_video_recording (GstCameraBin * camera)
-{
-  GstStateChangeReturn state_ret;
-  /* FIXME: how to ensure resolution and fps is supported by CPU?
-   * use a queue overrun signal?
-   */
-  GST_INFO_OBJECT (camera, "starting video capture");
-
-  gst_camerabin_rewrite_tags (camera);
-
-  /* Pause the pipeline in order to distribute new clock in paused_to_playing */
-  /* audio src timestamps will be 0 without state change to READY. ??? */
-  gst_element_set_state (GST_ELEMENT (camera), GST_STATE_READY);
-  gst_element_set_locked_state (camera->vidbin, FALSE);
-  state_ret = gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PAUSED);
-
-  if (state_ret != GST_STATE_CHANGE_FAILURE) {
-    g_mutex_lock (camera->capture_mutex);
-    g_object_set (G_OBJECT (camera->src_out_sel), "resend-latest", FALSE,
-        "active-pad", camera->pad_src_vid, NULL);
-
-    /* Enable video mode in v4l2camsrc */
-    if (g_object_class_find_property (G_OBJECT_GET_CLASS (camera->src_vid_src),
-            "capture-mode")) {
-      g_object_set (G_OBJECT (camera->src_vid_src), "capture-mode", 2, NULL);
-    }
-
-    gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING);
-    gst_element_set_locked_state (camera->vidbin, TRUE);
-    camera->capturing = TRUE;
-    g_mutex_unlock (camera->capture_mutex);
-  } else {
-    GST_WARNING_OBJECT (camera, "videobin state change failed");
-    gst_element_set_state (camera->vidbin, GST_STATE_NULL);
-    gst_camerabin_reset_to_view_finder (camera);
-  }
-}
-
-/*
- * gst_camerabin_send_video_eos:
- * @camera: camerabin object
- *
- * Generate and send eos event to video bin in order to
- * finish recording properly.
- */
-static void
-gst_camerabin_send_video_eos (GstCameraBin * camera)
-{
-  GstPad *videopad;
-
-  g_return_if_fail (camera != NULL);
-
-  /* Send eos event to video bin */
-  GST_INFO_OBJECT (camera, "sending eos to videobin");
-  videopad = gst_element_get_static_pad (camera->vidbin, "sink");
-  gst_pad_send_event (videopad, gst_event_new_eos ());
-  gst_object_unref (videopad);
-}
-
-/*
- * image_pad_blocked:
- * @pad: pad to block/unblock
- * @blocked: TRUE to block, FALSE to unblock
- * @u_data: camera bin object
- *
- * Sends eos event to image bin if blocking pad leading to image bin.
- * The pad will be unblocked when image bin posts eos message.
- */
-static void
-image_pad_blocked (GstPad * pad, gboolean blocked, gpointer user_data)
-{
-  GstCameraBin *camera;
-
-  camera = (GstCameraBin *) user_data;
-
-  GST_DEBUG_OBJECT (camera, "%s %s:%s",
-      blocked ? "blocking" : "unblocking", GST_DEBUG_PAD_NAME (pad));
-
-  if (blocked && (pad == camera->pad_src_img)) {
-    /* Send eos and block until image bin reaches eos */
-    GST_DEBUG_OBJECT (camera, "sending eos to image bin");
-    gst_element_send_event (camera->imgbin, gst_event_new_eos ());
-  }
-}
-
-/*
- * gst_camerabin_have_img_buffer:
- * @pad: output-selector src pad leading to image bin
- * @buffer: still image frame
- * @u_data: camera bin object
- *
- * Buffer probe called before sending each buffer to image bin.
- *
- * First buffer is always passed directly to image bin. Then pad
- * is blocked in order to interleave buffers with eos events.
- * Interleaving eos events and buffers is needed when we have
- * decoupled elements in the image bin capture pipeline.
- * After image bin posts eos message, then pad is unblocked.
- * Next, image bin is changed to READY state in order to save the
- * file and the application is allowed to decide whether to
- * continue image capture. If yes, only then the next buffer is
- * passed to image bin.
- */
-static gboolean
-gst_camerabin_have_img_buffer (GstPad * pad, GstBuffer * buffer,
-    gpointer u_data)
-{
-  GstCameraBin *camera = (GstCameraBin *) u_data;
-  gboolean ret = TRUE;
-
-  GST_LOG ("got buffer #%d %p with size %d", camera->num_img_buffers,
-      buffer, GST_BUFFER_SIZE (buffer));
-
-  /* Image filename should be set by now */
-  if (g_str_equal (camera->filename->str, "")) {
-    GST_DEBUG_OBJECT (camera, "filename not set, dropping buffer");
-    ret = FALSE;
-    goto done;
-  }
-
-  /* Check for first buffer after capture start, we want to
-     pass it forward directly. */
-  if (!camera->num_img_buffers) {
-    /* Restore filter caps for view finder mode if necessary.
-       The v4l2camsrc switches automatically to view finder
-       resolution after hi-res still image capture. */
-    if (camera->image_capture_caps) {
-      gst_camerabin_set_capsfilter_caps (camera, camera->view_finder_caps);
-    }
-    goto done;
-  }
-
-  /* Close the file of saved image */
-  gst_element_set_state (camera->imgbin, GST_STATE_READY);
-
-  /* Check if the application wants to continue */
-  gst_camerabin_image_capture_continue (camera, camera->filename, &ret);
-
-  if (ret && !camera->stop_requested) {
-    GST_DEBUG_OBJECT (camera, "capturing image \"%s\"", camera->filename->str);
-    g_object_set (G_OBJECT (camera->imgbin), "filename",
-        camera->filename->str, NULL);
-    gst_element_set_state (camera->imgbin, GST_STATE_PLAYING);
-  } else {
-    GST_DEBUG_OBJECT (camera, "not continuing (cont:%d, stop_req:%d)",
-        ret, camera->stop_requested);
-    /* Reset filename to force application set new filename */
-    g_string_assign (camera->filename, "");
-
-    /* Block dataflow to the output-selector to show preview image in
-       view finder. Continue and unblock when capture is stopped */
-    gst_pad_set_blocked_async (camera->srcpad_zoom_filter, TRUE,
-        (GstPadBlockCallback) image_pad_blocked, camera);
-    ret = FALSE;                /* Drop the buffer */
-
-    g_mutex_lock (camera->capture_mutex);
-    camera->capturing = FALSE;
-    g_cond_signal (camera->cond);
-    g_mutex_unlock (camera->capture_mutex);
-  }
-
-done:
-
-  if (ret) {
-    camera->num_img_buffers++;
-    /* Block when next buffer arrives, we want to push eos event
-       between frames and make sure that eos reaches the filesink
-       before processing the next buffer. */
-    gst_pad_set_blocked_async (pad, TRUE,
-        (GstPadBlockCallback) image_pad_blocked, camera);
-  }
-
-  return ret;
-}
-
-/*
- * gst_camerabin_have_vid_buffer:
- * @pad: output-selector src pad leading to video bin
- * @buffer: buffer pushed to the pad
- * @u_data: camerabin object
- *
- * Buffer probe for src pad leading to video bin.
- * Sends eos event to video bin if stop requested and drops
- * all buffers after this.
- */
-static gboolean
-gst_camerabin_have_vid_buffer (GstPad * pad, GstBuffer * buffer,
-    gpointer u_data)
-{
-  GstCameraBin *camera = (GstCameraBin *) u_data;
-  gboolean ret = TRUE;
-  GST_LOG ("got video buffer %p with size %d",
-      buffer, GST_BUFFER_SIZE (buffer));
-  if (camera->stop_requested) {
-    gst_camerabin_send_video_eos (camera);
-    ret = FALSE;                /* Drop buffer */
-  }
-
-  return ret;
-}
-
-/*
- * gst_camerabin_reset_to_view_finder:
- * @camera: camerabin object
- *
- * Stop capturing and set camerabin to view finder mode.
- * Reset capture counters and flags.
- */
-static void
-gst_camerabin_reset_to_view_finder (GstCameraBin * camera)
-{
-  GstStateChangeReturn state_ret;
-  GST_DEBUG_OBJECT (camera, "resetting");
-
-  /* Set active bin to READY state */
-  if (camera->active_bin) {
-    state_ret = gst_element_set_state (camera->active_bin, GST_STATE_READY);
-    if (state_ret == GST_STATE_CHANGE_FAILURE) {
-      GST_WARNING_OBJECT (camera, "state change failed");
-      gst_element_set_state (camera->active_bin, GST_STATE_NULL);
-      camera->active_bin = NULL;
-    }
-  }
-
-  /* Reset counters and flags */
-  camera->num_img_buffers = 0;
-  camera->stop_requested = FALSE;
-  camera->paused = FALSE;
-
-  if (camera->src_out_sel) {
-    /* Set selector to forward data to view finder */
-    g_object_set (G_OBJECT (camera->src_out_sel), "resend-latest", FALSE,
-        "active-pad", camera->pad_src_view, NULL);
-  }
-
-  /* Unblock, if dataflow to output-selector is blocked due to image preview */
-  if (camera->srcpad_zoom_filter &&
-      gst_pad_is_blocked (camera->srcpad_zoom_filter)) {
-    gst_pad_set_blocked_async (camera->srcpad_zoom_filter, FALSE,
-        (GstPadBlockCallback) image_pad_blocked, camera);
-  }
-  /* Unblock, if dataflow to image bin is blocked due to waiting for eos */
-  if (camera->pad_src_img && gst_pad_is_blocked (camera->pad_src_img)) {
-    gst_pad_set_blocked_async (camera->pad_src_img, FALSE,
-        (GstPadBlockCallback) image_pad_blocked, camera);
-  }
-
-  /* Enable view finder mode in v4l2camsrc */
-  if (camera->src_vid_src &&
-      g_object_class_find_property (G_OBJECT_GET_CLASS (camera->src_vid_src),
-          "capture-mode")) {
-    g_object_set (G_OBJECT (camera->src_vid_src), "capture-mode", 0, NULL);
-  }
-
-  GST_DEBUG_OBJECT (camera, "reset done");
-}
-
-/*
- * gst_camerabin_do_stop:
- * @camera: camerabin object
- *
- * Raise flag to indicate to image and video bin capture stop.
- * Stopping paused video recording handled as a special case.
- * Wait for ongoing capturing to finish.
- */
-static void
-gst_camerabin_do_stop (GstCameraBin * camera)
-{
-  g_mutex_lock (camera->capture_mutex);
-  if (camera->capturing) {
-    GST_DEBUG_OBJECT (camera, "mark stop");
-    camera->stop_requested = TRUE;
-
-    /* Take special care when stopping paused video capture */
-    if ((camera->active_bin == camera->vidbin) && camera->paused) {
-      /* Send eos event to video bin before setting it to playing */
-      gst_camerabin_send_video_eos (camera);
-      /* We must change to playing now in order to get video bin eos events
-         and buffered data through and finish recording properly */
-      gst_element_set_state (GST_ELEMENT (camera->vidbin), GST_STATE_PLAYING);
-      camera->paused = FALSE;
-    }
-
-    GST_DEBUG_OBJECT (camera, "waiting for capturing to finish");
-    g_cond_wait (camera->cond, camera->capture_mutex);
-    GST_DEBUG_OBJECT (camera, "capturing finished");
-  }
-  g_mutex_unlock (camera->capture_mutex);
-}
-
-/*
- * gst_camerabin_default_signal_img_done:
- * @camera: camerabin object
- * @fname: new filename
- *
- * Default handler for #GstCameraBin::img-done signal,
- * stops always capture.
- *
- * Returns: FALSE always
- */
-static gboolean
-gst_camerabin_default_signal_img_done (GstCameraBin * camera, GString * fname)
-{
-  return FALSE;
-}
-
-/*
- * gst_camerabin_set_allowed_framerate:
- * @camera: camerabin object
- * @filter_caps: update allowed framerate to these caps
- *
- * Find allowed frame rate from video source that matches with
- * resolution in @filter_caps. Set found frame rate to @filter_caps.
- */
-static void
-gst_camerabin_set_allowed_framerate (GstCameraBin * camera,
-    GstCaps * filter_caps)
-{
-  GstStructure *structure;
-  GstCaps *allowed_caps = NULL, *intersect = NULL;
-  const GValue *framerate = NULL;
-  guint caps_size, i;
-
-  /* Get supported caps from video src that matches with new filter caps */
-  GST_INFO_OBJECT (camera, "filter caps:%" GST_PTR_FORMAT, filter_caps);
-  allowed_caps = gst_camerabin_get_allowed_input_caps (camera);
-  intersect = gst_caps_intersect (allowed_caps, filter_caps);
-  GST_INFO_OBJECT (camera, "intersect caps:%" GST_PTR_FORMAT, intersect);
-
-  /* Find the best framerate from the caps */
-  caps_size = gst_caps_get_size (intersect);
-  for (i = 0; i < caps_size; i++) {
-    structure = gst_caps_get_structure (intersect, i);
-    framerate =
-        gst_camerabin_find_better_framerate (camera, structure, framerate);
-  }
-
-  if (GST_VALUE_HOLDS_FRACTION (framerate)) {
-    gst_caps_set_simple (filter_caps,
-        "framerate", GST_TYPE_FRACTION,
-        gst_value_get_fraction_numerator (framerate),
-        gst_value_get_fraction_denominator (framerate), NULL);
-  }
-
-  if (allowed_caps) {
-    gst_caps_unref (allowed_caps);
-  }
-  if (intersect) {
-    gst_caps_unref (intersect);
-  }
-}
-
-
-/**
- * get_srcpad_current_format:
- * @element: element to get the format from
- *
- * Helper function to get the negotiated fourcc
- * format from @element src pad.
- *
- * Returns: negotiated format (fourcc), 0 if not found
- */
-static guint32
-get_srcpad_current_format (GstElement * element)
-{
-  GstPad *srcpad = NULL;
-  GstCaps *srccaps = NULL;
-  GstStructure *structure;
-  guint32 format = 0;
-
-  g_return_val_if_fail (element != NULL, 0);
-
-  if ((srcpad = gst_element_get_static_pad (element, "src")) == NULL) {
-    goto no_pad;
-  }
-
-  if ((srccaps = gst_pad_get_negotiated_caps (srcpad)) == NULL) {
-    goto no_caps;
-  }
-
-  GST_LOG ("negotiated caps %" GST_PTR_FORMAT, srccaps);
-
-  structure = gst_caps_get_structure (srccaps, 0);
-  if (gst_structure_has_field (structure, "format")) {
-    gst_structure_get_fourcc (structure, "format", &format);
-  }
-
-  gst_caps_unref (srccaps);
-no_caps:
-  gst_object_unref (srcpad);
-no_pad:
-  GST_DEBUG ("current format for %" GST_PTR_FORMAT ": %" GST_FOURCC_FORMAT,
-      element, GST_FOURCC_ARGS (format));
-  return format;
-}
-
-/*
- * gst_camerabin_find_better_framerate:
- * @camera: camerabin object
- * @st: structure that contains framerate candidates
- * @orig_framerate: best framerate so far
- *
- * Looks for framerate better than @orig_framerate from @st structure.
- * In night mode lowest framerate is considered best, otherwise highest is
- * best.
- *
- * Returns: @orig_framerate or better if found
- */
-static const GValue *
-gst_camerabin_find_better_framerate (GstCameraBin * camera, GstStructure * st,
-    const GValue * orig_framerate)
-{
-  const GValue *framerate = NULL;
-  guint i, i_best, list_size;
-  gint res, comparison;
-
-  if (camera->night_mode) {
-    GST_LOG_OBJECT (camera, "finding min framerate");
-    comparison = GST_VALUE_LESS_THAN;
-  } else {
-    GST_LOG_OBJECT (camera, "finding max framerate");
-    comparison = GST_VALUE_GREATER_THAN;
-  }
-
-  if (gst_structure_has_field (st, "framerate")) {
-    framerate = gst_structure_get_value (st, "framerate");
-    /* Handle framerate lists */
-    if (GST_VALUE_HOLDS_LIST (framerate)) {
-      list_size = gst_value_list_get_size (framerate);
-      GST_LOG_OBJECT (camera, "finding framerate from list");
-      for (i = 0, i_best = 0; i < list_size; i++) {
-        res = gst_value_compare (gst_value_list_get_value (framerate, i),
-            gst_value_list_get_value (framerate, i_best));
-        if (comparison == res) {
-          i_best = i;
-        }
-      }
-      GST_LOG_OBJECT (camera, "found best framerate from index %d", i_best);
-      framerate = gst_value_list_get_value (framerate, i_best);
-    }
-    /* Handle framerate ranges */
-    if (GST_VALUE_HOLDS_FRACTION_RANGE (framerate)) {
-      if (camera->night_mode) {
-        GST_LOG_OBJECT (camera, "getting min framerate from range");
-        framerate = gst_value_get_fraction_range_min (framerate);
-      } else {
-        GST_LOG_OBJECT (camera, "getting max framerate from range");
-        framerate = gst_value_get_fraction_range_max (framerate);
-      }
-    }
-  }
-
-  /* Check if we found better framerate */
-  if (orig_framerate && framerate) {
-    res = gst_value_compare (orig_framerate, framerate);
-    if (comparison == res) {
-      GST_LOG_OBJECT (camera, "original framerate was the best");
-      framerate = orig_framerate;
-    }
-  }
-
-  return framerate;
-}
-
-/*
- * GObject callback functions implementation
- */
-
-static void
-gst_camerabin_base_init (gpointer gclass)
-{
-  static GstElementDetails element_details = {
-    "Camera Bin",
-    "Generic/Bin/Camera",
-    "Handle lot of features present in DSC",
-    "Nokia Corporation <multimedia@maemo.org>\n"
-        "Edgard Lima <edgard.lima@indt.org.br>"
-  };
-  GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
-
-  gst_element_class_set_details (element_class, &element_details);
-}
-
-static void
-gst_camerabin_class_init (GstCameraBinClass * klass)
-{
-  GObjectClass *gobject_class;
-  GstElementClass *gstelement_class;
-  GstBinClass *gstbin_class;
-
-  gobject_class = G_OBJECT_CLASS (klass);
-  gstelement_class = GST_ELEMENT_CLASS (klass);
-  gstbin_class = GST_BIN_CLASS (klass);
-
-  /* gobject */
-
-  gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_camerabin_dispose);
-  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_camerabin_finalize);
-
-  gobject_class->set_property = gst_camerabin_set_property;
-  gobject_class->get_property = gst_camerabin_get_property;
-
-  /**
-   * GstCameraBin:filename:
-   *
-   * Set filename for the still image capturing or video capturing.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_FILENAME,
-      g_param_spec_string ("filename", "Filename",
-          "Filename of the image or video to save", "", G_PARAM_READWRITE));
-
-  /**
-   * GstCameraBin:mode:
-   *
-   * Set the mode of operation: still image capturing or video recording.
-   * Setting the mode will create and destroy image bin or video bin elements
-   * according to the mode. You can set this property at any time, changing
-   * the mode will stop ongoing capture.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_MODE,
-      g_param_spec_enum ("mode", "Mode",
-          "The capture mode (still image capture or video recording)",
-          GST_TYPE_CAMERABIN_MODE, DEFAULT_MODE, G_PARAM_READWRITE));
-
-  /**
-   * GstCameraBin:mute:
-   *
-   * Mute audio in video recording mode.
-   * Set this property only when #GstCameraBin is in READY, PAUSED or PLAYING.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_MUTE,
-      g_param_spec_boolean ("mute", "Mute",
-          "True to mute the recording. False to record with audio",
-          ARG_DEFAULT_MUTE, G_PARAM_READWRITE));
-
-  /**
-   * GstCameraBin:zoom:
-   *
-   * Set up the zoom applied to the frames.
-   * Set this property only when #GstCameraBin is in READY, PAUSED or PLAYING.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_ZOOM,
-      g_param_spec_int ("zoom", "Zoom",
-          "The zoom. 100 for 1x, 200 for 2x and so on",
-          MIN_ZOOM, MAX_ZOOM, DEFAULT_ZOOM, G_PARAM_READWRITE));
-
-  /**
-   * GstCameraBin:imagepp:
-   *
-   * Set up an element to do image post processing.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-  g_object_class_install_property (gobject_class, ARG_IMAGE_POST,
-      g_param_spec_object ("imagepp", "Image post processing element",
-          "Image Post-Processing GStreamer element (default is NULL)",
-          GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-
-  /**
-   *  GstCameraBin:imageenc:
-   *
-   * Set up an image encoder (for example, jpegenc or pngenc) element.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_IMAGE_ENC,
-      g_param_spec_object ("imageenc", "Image encoder",
-          "Image encoder GStreamer element (default is jpegenc)",
-          GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-
-  /**
-   *  GstCameraBin:videopp:
-   *
-   * Set up an element to do video post processing.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_VIDEO_POST,
-      g_param_spec_object ("videopp", "Video post processing element",
-          "Video post processing GStreamer element (default is NULL)",
-          GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-
-  /**
-   *  GstCameraBin:videoenc:
-   *
-   * Set up a video encoder element.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_VIDEO_ENC,
-      g_param_spec_object ("videoenc", "Video encoder",
-          "Video encoder GStreamer element (default is theoraenc)",
-          GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-
-  /**
-   *  GstCameraBin:audioenc:
-   *
-   * Set up an audio encoder element.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_AUDIO_ENC,
-      g_param_spec_object ("audioenc", "Audio encoder",
-          "Audio encoder GStreamer element (default is vorbisenc)",
-          GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-
-  /**
-   *  GstCameraBin:videomux:
-   *
-   * Set up a video muxer element.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_VIDEO_MUX,
-      g_param_spec_object ("videomux", "Video muxer",
-          "Video muxer GStreamer element (default is oggmux)",
-          GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-
-  /**
-   *  GstCameraBin:vfsink:
-   *
-   * Set up a sink element to render frames in view finder.
-   * By default "autovideosink" will be the sink element.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_VF_SINK,
-      g_param_spec_object ("vfsink", "View finder sink",
-          "View finder sink GStreamer element (default is " DEFAULT_VIEW_SINK
-          ")", GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-
-  /**
-   *  GstCameraBin:videosrc:
-   *
-   * Set up a video source element.
-   * By default "v4l2src" will be the src element.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_VIDEO_SRC,
-      g_param_spec_object ("videosrc", "Video source element",
-          "Video source GStreamer element (default is " DEFAULT_SRC_VID_SRC ")",
-          GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-  /**
-   *  GstCameraBin:audiosrc:
-   *
-   * Set up an audio source element.
-   * By default "pulsesrc" will be the source element.
-   * This property can only be set while #GstCameraBin is in NULL state.
-   * The ownership of the element will be taken by #GstCameraBin.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_AUDIO_SRC,
-      g_param_spec_object ("audiosrc", "Audio source element",
-          "Audio source GStreamer element (default is pulsesrc)",
-          GST_TYPE_ELEMENT, G_PARAM_READWRITE));
-
-  /**
-   * GstCameraBin:inputcaps:
-   *
-   * The allowed modes of operation of the video source. Have in mind that it
-   * doesn't mean #GstCameraBin can operate in all those modes,
-   * it depends also on the other elements in the pipeline. Remember to
-   * gst_caps_unref after using it.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_INPUT_CAPS,
-      g_param_spec_boxed ("inputcaps", "Input caps",
-          "The allowed modes of the video source operation",
-          GST_TYPE_CAPS, G_PARAM_READABLE));
-
-  /**
-   * GstCameraBin:filter-caps:
-   *
-   * Filter video source element caps using this property.
-   * This is an alternative to #GstCamerabin::user-res-fps action
-   * signal that allows more fine grained control of video source.
-   */
-
-  g_object_class_install_property (gobject_class, ARG_FILTER_CAPS,
-      g_param_spec_boxed ("filter-caps", "Filter caps",
-          "Capsfilter caps used to control video source operation",
-          GST_TYPE_CAPS, G_PARAM_READWRITE));
-
-  /**
-   * GstCameraBin::user-start:
-   * @camera: the camera bin element
-   *
-   * Starts image capture or video recording depending on the Mode.
-   * If there is a capture already going on, does nothing.
-   * Resumes video recording if it has been paused.
-   */
-
-  camerabin_signals[USER_START_SIGNAL] =
-      g_signal_new ("user-start",
-      G_TYPE_FROM_CLASS (klass),
-      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-      G_STRUCT_OFFSET (GstCameraBinClass, user_start),
-      NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-
-  /**
-   * GstCameraBin::user-stop:
-   * @camera: the camera bin element
-   *
-   * Stops still image preview, continuous image capture and video
-   * recording and returns to the view finder mode.
-   */
-
-  camerabin_signals[USER_STOP_SIGNAL] =
-      g_signal_new ("user-stop",
-      G_TYPE_FROM_CLASS (klass),
-      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-      G_STRUCT_OFFSET (GstCameraBinClass, user_stop),
-      NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-
-  /**
-   * GstCameraBin::user-pause:
-   * @camera: the camera bin element
-   *
-   * Pauses video recording or resumes paused video recording.
-   * If in image mode or not recording, does nothing.
-   */
-
-  camerabin_signals[USER_PAUSE_SIGNAL] =
-      g_signal_new ("user-pause",
-      G_TYPE_FROM_CLASS (klass),
-      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-      G_STRUCT_OFFSET (GstCameraBinClass, user_pause),
-      NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-
-  /**
-   * GstCameraBin::user-res-fps:
-   * @camera: the camera bin element
-   * @width: number of horizontal pixels
-   * @height: number of vertical pixels
-   * @fps_n: frames per second numerator
-   * @fps_d: frames per second denominator
-   *
-   * Changes the frame resolution and frames per second of the video source.
-   * The application must be aware of the resolutions supported by the camera.
-   * Supported resolutions and frame rates can be get using input-caps property.
-   *
-   * Setting @fps_n or @fps_d to 0 configures maximum framerate for the
-   * given resolution, unless in night mode when minimum is configured.
-   */
-
-  camerabin_signals[USER_RES_FPS_SIGNAL] =
-      g_signal_new ("user-res-fps",
-      G_TYPE_FROM_CLASS (klass),
-      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-      G_STRUCT_OFFSET (GstCameraBinClass, user_res_fps),
-      NULL, NULL, gst_camerabin_marshal_VOID__INT_INT_INT_INT, G_TYPE_NONE, 4,
-      G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
-
-  /**
-   * GstCameraBin::user-image-res:
-   * @camera: the camera bin element
-   * @width: number of horizontal pixels
-   * @height: number of vertical pixels
-   *
-   * Changes the resolution used for still image capture.
-   * Does not affect view finder mode and video recording.
-   * Use this action signal in PAUSED or PLAYING state.
-   */
-
-  camerabin_signals[USER_IMAGE_RES_SIGNAL] =
-      g_signal_new ("user-image-res",
-      G_TYPE_FROM_CLASS (klass),
-      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-      G_STRUCT_OFFSET (GstCameraBinClass, user_image_res),
-      NULL, NULL, gst_camerabin_marshal_VOID__INT_INT, G_TYPE_NONE, 2,
-      G_TYPE_INT, G_TYPE_INT);
-
-  /**
-   * GstCameraBin::img-done:
-   * @camera: the camera bin element
-   * @filename: the name of the file just saved
-   *
-   * Signal emited when the file has just been saved. To continue taking
-   * pictures just update @filename and return TRUE, otherwise return FALSE.
-   *
-   * Don't call any #GstCameraBin method from this signal, if you do so there
-   * will be a deadlock.
-   */
-
-  camerabin_signals[IMG_DONE_SIGNAL] =
-      g_signal_new ("img-done", G_TYPE_FROM_CLASS (klass),
-      G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstCameraBinClass, img_done),
-      g_signal_accumulator_true_handled, NULL, gst_marshal_BOOLEAN__POINTER,
-      G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
-
-  klass->user_start = gst_camerabin_user_start;
-  klass->user_stop = gst_camerabin_user_stop;
-  klass->user_pause = gst_camerabin_user_pause;
-  klass->user_res_fps = gst_camerabin_user_res_fps;
-  klass->user_image_res = gst_camerabin_user_image_res;
-
-  klass->img_done = gst_camerabin_default_signal_img_done;
-
-  /* gstelement */
-
-  gstelement_class->change_state =
-      GST_DEBUG_FUNCPTR (gst_camerabin_change_state);
-
-  /* gstbin */
-  /* override handle_message to peek when video or image bin reaches eos */
-  gstbin_class->handle_message =
-      GST_DEBUG_FUNCPTR (gst_camerabin_handle_message_func);
-
-}
-
-/* initialize the new element
- * instantiate pads and add them to element
- * set functions
- * initialize structure
- */
-static void
-gst_camerabin_init (GstCameraBin * camera, GstCameraBinClass * gclass)
-{
-  /* GstElementClass *klass = GST_ELEMENT_GET_CLASS (camera); */
-
-  camera->filename = g_string_new ("");
-  camera->mode = DEFAULT_MODE;
-  camera->num_img_buffers = 0;
-  camera->stop_requested = FALSE;
-  camera->paused = FALSE;
-  camera->capturing = FALSE;
-  camera->night_mode = FALSE;
-
-  camera->width = DEFAULT_WIDTH;
-  camera->height = DEFAULT_HEIGHT;
-  camera->fps_n = DEFAULT_FPS_N;
-  camera->fps_d = DEFAULT_FPS_D;
-
-  camera->image_capture_caps = NULL;
-  camera->view_finder_caps = NULL;
-  camera->allowed_caps = NULL;
-
-  camera->zoom = DEFAULT_ZOOM;
-
-  /* concurrency control */
-  camera->capture_mutex = g_mutex_new ();
-  camera->cond = g_cond_new ();
-
-  /* pad names for output and input selectors */
-  camera->pad_src_view = NULL;
-  camera->pad_view_src = NULL;
-  camera->pad_src_img = NULL;
-  camera->pad_view_img = NULL;
-  camera->pad_src_vid = NULL;
-  camera->pad_view_vid = NULL;
-  camera->srcpad_zoom_filter = NULL;
-
-  /* source elements */
-  camera->src_vid_src = NULL;
-  camera->src_filter = NULL;
-  camera->src_zoom_crop = NULL;
-  camera->src_zoom_scale = NULL;
-  camera->src_zoom_filter = NULL;
-  camera->src_out_sel = NULL;
-
-  camera->user_vf_sink = NULL;
-
-  /* image capture bin */
-  camera->imgbin = g_object_new (GST_TYPE_CAMERABIN_IMAGE, NULL);
-  gst_object_ref (camera->imgbin);
-
-  /* video capture bin */
-  camera->vidbin = g_object_new (GST_TYPE_CAMERABIN_VIDEO, NULL);
-  gst_object_ref (camera->vidbin);
-
-  camera->active_bin = NULL;
-
-  /* view finder elements */
-  camera->view_in_sel = NULL;
-  camera->view_scale = NULL;
-  camera->view_sink = NULL;
-}
-
-static void
-gst_camerabin_dispose (GObject * object)
-{
-  GstCameraBin *camera;
-
-  camera = GST_CAMERABIN (object);
-
-  GST_DEBUG_OBJECT (camera, "disposing");
-
-  gst_element_set_state (camera->imgbin, GST_STATE_NULL);
-  gst_object_unref (camera->imgbin);
-
-  gst_element_set_state (camera->vidbin, GST_STATE_NULL);
-  gst_object_unref (camera->vidbin);
-
-  camerabin_destroy_elements (camera);
-
-  camerabin_dispose_elements (camera);
-
-  G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-gst_camerabin_finalize (GObject * object)
-{
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-gst_camerabin_set_property (GObject * object, guint prop_id,
-    const GValue * value, GParamSpec * pspec)
-{
-  GstCameraBin *camera = GST_CAMERABIN (object);
-
-  switch (prop_id) {
-    case ARG_MUTE:
-      gst_camerabin_video_set_mute (GST_CAMERABIN_VIDEO (camera->vidbin),
-          g_value_get_boolean (value));
-      break;
-    case ARG_ZOOM:
-      g_atomic_int_set (&camera->zoom, g_value_get_int (value));
-      gst_camerabin_setup_zoom (camera);
-      break;
-    case ARG_MODE:
-      gst_camerabin_change_mode (camera, g_value_get_enum (value));
-      break;
-    case ARG_FILENAME:
-      gst_camerabin_change_filename (camera, g_value_get_string (value));
-      break;
-    case ARG_VIDEO_POST:
-      if (GST_STATE (camera->vidbin) != GST_STATE_NULL) {
-        GST_WARNING_OBJECT (camera,
-            "can't use set element until next video bin NULL to READY state change");
-      }
-      gst_camerabin_video_set_post (GST_CAMERABIN_VIDEO (camera->vidbin),
-          g_value_get_object (value));
-      break;
-    case ARG_VIDEO_ENC:
-      if (GST_STATE (camera->vidbin) != GST_STATE_NULL) {
-        GST_WARNING_OBJECT (camera,
-            "can't use set element until next video bin NULL to READY state change");
-      }
-      gst_camerabin_video_set_video_enc (GST_CAMERABIN_VIDEO (camera->vidbin),
-          g_value_get_object (value));
-      break;
-    case ARG_AUDIO_ENC:
-      if (GST_STATE (camera->vidbin) != GST_STATE_NULL) {
-        GST_WARNING_OBJECT (camera,
-            "can't use set element until next video bin NULL to READY state change");
-      }
-      gst_camerabin_video_set_audio_enc (GST_CAMERABIN_VIDEO (camera->vidbin),
-          g_value_get_object (value));
-      break;
-    case ARG_VIDEO_MUX:
-      if (GST_STATE (camera->vidbin) != GST_STATE_NULL) {
-        GST_WARNING_OBJECT (camera->vidbin,
-            "can't use set element until next video bin NULL to READY state change");
-      }
-      gst_camerabin_video_set_muxer (GST_CAMERABIN_VIDEO (camera->vidbin),
-          g_value_get_object (value));
-      break;
-    case ARG_IMAGE_POST:
-      if (GST_STATE (camera->imgbin) != GST_STATE_NULL) {
-        GST_WARNING_OBJECT (camera,
-            "can't use set element until next image bin NULL to READY state change");
-      }
-      gst_camerabin_image_set_postproc (GST_CAMERABIN_IMAGE (camera->imgbin),
-          g_value_get_object (value));
-      break;
-    case ARG_IMAGE_ENC:
-      if (GST_STATE (camera->imgbin) != GST_STATE_NULL) {
-        GST_WARNING_OBJECT (camera,
-            "can't use set element until next image bin NULL to READY state change");
-      }
-      gst_camerabin_image_set_encoder (GST_CAMERABIN_IMAGE (camera->imgbin),
-          g_value_get_object (value));
-      break;
-    case ARG_VF_SINK:
-      if (GST_STATE (camera) != GST_STATE_NULL) {
-        GST_ELEMENT_ERROR (camera, CORE, FAILED,
-            ("camerabin must be in NULL state when setting the view finder element"),
-            (NULL));
-      } else {
-        if (camera->user_vf_sink)
-          gst_object_unref (camera->user_vf_sink);
-        camera->user_vf_sink = g_value_get_object (value);
-        gst_object_ref (camera->user_vf_sink);
-      }
-      break;
-    case ARG_VIDEO_SRC:
-      if (GST_STATE (camera) != GST_STATE_NULL) {
-        GST_ELEMENT_ERROR (camera, CORE, FAILED,
-            ("camerabin must be in NULL state when setting the video source element"),
-            (NULL));
-      } else {
-        if (camera->user_vid_src)
-          gst_object_unref (camera->user_vid_src);
-        camera->user_vid_src = g_value_get_object (value);
-        gst_object_ref (camera->user_vid_src);
-      }
-      break;
-    case ARG_AUDIO_SRC:
-      if (GST_STATE (camera->vidbin) != GST_STATE_NULL) {
-        GST_WARNING_OBJECT (camera,
-            "can't use set element until next video bin NULL to READY state change");
-      }
-      gst_camerabin_video_set_audio_src (GST_CAMERABIN_VIDEO (camera->vidbin),
-          g_value_get_object (value));
-      break;
-    case ARG_FILTER_CAPS:
-      GST_OBJECT_LOCK (camera);
-      if (camera->view_finder_caps) {
-        gst_caps_unref (camera->view_finder_caps);
-      }
-      camera->view_finder_caps = gst_caps_copy (gst_value_get_caps (value));
-      GST_OBJECT_UNLOCK (camera);
-      gst_camerabin_set_capsfilter_caps (camera, camera->view_finder_caps);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-gst_camerabin_get_property (GObject * object, guint prop_id,
-    GValue * value, GParamSpec * pspec)
-{
-  GstCameraBin *camera = GST_CAMERABIN (object);
-
-  switch (prop_id) {
-    case ARG_FILENAME:
-      g_value_set_string (value, camera->filename->str);
-      break;
-    case ARG_MODE:
-      g_value_set_enum (value, camera->mode);
-      break;
-    case ARG_MUTE:
-      g_value_set_boolean (value,
-          gst_camerabin_video_get_mute (GST_CAMERABIN_VIDEO (camera->vidbin)));
-      break;
-    case ARG_ZOOM:
-      g_value_set_int (value, g_atomic_int_get (&camera->zoom));
-      break;
-    case ARG_IMAGE_POST:
-      g_value_set_object (value,
-          gst_camerabin_image_get_postproc (GST_CAMERABIN_IMAGE
-              (camera->imgbin)));
-      break;
-    case ARG_IMAGE_ENC:
-      g_value_set_object (value,
-          gst_camerabin_image_get_encoder (GST_CAMERABIN_IMAGE
-              (camera->imgbin)));
-      break;
-    case ARG_VIDEO_POST:
-      g_value_set_object (value,
-          gst_camerabin_video_get_post (GST_CAMERABIN_VIDEO (camera->vidbin)));
-      break;
-    case ARG_VIDEO_ENC:
-      g_value_set_object (value,
-          gst_camerabin_video_get_video_enc (GST_CAMERABIN_VIDEO
-              (camera->vidbin)));
-      break;
-    case ARG_AUDIO_ENC:
-      g_value_set_object (value,
-          gst_camerabin_video_get_audio_enc (GST_CAMERABIN_VIDEO
-              (camera->vidbin)));
-      break;
-    case ARG_VIDEO_MUX:
-      g_value_set_object (value,
-          gst_camerabin_video_get_muxer (GST_CAMERABIN_VIDEO (camera->vidbin)));
-      break;
-    case ARG_VF_SINK:
-      g_value_set_object (value, camera->user_vf_sink);
-      break;
-    case ARG_VIDEO_SRC:
-      g_value_set_object (value, camera->src_vid_src);
-      break;
-    case ARG_AUDIO_SRC:
-      g_value_set_object (value,
-          gst_camerabin_video_get_audio_src (GST_CAMERABIN_VIDEO
-              (camera->vidbin)));
-      break;
-    case ARG_INPUT_CAPS:
-      gst_value_set_caps (value, gst_camerabin_get_allowed_input_caps (camera));
-      break;
-    case ARG_FILTER_CAPS:
-      gst_value_set_caps (value, camera->view_finder_caps);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-/*
- * GstElement functions implementation
- */
-
-static GstStateChangeReturn
-gst_camerabin_change_state (GstElement * element, GstStateChange transition)
-{
-  GstCameraBin *camera = GST_CAMERABIN (element);
-  GstStateChangeReturn ret;
-
-  switch (transition) {
-    case GST_STATE_CHANGE_NULL_TO_READY:
-      if (!camerabin_create_elements (camera)) {
-        ret = GST_STATE_CHANGE_FAILURE;
-        goto done;
-      }
-      /* Lock to control image and video bin state separately
-         from view finder */
-      gst_element_set_locked_state (camera->imgbin, TRUE);
-      gst_element_set_locked_state (camera->vidbin, TRUE);
-      break;
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-      camerabin_setup_src_elements (camera);
-      break;
-    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-      /* If using autovideosink, set view finder sink properties
-         now that actual sink has been created. */
-      camerabin_setup_view_elements (camera);
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      gst_element_set_locked_state (camera->imgbin, FALSE);
-      gst_element_set_locked_state (camera->vidbin, FALSE);
-      break;
-    default:
-      break;
-  }
-
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      GST_LOG_OBJECT (camera, "PAUSED to READY");
-      g_mutex_lock (camera->capture_mutex);
-      if (camera->capturing) {
-        GST_WARNING_OBJECT (camera, "was capturing when changing to READY");
-        camera->capturing = FALSE;
-        /* Reset capture and don't wait for capturing to finish properly.
-           Proper capturing should have been finished before going to READY. */
-        gst_camerabin_reset_to_view_finder (camera);
-        g_cond_signal (camera->cond);
-      }
-      g_mutex_unlock (camera->capture_mutex);
-      break;
-    case GST_STATE_CHANGE_READY_TO_NULL:
-      camerabin_destroy_elements (camera);
-      break;
-    default:
-      break;
-  }
-
-done:
-
-  return ret;
-}
-
-/*
- * GstBin functions implementation
- */
-
-/* Peek eos messages but don't interfere with bin msg handling */
-static void
-gst_camerabin_handle_message_func (GstBin * bin, GstMessage * msg)
-{
-  GstCameraBin *camera = GST_CAMERABIN (bin);
-
-  switch (GST_MESSAGE_TYPE (msg)) {
-    case GST_MESSAGE_EOS:
-      if (GST_MESSAGE_SRC (msg) == GST_OBJECT (camera->vidbin)) {
-        /* Video eos */
-        GST_DEBUG_OBJECT (camera,
-            "got video eos message, stopping video capture");
-        g_mutex_lock (camera->capture_mutex);
-        camera->capturing = FALSE;
-        g_cond_signal (camera->cond);
-        g_mutex_unlock (camera->capture_mutex);
-      } else if (GST_MESSAGE_SRC (msg) == GST_OBJECT (camera->imgbin)) {
-        /* Image eos */
-        GST_DEBUG_OBJECT (camera, "got image eos message");
-        /* Unblock pad to process next buffer */
-        gst_pad_set_blocked_async (camera->pad_src_img, FALSE,
-            (GstPadBlockCallback) image_pad_blocked, camera);
-      }
-      break;
-    default:
-      break;
-  }
-  GST_BIN_CLASS (parent_class)->handle_message (bin, msg);
-}
-
-/*
- * Action signal function implementation
- */
-
-static void
-gst_camerabin_user_start (GstCameraBin * camera)
-{
-
-  GST_INFO_OBJECT (camera, "starting capture");
-  if (camera->paused) {
-    gst_camerabin_user_pause (camera);
-    return;
-  }
-
-  if (!camera->active_bin) {
-    GST_INFO_OBJECT (camera, "mode not explicitly set by application");
-    gst_camerabin_change_mode (camera, camera->mode);
-  }
-
-  if (g_str_equal (camera->filename->str, "")) {
-    GST_ELEMENT_ERROR (camera, CORE, FAILED,
-        ("set filename before starting capture"), (NULL));
-    return;
-  }
-
-  g_mutex_lock (camera->capture_mutex);
-  if (camera->capturing) {
-    GST_WARNING_OBJECT (camera, "capturing \"%s\" ongoing, set new filename",
-        camera->filename->str);
-    g_mutex_unlock (camera->capture_mutex);
-    return;
-  }
-  g_mutex_unlock (camera->capture_mutex);
-
-  g_object_set (G_OBJECT (camera->active_bin), "filename",
-      camera->filename->str, NULL);
-
-  if (camera->active_bin == camera->imgbin) {
-    gst_camerabin_start_image_capture (camera);
-  } else if (camera->active_bin == camera->vidbin) {
-    gst_camerabin_start_video_recording (camera);
-  }
-}
-
-static void
-gst_camerabin_user_stop (GstCameraBin * camera)
-{
-  GST_INFO_OBJECT (camera, "stopping %s capture",
-      camera->mode ? "video" : "image");
-  gst_camerabin_do_stop (camera);
-  gst_camerabin_reset_to_view_finder (camera);
-}
-
-static void
-gst_camerabin_user_pause (GstCameraBin * camera)
-{
-  if (camera->active_bin == camera->vidbin) {
-    if (!camera->paused) {
-      GST_INFO_OBJECT (camera, "pausing capture");
-
-      /* Bring all camerabin elements to PAUSED */
-      gst_element_set_locked_state (camera->vidbin, FALSE);
-      gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PAUSED);
-
-      /* Switch to view finder mode */
-      g_object_set (G_OBJECT (camera->src_out_sel), "resend-latest", FALSE,
-          "active-pad", camera->pad_src_view, NULL);
-
-      /* Enable view finder mode in v4l2camsrc */
-      if (g_object_class_find_property (G_OBJECT_GET_CLASS
-              (camera->src_vid_src), "capture-mode")) {
-        g_object_set (G_OBJECT (camera->src_vid_src), "capture-mode", 0, NULL);
-      }
-
-      /* Set view finder to PLAYING and leave videobin PAUSED */
-      gst_element_set_locked_state (camera->vidbin, TRUE);
-      gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING);
-
-      camera->paused = TRUE;
-    } else {
-      GST_INFO_OBJECT (camera, "unpausing capture");
-
-      /* Bring all camerabin elements to PAUSED */
-      gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PAUSED);
-
-      /* Switch to video recording mode */
-      g_object_set (G_OBJECT (camera->src_out_sel), "resend-latest", TRUE,
-          "active-pad", camera->pad_src_vid, NULL);
-
-      /* Enable video recording mode in v4l2camsrc */
-      if (g_object_class_find_property (G_OBJECT_GET_CLASS
-              (camera->src_vid_src), "capture-mode")) {
-        g_object_set (G_OBJECT (camera->src_vid_src), "capture-mode", 2, NULL);
-      }
-
-      /* Bring all camerabin elements to PLAYING */
-      gst_element_set_locked_state (camera->vidbin, FALSE);
-      gst_element_set_state (GST_ELEMENT (camera), GST_STATE_PLAYING);
-      gst_element_set_locked_state (camera->vidbin, TRUE);
-
-      camera->paused = FALSE;
-    }
-    GST_DEBUG_OBJECT (camera, "pause done");
-  } else {
-    GST_WARNING ("pausing in image capture mode disabled");
-  }
-}
-
-static void
-gst_camerabin_user_res_fps (GstCameraBin * camera, gint width, gint height,
-    gint fps_n, gint fps_d)
-{
-  GstState state;
-
-  GST_INFO_OBJECT (camera, "switching resolution to %dx%d and fps to %d/%d",
-      width, height, fps_n, fps_d);
-
-  state = GST_STATE (camera);
-  gst_element_set_state (GST_ELEMENT (camera), GST_STATE_READY);
-  camera->width = width;
-  camera->height = height;
-  camera->fps_n = fps_n;
-  camera->fps_d = fps_d;
-  gst_element_set_state (GST_ELEMENT (camera), state);
-}
-
-static void
-gst_camerabin_user_image_res (GstCameraBin * camera, gint width, gint height)
-{
-  GstStructure *structure;
-  GstCaps *new_caps = NULL;
-  guint32 format = 0;
-
-  g_return_if_fail (camera != NULL);
-
-  if (width && height && camera->view_finder_caps) {
-    /* Use view finder mode caps as a basis */
-    structure = gst_caps_get_structure (camera->view_finder_caps, 0);
-
-    /* Set new resolution for image capture */
-    new_caps = gst_caps_new_simple (gst_structure_get_name (structure),
-        "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, NULL);
-
-    /* Set format according to current videosrc format */
-    format = get_srcpad_current_format (camera->src_vid_src);
-    if (format) {
-      gst_caps_set_simple (new_caps, "format", GST_TYPE_FOURCC, format, NULL);
-    }
-
-    /* Set allowed framerate for the resolution. */
-    gst_camerabin_set_allowed_framerate (camera, new_caps);
-
-    /* Reset the format to match with view finder mode caps */
-    if (gst_structure_get_fourcc (structure, "format", &format)) {
-      gst_caps_set_simple (new_caps, "format", GST_TYPE_FOURCC, format, NULL);
-    }
-  }
-
-  GST_INFO_OBJECT (camera,
-      "init filter caps for image capture %" GST_PTR_FORMAT, new_caps);
-  gst_caps_replace (&camera->image_capture_caps, new_caps);
-}
-
-/* entry point to initialize the plug-in
- * initialize the plug-in itself
- * register the element factories and pad templates
- * register the features
- */
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-  GST_DEBUG_CATEGORY_INIT (gst_camerabin_debug, "camerabin", 0, "CameraBin");
-
-  return gst_element_register (plugin, "camerabin",
-      GST_RANK_NONE, GST_TYPE_CAMERABIN);
-}
-
-/* this is the structure that gstreamer looks for to register plugins
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    "camerabin",
-    "High level api for DC (Digital Camera) application",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
--- a/gst_plugins_good/gst/camerabin/gstcamerabin.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GST_CAMERABIN_H__
-#define __GST_CAMERABIN_H__
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <gst/gstbin.h>
-#include <gst/interfaces/photography.h>
-
-#include "camerabinimage.h"
-#include "camerabinvideo.h"
-
-G_BEGIN_DECLS
-
-/* #defines don't like whitespacey bits */
-#define GST_TYPE_CAMERABIN \
-  (gst_camerabin_get_type())
-#define GST_CAMERABIN(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CAMERABIN,GstCameraBin))
-#define GST_CAMERABIN_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CAMERABIN,GstCameraBinClass))
-#define GST_IS_CAMERABIN(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CAMERABIN))
-#define GST_IS_CAMERABIN_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CAMERABIN))
-
-typedef struct _GstCameraBin GstCameraBin;
-typedef struct _GstCameraBinClass GstCameraBinClass;
-
-/**
- * GstCameraBin:
- *
- * The opaque #GstCameraBin structure.
- */
-
-struct _GstCameraBin
-{
-  GstPipeline parent;
-
-  /* private */
-  GString *filename;
-  gint mode;                    /* MODE_IMAGE or MODE_VIDEO */
-  guint num_img_buffers;        /* no of image buffers captured */
-  gboolean stop_requested;      /* TRUE if capturing stop needed */
-  gboolean paused;              /* TRUE if capturing paused */
-
-  /* resolution and frames per second of image captured by v4l2 device */
-  gint width;
-  gint height;
-  gint fps_n;
-  gint fps_d;
-
-  /* Caps applied to capsfilters when taking still image */
-  GstCaps *image_capture_caps;
-
-  /* Caps applied to capsfilters when in view finder mode */
-  GstCaps *view_finder_caps;
-
-  /* Caps that videosrc supports */
-  GstCaps *allowed_caps;
-
-  /* The digital zoom (from 100% to 1000%) */
-  gint zoom;
-
-  /* concurrency control */
-  GMutex *capture_mutex;
-  GCond *cond;
-  gboolean capturing;
-
-  /* pad names for output and input selectors */
-  GstPad *pad_src_view;
-  GstPad *pad_view_src;
-  GstPad *pad_src_img;
-  GstPad *pad_view_img;
-  GstPad *pad_src_vid;
-  GstPad *pad_view_vid;
-
-  GstPad *srcpad_zoom_filter;
-
-  GstElement *imgbin;           /* bin that holds image capturing elements */
-  GstElement *vidbin;           /*  bin that holds video capturing elements */
-  GstElement *active_bin;       /* image or video bin that is currently in use */
-
-  /* source elements */
-  GstElement *src_vid_src;
-  GstElement *src_filter;
-  GstElement *src_zoom_crop;
-  GstElement *src_zoom_scale;
-  GstElement *src_zoom_filter;
-  GstElement *src_out_sel;
-
-  /* view finder elements */
-  GstElement *view_in_sel;
-  GstElement *view_scale;
-  GstElement *view_sink;
-
-  /* User configurable elements */
-  GstElement *user_vid_src;
-  GstElement *user_vf_sink;
-
-  /* Night mode handling */
-  gboolean night_mode;
-  gint pre_night_fps_n;
-  gint pre_night_fps_d;
-};
-
-/**
- * GstCameraBinClass:
- *
- * The #GstCameraBin class structure.
- */
-struct _GstCameraBinClass
-{
-  GstPipelineClass parent_class;
-
-  /* action signals */
-
-  void (*user_start) (GstCameraBin * camera);
-  void (*user_stop) (GstCameraBin * camera);
-  void (*user_pause) (GstCameraBin * camera);
-  void (*user_res_fps) (GstCameraBin * camera, gint width, gint height,
-      gint fps_n, gint fps_d);
-  void (*user_image_res) (GstCameraBin * camera, gint width, gint height);
-
-  /* signals (callback) */
-
-    gboolean (*img_done) (GstCameraBin * camera, GString * filename);
-};
-
-/**
- * GstCameraBinMode:
- * @MODE_IMAGE: image capture
- * @MODE_VIDEO: video capture
- *
- * Capture mode to use.
- */
-typedef enum
-{
-  MODE_IMAGE = 0,
-  MODE_VIDEO
-} GstCameraBinMode;
-
-#ifdef __SYMBIAN32__
-IMPORT_C
-#endif
-GType gst_camerabin_get_type (void);
-
-G_END_DECLS
-
-#endif /* #ifndef __GST_CAMERABIN_H__ */
--- a/gst_plugins_good/gst/camerabin/gstcamerabincolorbalance.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Includes
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gstcamerabincolorbalance.h"
-#include "gstcamerabin.h"
-
-/*
- * static functions implementation
- */
-
-static const GList *
-gst_camerabin_color_balance_list_channels (GstColorBalance * cb)
-{
-  if (cb && GST_CAMERABIN (cb)->src_vid_src) {
-    GstColorBalance *cbl = GST_COLOR_BALANCE (GST_CAMERABIN (cb)->src_vid_src);
-    return gst_color_balance_list_channels (cbl);
-  } else {
-    return NULL;
-  }
-}
-
-static void
-gst_camerabin_color_balance_set_value (GstColorBalance * cb,
-    GstColorBalanceChannel * channel, gint value)
-{
-  if (cb && GST_CAMERABIN (cb)->src_vid_src) {
-    GstColorBalance *cbl = GST_COLOR_BALANCE (GST_CAMERABIN (cb)->src_vid_src);
-    gst_color_balance_set_value (cbl, channel, value);
-  }
-}
-
-static gint
-gst_camerabin_color_balance_get_value (GstColorBalance * cb,
-    GstColorBalanceChannel * channel)
-{
-  if (cb && GST_CAMERABIN (cb)->src_vid_src) {
-    GstColorBalance *cbl = GST_COLOR_BALANCE (GST_CAMERABIN (cb)->src_vid_src);
-    return gst_color_balance_get_value (cbl, channel);
-  } else {
-    return 0;
-  }
-}
-
-/*
- * extern functions implementation
- */
-
-void
-gst_camerabin_color_balance_init (GstColorBalanceClass * iface)
-{
-  /* FIXME: to get the same type as v4l2src */
-  GST_COLOR_BALANCE_TYPE (iface) = GST_COLOR_BALANCE_HARDWARE;
-  iface->list_channels = gst_camerabin_color_balance_list_channels;
-  iface->set_value = gst_camerabin_color_balance_set_value;
-  iface->get_value = gst_camerabin_color_balance_get_value;
-}
--- a/gst_plugins_good/gst/camerabin/gstcamerabincolorbalance.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GST_CAMERA_COLOR_BALANCE_H__
-#define __GST_CAMERA_COLOR_BALANCE_H__
-
-#include <gst/interfaces/colorbalance.h>
-
-extern void gst_camerabin_color_balance_init (GstColorBalanceClass * iface);
-
-#endif /* #ifndef __GST_CAMERA_COLOR_BALANCE_H__ */
--- a/gst_plugins_good/gst/camerabin/gstcamerabinphotography.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * Photography interface implementation for camerabin.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gstcamerabinphotography.h"
-#include "gstcamerabin.h"
-
-GST_DEBUG_CATEGORY_STATIC (camerabinphoto_debug);
-#define GST_CAT_DEFAULT camerabinphoto_debug
-
-#define PHOTOGRAPHY_IS_OK(photo_elem) (GST_IS_ELEMENT (photo_elem) && \
-                                       gst_element_implements_interface (photo_elem, GST_TYPE_PHOTOGRAPHY))
-
-#define GST_PHOTOGRAPHY_IMPL_TEMPLATE(function_name, param_type) \
-static gboolean \
-gst_camerabin_set_ ## function_name (GstPhotography *photo, param_type param) \
-{ \
-  GstCameraBin *camera; \
-  gboolean ret = FALSE; \
-  g_return_val_if_fail (photo != NULL, FALSE); \
-  camera = GST_CAMERABIN (photo); \
-  if (PHOTOGRAPHY_IS_OK (camera->src_vid_src)) { \
-    ret = gst_photography_set_ ## function_name (GST_PHOTOGRAPHY (camera->src_vid_src), param); \
-  } \
-  return ret; \
-} \
-static gboolean \
-gst_camerabin_get_ ## function_name (GstPhotography *photo, param_type * param) \
-{ \
-  GstCameraBin *camera; \
-  gboolean ret = FALSE; \
-  g_return_val_if_fail (photo != NULL, FALSE); \
-  camera = GST_CAMERABIN (photo); \
-  if (PHOTOGRAPHY_IS_OK (camera->src_vid_src)) { \
-    ret = gst_photography_get_ ## function_name (GST_PHOTOGRAPHY (camera->src_vid_src), param); \
-  } \
-  return ret; \
-}
-
-GST_PHOTOGRAPHY_IMPL_TEMPLATE (ev_compensation, gfloat);
-GST_PHOTOGRAPHY_IMPL_TEMPLATE (iso_speed, guint);
-GST_PHOTOGRAPHY_IMPL_TEMPLATE (white_balance_mode, GstWhiteBalanceMode);
-GST_PHOTOGRAPHY_IMPL_TEMPLATE (colour_tone_mode, GstColourToneMode);
-GST_PHOTOGRAPHY_IMPL_TEMPLATE (flash_mode, GstFlashMode);
-
-static gboolean
-gst_camerabin_set_zoom (GstPhotography * photo, gfloat zoom)
-{
-  GstCameraBin *camera;
-
-  g_return_val_if_fail (photo != NULL, FALSE);
-
-  camera = GST_CAMERABIN (photo);
-
-  /* camerabin can zoom by itself */
-  g_object_set (camera, "zoom", (gint) (CLAMP (zoom, 1.0, 10.0) * 100), NULL);
-
-  return TRUE;
-}
-
-static gboolean
-gst_camerabin_get_zoom (GstPhotography * photo, gfloat * zoom)
-{
-  GstCameraBin *camera;
-  gint cb_zoom = 0;
-
-  g_return_val_if_fail (photo != NULL, FALSE);
-
-  camera = GST_CAMERABIN (photo);
-
-  g_object_get (camera, "zoom", &cb_zoom, NULL);
-  *zoom = (gfloat) (cb_zoom / 100.0);
-
-  return TRUE;
-}
-
-static gboolean
-gst_camerabin_set_scene_mode (GstPhotography * photo, GstSceneMode scene_mode)
-{
-  GstCameraBin *camera;
-  gboolean ret = FALSE;
-
-  g_return_val_if_fail (photo != NULL, FALSE);
-
-  camera = GST_CAMERABIN (photo);
-
-  if (scene_mode == GST_PHOTOGRAPHY_SCENE_MODE_NIGHT) {
-    GST_DEBUG ("enabling night mode, lowering fps");
-    /* Make camerabin select the lowest allowed frame rate */
-    camera->night_mode = TRUE;
-    /* Remember frame rate before setting night mode */
-    camera->pre_night_fps_n = camera->fps_n;
-    camera->pre_night_fps_d = camera->fps_d;
-    g_signal_emit_by_name (camera, "user-res-fps", camera->width,
-        camera->height, 0, 0, 0);
-  } else {
-    if (camera->night_mode) {
-      GST_DEBUG ("disabling night mode, restoring fps to %d/%d",
-          camera->pre_night_fps_n, camera->pre_night_fps_d);
-      camera->night_mode = FALSE;
-      g_signal_emit_by_name (camera, "user-res-fps", camera->width,
-          camera->height, camera->pre_night_fps_n, camera->pre_night_fps_d, 0);
-    }
-  }
-
-  if (PHOTOGRAPHY_IS_OK (camera->src_vid_src)) {
-    ret = gst_photography_set_scene_mode (GST_PHOTOGRAPHY (camera->src_vid_src),
-        scene_mode);
-  }
-  return ret;
-}
-
-static gboolean
-gst_camerabin_get_scene_mode (GstPhotography * photo, GstSceneMode * scene_mode)
-{
-  GstCameraBin *camera;
-  gboolean ret = FALSE;
-
-  g_return_val_if_fail (photo != NULL, FALSE);
-
-  camera = GST_CAMERABIN (photo);
-
-  if (PHOTOGRAPHY_IS_OK (camera->src_vid_src)) {
-    ret = gst_photography_get_scene_mode (GST_PHOTOGRAPHY (camera->src_vid_src),
-        scene_mode);
-  }
-  return ret;
-}
-
-static GstPhotoCaps
-gst_camerabin_get_capabilities (GstPhotography * photo)
-{
-  GstCameraBin *camera;
-  /* camerabin can zoom by itself */
-  GstPhotoCaps pcaps = GST_PHOTOGRAPHY_CAPS_ZOOM;
-
-  g_return_val_if_fail (photo != NULL, FALSE);
-
-  camera = GST_CAMERABIN (photo);
-
-  if (GST_IS_ELEMENT (camera->src_vid_src) &&
-      gst_element_implements_interface (camera->src_vid_src,
-          GST_TYPE_PHOTOGRAPHY)) {
-    GstPhotography *p2 = GST_PHOTOGRAPHY (camera->src_vid_src);
-    pcaps |= gst_photography_get_capabilities (p2);
-  }
-
-  return pcaps;
-}
-
-static void
-gst_camerabin_set_autofocus (GstPhotography * photo, gboolean on)
-{
-  GstCameraBin *camera;
-
-  g_return_if_fail (photo != NULL);
-
-  camera = GST_CAMERABIN (photo);
-
-  GST_DEBUG_OBJECT (camera, "setting autofocus %s", on ? "ON" : "OFF");
-
-  if (PHOTOGRAPHY_IS_OK (camera->src_vid_src)) {
-    gst_photography_set_autofocus (GST_PHOTOGRAPHY (camera->src_vid_src), on);
-  }
-}
-
-
-void
-gst_camerabin_photography_init (GstPhotographyInterface * iface)
-{
-  GST_DEBUG_CATEGORY_INIT (camerabinphoto_debug, "camerabinphoto", 0,
-      "Camerabin photography interface debugging");
-
-  GST_INFO ("initing");
-
-  iface->set_ev_compensation = gst_camerabin_set_ev_compensation;
-  iface->get_ev_compensation = gst_camerabin_get_ev_compensation;
-
-  iface->set_iso_speed = gst_camerabin_set_iso_speed;
-  iface->get_iso_speed = gst_camerabin_get_iso_speed;
-
-  iface->set_white_balance_mode = gst_camerabin_set_white_balance_mode;
-  iface->get_white_balance_mode = gst_camerabin_get_white_balance_mode;
-
-  iface->set_colour_tone_mode = gst_camerabin_set_colour_tone_mode;
-  iface->get_colour_tone_mode = gst_camerabin_get_colour_tone_mode;
-
-  iface->set_scene_mode = gst_camerabin_set_scene_mode;
-  iface->get_scene_mode = gst_camerabin_get_scene_mode;
-
-  iface->set_flash_mode = gst_camerabin_set_flash_mode;
-  iface->get_flash_mode = gst_camerabin_get_flash_mode;
-
-  iface->set_zoom = gst_camerabin_set_zoom;
-  iface->get_zoom = gst_camerabin_get_zoom;
-
-  iface->get_capabilities = gst_camerabin_get_capabilities;
-
-  iface->set_autofocus = gst_camerabin_set_autofocus;
-}
--- a/gst_plugins_good/gst/camerabin/gstcamerabinphotography.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * Photography interface implementation for camerabin
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GST_CAMERABIN_PHOTOGRAPHY_H__
-#define __GST_CAMERABIN_PHOTOGRAPHY_H__
-
-#include <gst/interfaces/photography.h>
-
-void gst_camerabin_photography_init (GstPhotographyInterface * iface);
-
-#endif /* #ifndef __GST_CAMERABIN_PHOTOGRAPHY_H__ */
--- a/gst_plugins_good/gst/camerabin/gstcamerabinxoverlay.c	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Includes
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gstcamerabinxoverlay.h"
-#include "gstcamerabin.h"
-
-/*
- * static functions implementation
- */
-
-static void
-gst_camerabin_expose (GstXOverlay * overlay)
-{
-  if (overlay && GST_CAMERABIN (overlay)->view_sink) {
-    GstXOverlay *xoverlay = GST_X_OVERLAY (GST_CAMERABIN (overlay)->view_sink);
-    gst_x_overlay_expose (xoverlay);
-  }
-}
-
-static void
-gst_camerabin_set_xwindow_id (GstXOverlay * overlay, gulong xwindow_id)
-{
-  if (overlay && GST_CAMERABIN (overlay)->view_sink) {
-    GstXOverlay *xoverlay = GST_X_OVERLAY (GST_CAMERABIN (overlay)->view_sink);
-    gst_x_overlay_set_xwindow_id (xoverlay, xwindow_id);
-  }
-}
-
-static void
-gst_camerabin_set_event_handling (GstXOverlay * overlay, gboolean handle_events)
-{
-  if (overlay && GST_CAMERABIN (overlay)->view_sink) {
-    GstXOverlay *xoverlay = GST_X_OVERLAY (GST_CAMERABIN (overlay)->view_sink);
-    gst_x_overlay_handle_events (xoverlay, handle_events);
-  }
-}
-
-/*
- * extern functions implementation
- */
-
-void
-gst_camerabin_xoverlay_init (GstXOverlayClass * iface)
-{
-  iface->set_xwindow_id = gst_camerabin_set_xwindow_id;
-  iface->expose = gst_camerabin_expose;
-  iface->handle_events = gst_camerabin_set_event_handling;
-}
--- a/gst_plugins_good/gst/camerabin/gstcamerabinxoverlay.h	Fri Jun 11 16:24:58 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
- * GStreamer
- * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GST_CAMERAXOVERLAY_H__
-#define __GST_CAMERAXOVERLAY_H__
-
-#include <gst/interfaces/xoverlay.h>
-
-extern void gst_camerabin_xoverlay_init (GstXOverlayClass * iface);
-
-#endif /* #ifndef __GST_CAMERAXOVERLAY_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/gst/mpegaudioparse/gstmpegaudioparse.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,2199 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2006-2007> Jan Schmidt <thaytan@mad.scientist.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "../../config.h"
+#endif
+
+#include <string.h>
+
+#include "gstmpegaudioparse.h"
+
+GST_DEBUG_CATEGORY_STATIC (mp3parse_debug);
+#define GST_CAT_DEFAULT mp3parse_debug
+
+#define MP3_CHANNEL_MODE_UNKNOWN -1
+#define MP3_CHANNEL_MODE_STEREO 0
+#define MP3_CHANNEL_MODE_JOINT_STEREO 1
+#define MP3_CHANNEL_MODE_DUAL_CHANNEL 2
+#define MP3_CHANNEL_MODE_MONO 3
+
+#define CRC_UNKNOWN -1
+#define CRC_PROTECTED 0
+#define CRC_NOT_PROTECTED 1
+
+#define XING_FRAMES_FLAG     0x0001
+#define XING_BYTES_FLAG      0x0002
+#define XING_TOC_FLAG        0x0004
+#define XING_VBR_SCALE_FLAG  0x0008
+
+#ifndef GST_READ_UINT24_BE
+#define GST_READ_UINT24_BE(p) (p[2] | (p[1] << 8) | (p[0] << 16))
+#endif
+
+/* Minimum number of consecutive, valid-looking frames to consider
+   for resyncing */
+#define MIN_RESYNC_FRAMES 3
+
+static inline MPEGAudioSeekEntry *
+mpeg_audio_seek_entry_new ()
+{
+  return g_slice_new (MPEGAudioSeekEntry);
+}
+
+static inline void
+mpeg_audio_seek_entry_free (MPEGAudioSeekEntry * entry)
+{
+  g_slice_free (MPEGAudioSeekEntry, entry);
+}
+
+/* elementfactory information */
+static GstElementDetails mp3parse_details = {
+  "MPEG1 Audio Parser",
+  "Codec/Parser/Audio",
+  "Parses and frames mpeg1 audio streams (levels 1-3), provides seek",
+  "Jan Schmidt <thaytan@mad.scientist.com>\n"
+      "Erik Walthinsen <omega@cse.ogi.edu>"
+};
+
+static GstStaticPadTemplate mp3_src_template = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("audio/mpeg, "
+        "mpegversion = (int) 1, "
+        "layer = (int) [ 1, 3 ], "
+        "rate = (int) [ 8000, 48000 ], channels = (int) [ 1, 2 ],"
+        "parsed=(boolean) true")
+    );
+
+static GstStaticPadTemplate mp3_sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("audio/mpeg, mpegversion = (int) 1, parsed=(boolean)false")
+    );
+
+/* GstMPEGAudioParse signals and args */
+enum
+{
+  /* FILL ME */
+  LAST_SIGNAL
+};
+
+enum
+{
+  ARG_0,
+  ARG_SKIP,
+  ARG_BIT_RATE
+      /* FILL ME */
+};
+
+
+static void gst_mp3parse_class_init (GstMPEGAudioParseClass * klass);
+static void gst_mp3parse_base_init (gpointer klass);
+static void gst_mp3parse_init (GstMPEGAudioParse * mp3parse,
+    GstMPEGAudioParseClass * klass);
+
+static gboolean gst_mp3parse_sink_event (GstPad * pad, GstEvent * event);
+static GstFlowReturn gst_mp3parse_chain (GstPad * pad, GstBuffer * buffer);
+static gboolean mp3parse_src_query (GstPad * pad, GstQuery * query);
+static const GstQueryType *mp3parse_get_query_types (GstPad * pad);
+static gboolean mp3parse_src_event (GstPad * pad, GstEvent * event);
+
+static int head_check (GstMPEGAudioParse * mp3parse, unsigned long head);
+
+static void gst_mp3parse_dispose (GObject * object);
+static void gst_mp3parse_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_mp3parse_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+static GstStateChangeReturn gst_mp3parse_change_state (GstElement * element,
+    GstStateChange transition);
+static GstFlowReturn
+gst_mp3parse_handle_data (GstMPEGAudioParse * mp3parse, gboolean at_eos);
+
+static gboolean mp3parse_bytepos_to_time (GstMPEGAudioParse * mp3parse,
+    gint64 bytepos, GstClockTime * ts, gboolean from_total_time);
+static gboolean
+mp3parse_total_bytes (GstMPEGAudioParse * mp3parse, gint64 * total);
+static gboolean
+mp3parse_total_time (GstMPEGAudioParse * mp3parse, GstClockTime * total);
+
+GST_BOILERPLATE (GstMPEGAudioParse, gst_mp3parse, GstElement, GST_TYPE_ELEMENT);
+
+#define GST_TYPE_MP3_CHANNEL_MODE (gst_mp3_channel_mode_get_type())
+
+static const GEnumValue mp3_channel_mode[] = {
+  {MP3_CHANNEL_MODE_UNKNOWN, "Unknown", "unknown"},
+  {MP3_CHANNEL_MODE_MONO, "Mono", "mono"},
+  {MP3_CHANNEL_MODE_DUAL_CHANNEL, "Dual Channel", "dual-channel"},
+  {MP3_CHANNEL_MODE_JOINT_STEREO, "Joint Stereo", "joint-stereo"},
+  {MP3_CHANNEL_MODE_STEREO, "Stereo", "stereo"},
+  {0, NULL, NULL},
+};
+
+static GType
+gst_mp3_channel_mode_get_type (void)
+{
+  static GType mp3_channel_mode_type = 0;
+
+  if (!mp3_channel_mode_type) {
+    mp3_channel_mode_type =
+        g_enum_register_static ("GstMp3ChannelMode", mp3_channel_mode);
+  }
+  return mp3_channel_mode_type;
+}
+
+static const gchar *
+gst_mp3_channel_mode_get_nick (gint mode)
+{
+  guint i;
+  for (i = 0; i < G_N_ELEMENTS (mp3_channel_mode); i++) {
+    if (mp3_channel_mode[i].value == mode)
+      return mp3_channel_mode[i].value_nick;
+  }
+  return NULL;
+}
+
+static const guint mp3types_bitrates[2][3][16] = {
+  {
+        {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448,},
+        {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384,},
+        {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320,}
+      },
+  {
+        {0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256,},
+        {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160,},
+        {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160,}
+      },
+};
+
+static const guint mp3types_freqs[3][3] = { {44100, 48000, 32000},
+{22050, 24000, 16000},
+{11025, 12000, 8000}
+};
+
+static inline guint
+mp3_type_frame_length_from_header (GstMPEGAudioParse * mp3parse, guint32 header,
+    guint * put_version, guint * put_layer, guint * put_channels,
+    guint * put_bitrate, guint * put_samplerate, guint * put_mode,
+    guint * put_crc)
+{
+  guint length;
+  gulong mode, samplerate, bitrate, layer, channels, padding, crc;
+  gulong version;
+  gint lsf, mpg25;
+
+  if (header & (1 << 20)) {
+    lsf = (header & (1 << 19)) ? 0 : 1;
+    mpg25 = 0;
+  } else {
+    lsf = 1;
+    mpg25 = 1;
+  }
+
+  version = 1 + lsf + mpg25;
+
+  layer = 4 - ((header >> 17) & 0x3);
+
+  crc = (header >> 16) & 0x1;
+
+  bitrate = (header >> 12) & 0xF;
+  bitrate = mp3types_bitrates[lsf][layer - 1][bitrate] * 1000;
+  /* The caller has ensured we have a valid header, so bitrate can't be
+     zero here. */
+  g_assert (bitrate != 0);
+
+  samplerate = (header >> 10) & 0x3;
+  samplerate = mp3types_freqs[lsf + mpg25][samplerate];
+
+  padding = (header >> 9) & 0x1;
+
+  mode = (header >> 6) & 0x3;
+  channels = (mode == 3) ? 1 : 2;
+
+  switch (layer) {
+    case 1:
+      length = 4 * ((bitrate * 12) / samplerate + padding);
+      break;
+    case 2:
+      length = (bitrate * 144) / samplerate + padding;
+      break;
+    default:
+    case 3:
+      length = (bitrate * 144) / (samplerate << lsf) + padding;
+      break;
+  }
+
+  GST_DEBUG_OBJECT (mp3parse, "Calculated mp3 frame length of %u bytes",
+      length);
+  GST_DEBUG_OBJECT (mp3parse, "samplerate = %lu, bitrate = %lu, version = %lu, "
+      "layer = %lu, channels = %lu, mode = %s", samplerate, bitrate, version,
+      layer, channels, gst_mp3_channel_mode_get_nick (mode));
+
+  if (put_version)
+    *put_version = version;
+  if (put_layer)
+    *put_layer = layer;
+  if (put_channels)
+    *put_channels = channels;
+  if (put_bitrate)
+    *put_bitrate = bitrate;
+  if (put_samplerate)
+    *put_samplerate = samplerate;
+  if (put_mode)
+    *put_mode = mode;
+  if (put_crc)
+    *put_crc = crc;
+
+  return length;
+}
+
+static GstCaps *
+mp3_caps_create (guint version, guint layer, guint channels, guint samplerate)
+{
+  GstCaps *new;
+
+  g_assert (version);
+  g_assert (layer);
+  g_assert (samplerate);
+  g_assert (channels);
+
+  new = gst_caps_new_simple ("audio/mpeg",
+      "mpegversion", G_TYPE_INT, 1,
+      "mpegaudioversion", G_TYPE_INT, version,
+      "layer", G_TYPE_INT, layer,
+      "rate", G_TYPE_INT, samplerate,
+      "channels", G_TYPE_INT, channels, "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
+
+  return new;
+}
+
+static void
+gst_mp3parse_base_init (gpointer klass)
+{
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&mp3_sink_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&mp3_src_template));
+
+  GST_DEBUG_CATEGORY_INIT (mp3parse_debug, "mp3parse", 0, "MPEG Audio Parser");
+
+  gst_element_class_set_details (element_class, &mp3parse_details);
+}
+
+static void
+gst_mp3parse_class_init (GstMPEGAudioParseClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+
+  gobject_class = (GObjectClass *) klass;
+  gstelement_class = (GstElementClass *) klass;
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  gobject_class->set_property = gst_mp3parse_set_property;
+  gobject_class->get_property = gst_mp3parse_get_property;
+  gobject_class->dispose = gst_mp3parse_dispose;
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SKIP,
+      g_param_spec_int ("skip", "skip", "skip",
+          G_MININT, G_MAXINT, 0, G_PARAM_READWRITE));
+  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BIT_RATE,
+      g_param_spec_int ("bitrate", "Bitrate", "Bit Rate",
+          G_MININT, G_MAXINT, 0, G_PARAM_READABLE));
+
+  gstelement_class->change_state = gst_mp3parse_change_state;
+
+/* register tags */
+#define GST_TAG_CRC    "has-crc"
+#define GST_TAG_MODE     "channel-mode"
+
+  gst_tag_register (GST_TAG_CRC, GST_TAG_FLAG_META, G_TYPE_BOOLEAN,
+      "has crc", "Using CRC", NULL);
+  gst_tag_register (GST_TAG_MODE, GST_TAG_FLAG_ENCODED, G_TYPE_STRING,
+      "channel mode", "MPEG audio channel mode", NULL);
+
+  g_type_class_ref (GST_TYPE_MP3_CHANNEL_MODE);
+}
+
+static void
+gst_mp3parse_reset (GstMPEGAudioParse * mp3parse)
+{
+  mp3parse->skip = 0;
+  mp3parse->resyncing = TRUE;
+  mp3parse->next_ts = GST_CLOCK_TIME_NONE;
+  mp3parse->cur_offset = -1;
+
+  mp3parse->sync_offset = 0;
+  mp3parse->tracked_offset = 0;
+  mp3parse->pending_ts = GST_CLOCK_TIME_NONE;
+  mp3parse->pending_offset = -1;
+
+  gst_adapter_clear (mp3parse->adapter);
+
+  mp3parse->rate = mp3parse->channels = mp3parse->layer = -1;
+  mp3parse->version = 1;
+  mp3parse->max_bitreservoir = GST_CLOCK_TIME_NONE;
+
+  mp3parse->avg_bitrate = 0;
+  mp3parse->bitrate_sum = 0;
+  mp3parse->last_posted_bitrate = 0;
+  mp3parse->frame_count = 0;
+  mp3parse->sent_codec_tag = FALSE;
+
+  mp3parse->last_posted_crc = CRC_UNKNOWN;
+  mp3parse->last_posted_channel_mode = MP3_CHANNEL_MODE_UNKNOWN;
+
+  mp3parse->xing_flags = 0;
+  mp3parse->xing_bitrate = 0;
+  mp3parse->xing_frames = 0;
+  mp3parse->xing_total_time = 0;
+  mp3parse->xing_bytes = 0;
+  mp3parse->xing_vbr_scale = 0;
+  memset (mp3parse->xing_seek_table, 0, 100);
+  memset (mp3parse->xing_seek_table_inverse, 0, 256);
+
+  mp3parse->vbri_bitrate = 0;
+  mp3parse->vbri_frames = 0;
+  mp3parse->vbri_total_time = 0;
+  mp3parse->vbri_bytes = 0;
+  mp3parse->vbri_seek_points = 0;
+  g_free (mp3parse->vbri_seek_table);
+  mp3parse->vbri_seek_table = NULL;
+
+  if (mp3parse->seek_table) {
+    g_list_foreach (mp3parse->seek_table, (GFunc) mpeg_audio_seek_entry_free,
+        NULL);
+    g_list_free (mp3parse->seek_table);
+    mp3parse->seek_table = NULL;
+  }
+
+  g_mutex_lock (mp3parse->pending_seeks_lock);
+  if (mp3parse->pending_accurate_seeks) {
+    g_slist_foreach (mp3parse->pending_accurate_seeks, (GFunc) g_free, NULL);
+    g_slist_free (mp3parse->pending_accurate_seeks);
+    mp3parse->pending_accurate_seeks = NULL;
+  }
+  if (mp3parse->pending_nonaccurate_seeks) {
+    g_slist_foreach (mp3parse->pending_nonaccurate_seeks, (GFunc) g_free, NULL);
+    g_slist_free (mp3parse->pending_nonaccurate_seeks);
+    mp3parse->pending_nonaccurate_seeks = NULL;
+  }
+  g_mutex_unlock (mp3parse->pending_seeks_lock);
+
+  if (mp3parse->pending_segment) {
+    GstEvent **eventp = &mp3parse->pending_segment;
+
+    gst_event_replace (eventp, NULL);
+  }
+
+  mp3parse->exact_position = FALSE;
+  gst_segment_init (&mp3parse->segment, GST_FORMAT_TIME);
+}
+
+static void
+gst_mp3parse_init (GstMPEGAudioParse * mp3parse, GstMPEGAudioParseClass * klass)
+{
+  mp3parse->sinkpad =
+      gst_pad_new_from_static_template (&mp3_sink_template, "sink");
+  gst_pad_set_event_function (mp3parse->sinkpad, gst_mp3parse_sink_event);
+  gst_pad_set_chain_function (mp3parse->sinkpad, gst_mp3parse_chain);
+  gst_element_add_pad (GST_ELEMENT (mp3parse), mp3parse->sinkpad);
+
+  mp3parse->srcpad =
+      gst_pad_new_from_static_template (&mp3_src_template, "src");
+  gst_pad_use_fixed_caps (mp3parse->srcpad);
+  gst_pad_set_event_function (mp3parse->srcpad, mp3parse_src_event);
+  gst_pad_set_query_function (mp3parse->srcpad, mp3parse_src_query);
+  gst_pad_set_query_type_function (mp3parse->srcpad, mp3parse_get_query_types);
+  gst_element_add_pad (GST_ELEMENT (mp3parse), mp3parse->srcpad);
+
+  mp3parse->adapter = gst_adapter_new ();
+  mp3parse->pending_seeks_lock = g_mutex_new ();
+
+  gst_mp3parse_reset (mp3parse);
+}
+
+static void
+gst_mp3parse_dispose (GObject * object)
+{
+  GstMPEGAudioParse *mp3parse = GST_MP3PARSE (object);
+
+  gst_mp3parse_reset (mp3parse);
+
+  if (mp3parse->adapter) {
+    g_object_unref (mp3parse->adapter);
+    mp3parse->adapter = NULL;
+  }
+  g_mutex_free (mp3parse->pending_seeks_lock);
+  mp3parse->pending_seeks_lock = NULL;
+
+  g_list_foreach (mp3parse->pending_events, (GFunc) gst_mini_object_unref,
+      NULL);
+  g_list_free (mp3parse->pending_events);
+  mp3parse->pending_events = NULL;
+
+  G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static gboolean
+gst_mp3parse_sink_event (GstPad * pad, GstEvent * event)
+{
+  gboolean res = TRUE;
+  GstMPEGAudioParse *mp3parse;
+  GstEvent **eventp;
+
+  mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_NEWSEGMENT:
+    {
+      gdouble rate, applied_rate;
+      GstFormat format;
+      gint64 start, stop, pos;
+      gboolean update;
+      MPEGAudioPendingAccurateSeek *seek = NULL;
+      GSList *node;
+
+      gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
+          &format, &start, &stop, &pos);
+
+      g_mutex_lock (mp3parse->pending_seeks_lock);
+      if (format == GST_FORMAT_BYTES && mp3parse->pending_accurate_seeks) {
+
+        for (node = mp3parse->pending_accurate_seeks; node; node = node->next) {
+          MPEGAudioPendingAccurateSeek *tmp = node->data;
+
+          if (tmp->upstream_start == pos) {
+            seek = tmp;
+            break;
+          }
+        }
+        if (seek) {
+          GstSegment *s = &seek->segment;
+
+          event =
+              gst_event_new_new_segment_full (FALSE, s->rate, s->applied_rate,
+              GST_FORMAT_TIME, s->start, s->stop, s->last_stop);
+
+          mp3parse->segment = seek->segment;
+
+          mp3parse->resyncing = FALSE;
+          mp3parse->cur_offset = pos;
+          mp3parse->next_ts = seek->timestamp_start;
+          mp3parse->pending_ts = GST_CLOCK_TIME_NONE;
+          mp3parse->tracked_offset = 0;
+          mp3parse->sync_offset = 0;
+
+          gst_event_parse_new_segment_full (event, &update, &rate,
+              &applied_rate, &format, &start, &stop, &pos);
+
+          GST_DEBUG_OBJECT (mp3parse,
+              "Pushing accurate newseg rate %g, applied rate %g, "
+              "format %d, start %" G_GINT64_FORMAT ", stop %" G_GINT64_FORMAT
+              ", pos %" G_GINT64_FORMAT, rate, applied_rate, format, start,
+              stop, pos);
+
+          g_free (seek);
+          mp3parse->pending_accurate_seeks =
+              g_slist_delete_link (mp3parse->pending_accurate_seeks, node);
+
+          g_mutex_unlock (mp3parse->pending_seeks_lock);
+          res = gst_pad_push_event (mp3parse->srcpad, event);
+
+          return res;
+        } else {
+          GST_WARNING_OBJECT (mp3parse,
+              "Accurate seek not possible, didn't get an appropiate upstream segment");
+        }
+      }
+      g_mutex_unlock (mp3parse->pending_seeks_lock);
+
+      mp3parse->exact_position = FALSE;
+
+      if (format == GST_FORMAT_BYTES) {
+        GstClockTime seg_start, seg_stop, seg_pos;
+
+        /* stop time is allowed to be open-ended, but not start & pos */
+        if (!mp3parse_bytepos_to_time (mp3parse, stop, &seg_stop, FALSE))
+          seg_stop = GST_CLOCK_TIME_NONE;
+        if (mp3parse_bytepos_to_time (mp3parse, start, &seg_start, FALSE) &&
+            mp3parse_bytepos_to_time (mp3parse, pos, &seg_pos, FALSE)) {
+          gst_event_unref (event);
+
+          /* search the pending nonaccurate seeks */
+          g_mutex_lock (mp3parse->pending_seeks_lock);
+          seek = NULL;
+          for (node = mp3parse->pending_nonaccurate_seeks; node;
+              node = node->next) {
+            MPEGAudioPendingAccurateSeek *tmp = node->data;
+
+            if (tmp->upstream_start == pos) {
+              seek = tmp;
+              break;
+            }
+          }
+
+          if (seek) {
+            if (seek->segment.stop == -1) {
+              /* corrent the segment end, because non-accurate seeks might make
+               * our streaming end earlier (see bug #603695) */
+              seg_stop = -1;
+            }
+            g_free (seek);
+            mp3parse->pending_nonaccurate_seeks =
+                g_slist_delete_link (mp3parse->pending_nonaccurate_seeks, node);
+          }
+          g_mutex_unlock (mp3parse->pending_seeks_lock);
+
+          event = gst_event_new_new_segment_full (update, rate, applied_rate,
+              GST_FORMAT_TIME, seg_start, seg_stop, seg_pos);
+          format = GST_FORMAT_TIME;
+          GST_DEBUG_OBJECT (mp3parse, "Converted incoming segment to TIME. "
+              "start = %" GST_TIME_FORMAT ", stop = %" GST_TIME_FORMAT
+              ", pos = %" GST_TIME_FORMAT, GST_TIME_ARGS (seg_start),
+              GST_TIME_ARGS (seg_stop), GST_TIME_ARGS (seg_pos));
+        }
+      }
+
+      if (format != GST_FORMAT_TIME) {
+        /* Unknown incoming segment format. Output a default open-ended 
+         * TIME segment */
+        gst_event_unref (event);
+        event = gst_event_new_new_segment_full (update, rate, applied_rate,
+            GST_FORMAT_TIME, 0, GST_CLOCK_TIME_NONE, 0);
+      }
+
+      mp3parse->resyncing = TRUE;
+      mp3parse->cur_offset = -1;
+      mp3parse->next_ts = GST_CLOCK_TIME_NONE;
+      mp3parse->pending_ts = GST_CLOCK_TIME_NONE;
+      mp3parse->tracked_offset = 0;
+      mp3parse->sync_offset = 0;
+      /* also clear leftover data if clearing so much state */
+      gst_adapter_clear (mp3parse->adapter);
+
+      gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
+          &format, &start, &stop, &pos);
+      GST_DEBUG_OBJECT (mp3parse, "Pushing newseg rate %g, applied rate %g, "
+          "format %d, start %" G_GINT64_FORMAT ", stop %" G_GINT64_FORMAT
+          ", pos %" G_GINT64_FORMAT, rate, applied_rate, format, start, stop,
+          pos);
+
+      gst_segment_set_newsegment_full (&mp3parse->segment, update, rate,
+          applied_rate, format, start, stop, pos);
+
+      /* save the segment for later, right before we push a new buffer so that
+       * the caps are fixed and the next linked element can receive the segment. */
+      eventp = &mp3parse->pending_segment;
+      gst_event_replace (eventp, event);
+      gst_event_unref (event);
+      res = TRUE;
+      break;
+    }
+    case GST_EVENT_FLUSH_STOP:
+      /* Clear our adapter and set up for a new position */
+      gst_adapter_clear (mp3parse->adapter);
+      eventp = &mp3parse->pending_segment;
+      gst_event_replace (eventp, NULL);
+      res = gst_pad_push_event (mp3parse->srcpad, event);
+      break;
+    case GST_EVENT_EOS:
+      /* If we haven't processed any frames yet, then make sure we process
+         at least whatever's in our adapter */
+      if (mp3parse->frame_count == 0) {
+        gst_mp3parse_handle_data (mp3parse, TRUE);
+
+        /* If we STILL have zero frames processed, fire an error */
+        if (mp3parse->frame_count == 0) {
+          GST_ELEMENT_ERROR (mp3parse, STREAM, WRONG_TYPE,
+              ("No valid frames found before end of stream"), (NULL));
+        }
+      }
+      /* fall through */
+    default:
+      if (mp3parse->pending_segment &&
+          (GST_EVENT_TYPE (event) != GST_EVENT_EOS) &&
+          (GST_EVENT_TYPE (event) != GST_EVENT_FLUSH_START)) {
+        /* Cache all events except EOS and the ones above if we have
+         * a pending segment */
+        mp3parse->pending_events =
+            g_list_append (mp3parse->pending_events, event);
+      } else {
+        res = gst_pad_push_event (mp3parse->srcpad, event);
+      }
+      break;
+  }
+
+  gst_object_unref (mp3parse);
+
+  return res;
+}
+
+static void
+gst_mp3parse_add_index_entry (GstMPEGAudioParse * mp3parse, guint64 offset,
+    GstClockTime ts)
+{
+  MPEGAudioSeekEntry *entry, *last;
+
+  if (G_LIKELY (mp3parse->seek_table != NULL)) {
+    last = mp3parse->seek_table->data;
+
+    if (last->byte >= offset)
+      return;
+
+    if (GST_CLOCK_DIFF (last->timestamp, ts) < mp3parse->idx_interval)
+      return;
+  }
+
+  entry = mpeg_audio_seek_entry_new ();
+  entry->byte = offset;
+  entry->timestamp = ts;
+  mp3parse->seek_table = g_list_prepend (mp3parse->seek_table, entry);
+
+  GST_LOG_OBJECT (mp3parse, "Adding index entry %" GST_TIME_FORMAT " @ offset "
+      "0x%08" G_GINT64_MODIFIER "x", GST_TIME_ARGS (ts), offset);
+}
+
+/* Prepare a buffer of the indicated size, timestamp it and output */
+static GstFlowReturn
+gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size,
+    guint mode, guint crc)
+{
+  GstBuffer *outbuf;
+  guint bitrate;
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstClockTime push_start;
+  GstTagList *taglist;
+
+  outbuf = gst_adapter_take_buffer (mp3parse->adapter, size);
+
+  GST_BUFFER_DURATION (outbuf) =
+      gst_util_uint64_scale (GST_SECOND, mp3parse->spf, mp3parse->rate);
+
+  GST_BUFFER_OFFSET (outbuf) = mp3parse->cur_offset;
+
+  /* Check if we have a pending timestamp from an incoming buffer to apply
+   * here */
+  if (GST_CLOCK_TIME_IS_VALID (mp3parse->pending_ts)) {
+    if (mp3parse->tracked_offset >= mp3parse->pending_offset) {
+      /* If the incoming timestamp differs from our expected by more than 
+       * half a frame, then take it instead of our calculated timestamp.
+       * This avoids creating imperfect streams just because of 
+       * quantization in the container timestamping */
+      GstClockTimeDiff diff = mp3parse->next_ts - mp3parse->pending_ts;
+      GstClockTimeDiff thresh = GST_BUFFER_DURATION (outbuf) / 2;
+
+      if (diff < -thresh || diff > thresh) {
+        GST_DEBUG_OBJECT (mp3parse, "Updating next_ts from %" GST_TIME_FORMAT
+            " to pending ts %" GST_TIME_FORMAT
+            " at offset %" G_GINT64_FORMAT " (pending offset was %"
+            G_GINT64_FORMAT ")", GST_TIME_ARGS (mp3parse->next_ts),
+            GST_TIME_ARGS (mp3parse->pending_ts), mp3parse->tracked_offset,
+            mp3parse->pending_offset);
+        mp3parse->next_ts = mp3parse->pending_ts;
+      }
+      mp3parse->pending_ts = GST_CLOCK_TIME_NONE;
+    }
+  }
+
+  /* Decide what timestamp we're going to apply */
+  if (GST_CLOCK_TIME_IS_VALID (mp3parse->next_ts)) {
+    GST_BUFFER_TIMESTAMP (outbuf) = mp3parse->next_ts;
+  } else {
+    GstClockTime ts;
+
+    /* No timestamp yet, convert our offset to a timestamp if we can, or
+     * start at 0 */
+    if (mp3parse_bytepos_to_time (mp3parse, mp3parse->cur_offset, &ts, FALSE) &&
+        GST_CLOCK_TIME_IS_VALID (ts))
+      GST_BUFFER_TIMESTAMP (outbuf) = ts;
+    else {
+      GST_BUFFER_TIMESTAMP (outbuf) = 0;
+    }
+  }
+
+  if (GST_BUFFER_TIMESTAMP (outbuf) == 0)
+    mp3parse->exact_position = TRUE;
+
+  if (mp3parse->seekable &&
+      mp3parse->exact_position && GST_BUFFER_TIMESTAMP_IS_VALID (outbuf) &&
+      mp3parse->cur_offset != GST_BUFFER_OFFSET_NONE) {
+    gst_mp3parse_add_index_entry (mp3parse, mp3parse->cur_offset,
+        GST_BUFFER_TIMESTAMP (outbuf));
+  }
+
+  /* Update our byte offset tracking */
+  if (mp3parse->cur_offset != -1) {
+    mp3parse->cur_offset += size;
+  }
+  mp3parse->tracked_offset += size;
+
+  if (GST_BUFFER_TIMESTAMP_IS_VALID (outbuf))
+    mp3parse->next_ts =
+        GST_BUFFER_TIMESTAMP (outbuf) + GST_BUFFER_DURATION (outbuf);
+
+  gst_buffer_set_caps (outbuf, GST_PAD_CAPS (mp3parse->srcpad));
+
+  /* Post a bitrate tag if we need to before pushing the buffer */
+  if (mp3parse->xing_bitrate != 0)
+    bitrate = mp3parse->xing_bitrate;
+  else if (mp3parse->vbri_bitrate != 0)
+    bitrate = mp3parse->vbri_bitrate;
+  else
+    bitrate = mp3parse->avg_bitrate;
+
+  /* we will create a taglist (if any of the parameters has changed)
+   * to add the tags that changed */
+  taglist = NULL;
+  if ((mp3parse->last_posted_bitrate / 10000) != (bitrate / 10000)) {
+    taglist = gst_tag_list_new ();
+    mp3parse->last_posted_bitrate = bitrate;
+    gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_BITRATE,
+        mp3parse->last_posted_bitrate, NULL);
+
+    /* Post a new duration message if the average bitrate changes that much
+     * so applications can update their cached values
+     */
+    if ((mp3parse->xing_flags & XING_TOC_FLAG) == 0
+        && mp3parse->vbri_total_time == 0) {
+      gst_element_post_message (GST_ELEMENT (mp3parse),
+          gst_message_new_duration (GST_OBJECT (mp3parse), GST_FORMAT_TIME,
+              -1));
+    }
+  }
+
+  if (mp3parse->last_posted_crc != crc) {
+    gboolean using_crc;
+
+    if (!taglist) {
+      taglist = gst_tag_list_new ();
+    }
+    mp3parse->last_posted_crc = crc;
+    if (mp3parse->last_posted_crc == CRC_PROTECTED) {
+      using_crc = TRUE;
+    } else {
+      using_crc = FALSE;
+    }
+    gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_CRC,
+        using_crc, NULL);
+  }
+
+  if (mp3parse->last_posted_channel_mode != mode) {
+    if (!taglist) {
+      taglist = gst_tag_list_new ();
+    }
+    mp3parse->last_posted_channel_mode = mode;
+
+    gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_MODE,
+        gst_mp3_channel_mode_get_nick (mode), NULL);
+  }
+
+  /* if the taglist exists, we need to send it */
+  if (taglist) {
+    gst_element_found_tags_for_pad (GST_ELEMENT (mp3parse),
+        mp3parse->srcpad, taglist);
+  }
+
+  /* We start pushing 9 frames earlier (29 frames for MPEG2) than
+   * segment start to be able to decode the first frame we want.
+   * 9 (29) frames are the theoretical maximum of frames that contain
+   * data for the current frame (bit reservoir).
+   */
+  if (mp3parse->segment.start == 0) {
+    push_start = 0;
+  } else if (GST_CLOCK_TIME_IS_VALID (mp3parse->max_bitreservoir)) {
+    if (GST_CLOCK_TIME_IS_VALID (mp3parse->segment.start) &&
+        mp3parse->segment.start > mp3parse->max_bitreservoir)
+      push_start = mp3parse->segment.start - mp3parse->max_bitreservoir;
+    else
+      push_start = 0;
+  } else {
+    push_start = mp3parse->segment.start;
+  }
+
+  if (G_UNLIKELY ((GST_CLOCK_TIME_IS_VALID (push_start) &&
+              GST_BUFFER_TIMESTAMP_IS_VALID (outbuf) &&
+              GST_BUFFER_TIMESTAMP (outbuf) + GST_BUFFER_DURATION (outbuf)
+              < push_start))) {
+    GST_DEBUG_OBJECT (mp3parse,
+        "Buffer before configured segment range %" GST_TIME_FORMAT
+        " to %" GST_TIME_FORMAT ", dropping, timestamp %"
+        GST_TIME_FORMAT " duration %" GST_TIME_FORMAT
+        ", offset 0x%08" G_GINT64_MODIFIER "x", GST_TIME_ARGS (push_start),
+        GST_TIME_ARGS (mp3parse->segment.stop),
+        GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
+        GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)),
+        GST_BUFFER_OFFSET (outbuf));
+
+    gst_buffer_unref (outbuf);
+    ret = GST_FLOW_OK;
+  } else if (G_UNLIKELY (GST_BUFFER_TIMESTAMP_IS_VALID (outbuf) &&
+          GST_CLOCK_TIME_IS_VALID (mp3parse->segment.stop) &&
+          GST_BUFFER_TIMESTAMP (outbuf) >=
+          mp3parse->segment.stop + GST_BUFFER_DURATION (outbuf))) {
+    /* Some mp3 streams have an offset in the timestamps, for which we have to
+     * push the frame *after* the end position in order for the decoder to be
+     * able to decode everything up until the segment.stop position.
+     * That is the reason of the calculated offset */
+    GST_DEBUG_OBJECT (mp3parse,
+        "Buffer after configured segment range %" GST_TIME_FORMAT " to %"
+        GST_TIME_FORMAT ", returning GST_FLOW_UNEXPECTED, timestamp %"
+        GST_TIME_FORMAT " duration %" GST_TIME_FORMAT ", offset 0x%08"
+        G_GINT64_MODIFIER "x", GST_TIME_ARGS (push_start),
+        GST_TIME_ARGS (mp3parse->segment.stop),
+        GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
+        GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)),
+        GST_BUFFER_OFFSET (outbuf));
+
+    gst_buffer_unref (outbuf);
+    ret = GST_FLOW_UNEXPECTED;
+  } else {
+    GST_DEBUG_OBJECT (mp3parse,
+        "pushing buffer of %d bytes, timestamp %" GST_TIME_FORMAT
+        ", offset 0x%08" G_GINT64_MODIFIER "x", size,
+        GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
+        GST_BUFFER_OFFSET (outbuf));
+    mp3parse->segment.last_stop = GST_BUFFER_TIMESTAMP (outbuf);
+    /* push any pending segment now */
+    if (mp3parse->pending_segment) {
+      gst_pad_push_event (mp3parse->srcpad, mp3parse->pending_segment);
+      mp3parse->pending_segment = NULL;
+    }
+    if (mp3parse->pending_events) {
+      GList *l;
+
+      for (l = mp3parse->pending_events; l != NULL; l = l->next) {
+        gst_pad_push_event (mp3parse->srcpad, GST_EVENT (l->data));
+      }
+      g_list_free (mp3parse->pending_events);
+      mp3parse->pending_events = NULL;
+    }
+
+    /* set discont if needed */
+    if (mp3parse->discont) {
+      GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
+      mp3parse->discont = FALSE;
+    }
+
+    ret = gst_pad_push (mp3parse->srcpad, outbuf);
+  }
+
+  return ret;
+}
+
+static void
+gst_mp3parse_handle_first_frame (GstMPEGAudioParse * mp3parse)
+{
+  GstTagList *taglist;
+  gchar *codec;
+  const guint32 xing_id = 0x58696e67;   /* 'Xing' in hex */
+  const guint32 info_id = 0x496e666f;   /* 'Info' in hex - found in LAME CBR files */
+  const guint32 vbri_id = 0x56425249;   /* 'VBRI' in hex */
+
+  gint offset;
+
+  guint64 avail;
+  gint64 upstream_total_bytes = 0;
+  guint32 read_id;
+  const guint8 *data;
+
+  /* Output codec tag */
+  if (!mp3parse->sent_codec_tag) {
+    if (mp3parse->layer == 3) {
+      codec = g_strdup_printf ("MPEG %d Audio, Layer %d (MP3)",
+          mp3parse->version, mp3parse->layer);
+    } else {
+      codec = g_strdup_printf ("MPEG %d Audio, Layer %d",
+          mp3parse->version, mp3parse->layer);
+    }
+
+    taglist = gst_tag_list_new ();
+    gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
+        GST_TAG_AUDIO_CODEC, codec, NULL);
+    gst_element_found_tags_for_pad (GST_ELEMENT (mp3parse),
+        mp3parse->srcpad, taglist);
+    g_free (codec);
+
+    mp3parse->sent_codec_tag = TRUE;
+  }
+  /* end setting the tag */
+
+  /* Check first frame for Xing info */
+  if (mp3parse->version == 1) { /* MPEG-1 file */
+    if (mp3parse->channels == 1)
+      offset = 0x11;
+    else
+      offset = 0x20;
+  } else {                      /* MPEG-2 header */
+    if (mp3parse->channels == 1)
+      offset = 0x09;
+    else
+      offset = 0x11;
+  }
+  /* Skip the 4 bytes of the MP3 header too */
+  offset += 4;
+
+  /* Check if we have enough data to read the Xing header */
+  avail = gst_adapter_available (mp3parse->adapter);
+
+  if (avail < offset + 8)
+    return;
+
+  data = gst_adapter_peek (mp3parse->adapter, offset + 8);
+  if (data == NULL)
+    return;
+  /* The header starts at the provided offset */
+  data += offset;
+
+  /* obtain real upstream total bytes */
+  mp3parse_total_bytes (mp3parse, &upstream_total_bytes);
+
+  read_id = GST_READ_UINT32_BE (data);
+  if (read_id == xing_id || read_id == info_id) {
+    guint32 xing_flags;
+    guint bytes_needed = offset + 8;
+    gint64 total_bytes;
+    GstClockTime total_time;
+
+    GST_DEBUG_OBJECT (mp3parse, "Found Xing header marker 0x%x", xing_id);
+
+    /* Read 4 base bytes of flags, big-endian */
+    xing_flags = GST_READ_UINT32_BE (data + 4);
+    if (xing_flags & XING_FRAMES_FLAG)
+      bytes_needed += 4;
+    if (xing_flags & XING_BYTES_FLAG)
+      bytes_needed += 4;
+    if (xing_flags & XING_TOC_FLAG)
+      bytes_needed += 100;
+    if (xing_flags & XING_VBR_SCALE_FLAG)
+      bytes_needed += 4;
+    if (avail < bytes_needed) {
+      GST_DEBUG_OBJECT (mp3parse,
+          "Not enough data to read Xing header (need %d)", bytes_needed);
+      return;
+    }
+
+    GST_DEBUG_OBJECT (mp3parse, "Reading Xing header");
+    mp3parse->xing_flags = xing_flags;
+    data = gst_adapter_peek (mp3parse->adapter, bytes_needed);
+    data += offset + 8;
+
+    if (xing_flags & XING_FRAMES_FLAG) {
+      mp3parse->xing_frames = GST_READ_UINT32_BE (data);
+      if (mp3parse->xing_frames == 0) {
+        GST_WARNING_OBJECT (mp3parse,
+            "Invalid number of frames in Xing header");
+        mp3parse->xing_flags &= ~XING_FRAMES_FLAG;
+      } else {
+        mp3parse->xing_total_time = gst_util_uint64_scale (GST_SECOND,
+            (guint64) (mp3parse->xing_frames) * (mp3parse->spf),
+            mp3parse->rate);
+      }
+
+      data += 4;
+    } else {
+      mp3parse->xing_frames = 0;
+      mp3parse->xing_total_time = 0;
+    }
+
+    if (xing_flags & XING_BYTES_FLAG) {
+      mp3parse->xing_bytes = GST_READ_UINT32_BE (data);
+      if (mp3parse->xing_bytes == 0) {
+        GST_WARNING_OBJECT (mp3parse, "Invalid number of bytes in Xing header");
+        mp3parse->xing_flags &= ~XING_BYTES_FLAG;
+      }
+
+      data += 4;
+    } else {
+      mp3parse->xing_bytes = 0;
+    }
+
+    /* If we know the upstream size and duration, compute the
+     * total bitrate, rounded up to the nearest kbit/sec */
+    if ((total_time = mp3parse->xing_total_time) &&
+        (total_bytes = mp3parse->xing_bytes)) {
+      mp3parse->xing_bitrate = gst_util_uint64_scale (total_bytes,
+          8 * GST_SECOND, total_time);
+      mp3parse->xing_bitrate += 500;
+      mp3parse->xing_bitrate -= mp3parse->xing_bitrate % 1000;
+    }
+
+    if (xing_flags & XING_TOC_FLAG) {
+      int i, percent = 0;
+      guchar *table = mp3parse->xing_seek_table;
+      guchar old = 0, new;
+      guint first;
+
+      first = data[0];
+      GST_DEBUG_OBJECT (mp3parse,
+          "Subtracting initial offset of %d bytes from Xing TOC", first);
+
+      /* xing seek table: percent time -> 1/256 bytepos */
+      for (i = 0; i < 100; i++) {
+        new = data[i] - first;
+        if (old > new) {
+          GST_WARNING_OBJECT (mp3parse, "Skipping broken Xing TOC");
+          mp3parse->xing_flags &= ~XING_TOC_FLAG;
+          goto skip_toc;
+        }
+        mp3parse->xing_seek_table[i] = old = new;
+      }
+
+      /* build inverse table: 1/256 bytepos -> 1/100 percent time */
+      for (i = 0; i < 256; i++) {
+        while (percent < 99 && table[percent + 1] <= i)
+          percent++;
+
+        if (table[percent] == i) {
+          mp3parse->xing_seek_table_inverse[i] = percent * 100;
+        } else if (table[percent] < i && percent < 99) {
+          gdouble fa, fb, fx;
+          gint a = percent, b = percent + 1;
+
+          fa = table[a];
+          fb = table[b];
+          fx = (b - a) / (fb - fa) * (i - fa) + a;
+          mp3parse->xing_seek_table_inverse[i] = (guint16) (fx * 100);
+        } else if (percent == 99) {
+          gdouble fa, fb, fx;
+          gint a = percent, b = 100;
+
+          fa = table[a];
+          fb = 256.0;
+          fx = (b - a) / (fb - fa) * (i - fa) + a;
+          mp3parse->xing_seek_table_inverse[i] = (guint16) (fx * 100);
+        }
+      }
+    skip_toc:
+      data += 100;
+    } else {
+      memset (mp3parse->xing_seek_table, 0, 100);
+      memset (mp3parse->xing_seek_table_inverse, 0, 256);
+    }
+
+    if (xing_flags & XING_VBR_SCALE_FLAG) {
+      mp3parse->xing_vbr_scale = GST_READ_UINT32_BE (data);
+    } else
+      mp3parse->xing_vbr_scale = 0;
+
+    GST_DEBUG_OBJECT (mp3parse, "Xing header reported %u frames, time %"
+        GST_TIME_FORMAT ", %u bytes, vbr scale %u", mp3parse->xing_frames,
+        GST_TIME_ARGS (mp3parse->xing_total_time), mp3parse->xing_bytes,
+        mp3parse->xing_vbr_scale);
+
+    /* check for truncated file */
+    if (upstream_total_bytes && mp3parse->xing_bytes &&
+        mp3parse->xing_bytes * 0.8 > upstream_total_bytes) {
+      GST_WARNING_OBJECT (mp3parse, "File appears to have been truncated; "
+          "invalidating Xing header duration and size");
+      mp3parse->xing_flags &= ~XING_BYTES_FLAG;
+      mp3parse->xing_flags &= ~XING_FRAMES_FLAG;
+    }
+  } else if (read_id == vbri_id) {
+    gint64 total_bytes, total_frames;
+    GstClockTime total_time;
+    guint16 nseek_points;
+
+    GST_DEBUG_OBJECT (mp3parse, "Found VBRI header marker 0x%x", vbri_id);
+    if (avail < offset + 26) {
+      GST_DEBUG_OBJECT (mp3parse,
+          "Not enough data to read VBRI header (need %d)", offset + 26);
+      return;
+    }
+
+    GST_DEBUG_OBJECT (mp3parse, "Reading VBRI header");
+    data = gst_adapter_peek (mp3parse->adapter, offset + 26);
+    data += offset + 4;
+
+    if (GST_READ_UINT16_BE (data) != 0x0001) {
+      GST_WARNING_OBJECT (mp3parse,
+          "Unsupported VBRI version 0x%x", GST_READ_UINT16_BE (data));
+      return;
+    }
+    data += 2;
+
+    /* Skip encoder delay */
+    data += 2;
+
+    /* Skip quality */
+    data += 2;
+
+    total_bytes = GST_READ_UINT32_BE (data);
+    if (total_bytes != 0)
+      mp3parse->vbri_bytes = total_bytes;
+    data += 4;
+
+    total_frames = GST_READ_UINT32_BE (data);
+    if (total_frames != 0) {
+      mp3parse->vbri_frames = total_frames;
+      mp3parse->vbri_total_time = gst_util_uint64_scale (GST_SECOND,
+          (guint64) (mp3parse->vbri_frames) * (mp3parse->spf), mp3parse->rate);
+    }
+    data += 4;
+
+    /* If we know the upstream size and duration, compute the 
+     * total bitrate, rounded up to the nearest kbit/sec */
+    if ((total_time = mp3parse->vbri_total_time) &&
+        (total_bytes = mp3parse->vbri_bytes)) {
+      mp3parse->vbri_bitrate = gst_util_uint64_scale (total_bytes,
+          8 * GST_SECOND, total_time);
+      mp3parse->vbri_bitrate += 500;
+      mp3parse->vbri_bitrate -= mp3parse->vbri_bitrate % 1000;
+    }
+
+    nseek_points = GST_READ_UINT16_BE (data);
+    data += 2;
+
+    if (nseek_points > 0) {
+      guint scale, seek_bytes, seek_frames;
+      gint i;
+
+      mp3parse->vbri_seek_points = nseek_points;
+
+      scale = GST_READ_UINT16_BE (data);
+      data += 2;
+
+      seek_bytes = GST_READ_UINT16_BE (data);
+      data += 2;
+
+      seek_frames = GST_READ_UINT16_BE (data);
+
+      if (scale == 0 || seek_bytes == 0 || seek_bytes > 4 || seek_frames == 0) {
+        GST_WARNING_OBJECT (mp3parse, "Unsupported VBRI seek table");
+        goto out_vbri;
+      }
+
+      if (avail < offset + 26 + nseek_points * seek_bytes) {
+        GST_WARNING_OBJECT (mp3parse,
+            "Not enough data to read VBRI seek table (need %d)",
+            offset + 26 + nseek_points * seek_bytes);
+        goto out_vbri;
+      }
+
+      if (seek_frames * nseek_points < total_frames - seek_frames ||
+          seek_frames * nseek_points > total_frames + seek_frames) {
+        GST_WARNING_OBJECT (mp3parse,
+            "VBRI seek table doesn't cover the complete file");
+        goto out_vbri;
+      }
+
+      data =
+          gst_adapter_peek (mp3parse->adapter,
+          offset + 26 + nseek_points * seek_bytes);
+      data += offset + 26;
+
+
+      /* VBRI seek table: frame/seek_frames -> byte */
+      mp3parse->vbri_seek_table = g_new (guint32, nseek_points);
+      if (seek_bytes == 4)
+        for (i = 0; i < nseek_points; i++) {
+          mp3parse->vbri_seek_table[i] = GST_READ_UINT32_BE (data) * scale;
+          data += 4;
+      } else if (seek_bytes == 3)
+        for (i = 0; i < nseek_points; i++) {
+          mp3parse->vbri_seek_table[i] = GST_READ_UINT24_BE (data) * scale;
+          data += 3;
+      } else if (seek_bytes == 2)
+        for (i = 0; i < nseek_points; i++) {
+          mp3parse->vbri_seek_table[i] = GST_READ_UINT16_BE (data) * scale;
+          data += 2;
+      } else                    /* seek_bytes == 1 */
+        for (i = 0; i < nseek_points; i++) {
+          mp3parse->vbri_seek_table[i] = GST_READ_UINT8 (data) * scale;
+          data += 1;
+        }
+    }
+  out_vbri:
+
+    GST_DEBUG_OBJECT (mp3parse, "VBRI header reported %u frames, time %"
+        GST_TIME_FORMAT ", bytes %u", mp3parse->vbri_frames,
+        GST_TIME_ARGS (mp3parse->vbri_total_time), mp3parse->vbri_bytes);
+
+    /* check for truncated file */
+    if (upstream_total_bytes && mp3parse->vbri_bytes &&
+        mp3parse->vbri_bytes * 0.8 > upstream_total_bytes) {
+      GST_WARNING_OBJECT (mp3parse, "File appears to have been truncated; "
+          "invalidating VBRI header duration and size");
+      mp3parse->vbri_valid = FALSE;
+    } else {
+      mp3parse->vbri_valid = TRUE;
+    }
+  } else {
+    GST_DEBUG_OBJECT (mp3parse,
+        "Xing, LAME or VBRI header not found in first frame");
+  }
+}
+
+static void
+gst_mp3parse_check_seekability (GstMPEGAudioParse * mp3parse)
+{
+  GstQuery *query;
+  gboolean seekable = FALSE;
+  gint64 start = -1, stop = -1;
+  guint idx_interval = 0;
+
+  query = gst_query_new_seeking (GST_FORMAT_BYTES);
+  if (!gst_pad_peer_query (mp3parse->sinkpad, query)) {
+    GST_DEBUG_OBJECT (mp3parse, "seeking query failed");
+    goto done;
+  }
+
+  gst_query_parse_seeking (query, NULL, &seekable, &start, &stop);
+
+  /* try harder to query upstream size if we didn't get it the first time */
+  if (seekable && stop == -1) {
+    GstFormat fmt = GST_FORMAT_BYTES;
+
+    GST_DEBUG_OBJECT (mp3parse, "doing duration query to fix up unset stop");
+    gst_pad_query_peer_duration (mp3parse->sinkpad, &fmt, &stop);
+  }
+
+  /* if upstream doesn't know the size, it's likely that it's not seekable in
+   * practice even if it technically may be seekable */
+  if (seekable && (start != 0 || stop <= start)) {
+    GST_DEBUG_OBJECT (mp3parse, "seekable but unknown start/stop -> disable");
+    seekable = FALSE;
+  }
+
+  /* let's not put every single frame into our index */
+  if (seekable) {
+    if (stop < 10 * 1024 * 1024)
+      idx_interval = 100;
+    else if (stop < 100 * 1024 * 1024)
+      idx_interval = 500;
+    else
+      idx_interval = 1000;
+  }
+
+done:
+
+  GST_INFO_OBJECT (mp3parse, "seekable: %d (%" G_GUINT64_FORMAT " - %"
+      G_GUINT64_FORMAT ")", seekable, start, stop);
+  mp3parse->seekable = seekable;
+
+  GST_INFO_OBJECT (mp3parse, "idx_interval: %ums", idx_interval);
+  mp3parse->idx_interval = idx_interval * GST_MSECOND;
+
+  gst_query_unref (query);
+}
+
+/* Flush some number of bytes and update tracked offsets */
+static void
+gst_mp3parse_flush_bytes (GstMPEGAudioParse * mp3parse, int bytes)
+{
+  gst_adapter_flush (mp3parse->adapter, bytes);
+  if (mp3parse->cur_offset != -1)
+    mp3parse->cur_offset += bytes;
+  mp3parse->tracked_offset += bytes;
+}
+
+/* Perform extended validation to check that subsequent headers match
+   the first header given here in important characteristics, to avoid
+   false sync. We look for a minimum of MIN_RESYNC_FRAMES consecutive
+   frames to match their major characteristics.
+
+   If at_eos is set to TRUE, we just check that we don't find any invalid
+   frames in whatever data is available, rather than requiring a full
+   MIN_RESYNC_FRAMES of data.
+
+   Returns TRUE if we've seen enough data to validate or reject the frame.
+   If TRUE is returned, then *valid contains TRUE if it validated, or false
+   if we decided it was false sync.
+ */
+static gboolean
+gst_mp3parse_validate_extended (GstMPEGAudioParse * mp3parse, guint32 header,
+    int bpf, gboolean at_eos, gboolean * valid)
+{
+  guint32 next_header;
+  const guint8 *data;
+  guint available;
+  int frames_found = 1;
+  int offset = bpf;
+
+  while (frames_found < MIN_RESYNC_FRAMES) {
+    /* Check if we have enough data for all these frames, plus the next
+       frame header. */
+    available = gst_adapter_available (mp3parse->adapter);
+    if (available < offset + 4) {
+      if (at_eos) {
+        /* Running out of data at EOS is fine; just accept it */
+        *valid = TRUE;
+        return TRUE;
+      } else {
+        return FALSE;
+      }
+    }
+
+    data = gst_adapter_peek (mp3parse->adapter, offset + 4);
+    next_header = GST_READ_UINT32_BE (data + offset);
+    GST_DEBUG_OBJECT (mp3parse, "At %d: header=%08X, header2=%08X, bpf=%d",
+        offset, (unsigned int) header, (unsigned int) next_header, bpf);
+
+/* mask the bits which are allowed to differ between frames */
+#define HDRMASK ~((0xF << 12)  /* bitrate */ | \
+                  (0x1 <<  9)  /* padding */ | \
+                  (0xf <<  4)  /* mode|mode extension */ | \
+                  (0xf))        /* copyright|emphasis */
+
+    if ((next_header & HDRMASK) != (header & HDRMASK)) {
+      /* If any of the unmasked bits don't match, then it's not valid */
+      GST_DEBUG_OBJECT (mp3parse, "next header doesn't match "
+          "(header=%08X (%08X), header2=%08X (%08X), bpf=%d)",
+          (guint) header, (guint) header & HDRMASK, (guint) next_header,
+          (guint) next_header & HDRMASK, bpf);
+      *valid = FALSE;
+      return TRUE;
+    } else if ((((next_header >> 12) & 0xf) == 0) ||
+        (((next_header >> 12) & 0xf) == 0xf)) {
+      /* The essential parts were the same, but the bitrate held an
+         invalid value - also reject */
+      GST_DEBUG_OBJECT (mp3parse, "next header invalid (bitrate)");
+      *valid = FALSE;
+      return TRUE;
+    }
+
+    bpf = mp3_type_frame_length_from_header (mp3parse, next_header,
+        NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+    offset += bpf;
+    frames_found++;
+  }
+
+  *valid = TRUE;
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_mp3parse_handle_data (GstMPEGAudioParse * mp3parse, gboolean at_eos)
+{
+  GstFlowReturn flow = GST_FLOW_OK;
+  const guchar *data;
+  guint32 header;
+  int bpf;
+  guint available;
+  guint bitrate, layer, rate, channels, version, mode, crc;
+  gboolean caps_change;
+
+  /* while we still have at least 4 bytes (for the header) available */
+  while (gst_adapter_available (mp3parse->adapter) >= 4) {
+    /* Get the header bytes, check if they're potentially valid */
+    data = gst_adapter_peek (mp3parse->adapter, 4);
+    header = GST_READ_UINT32_BE (data);
+
+    if (!head_check (mp3parse, header)) {
+      /* Not a valid MP3 header; we start looking forward byte-by-byte trying to
+         find a place to resync */
+      if (!mp3parse->resyncing)
+        mp3parse->sync_offset = mp3parse->tracked_offset;
+      mp3parse->resyncing = TRUE;
+      gst_mp3parse_flush_bytes (mp3parse, 1);
+      GST_DEBUG_OBJECT (mp3parse, "wrong header, skipping byte");
+      continue;
+    }
+
+    /* We have a potentially valid header.
+       If this is just a normal 'next frame', we go ahead and output it.
+
+       However, sometimes, we do additional validation to ensure we haven't
+       got false sync (common with mp3 due to the short sync word).
+       The additional validation requires that we find several consecutive mp3
+       frames with the same major parameters, or reach EOS with a smaller
+       number of valid-looking frames.
+
+       We do this if:
+       - This is the very first frame we've processed
+       - We're resyncing after a non-accurate seek, or after losing sync
+       due to invalid data.
+       - The format of the stream changes in a major way (number of channels,
+       sample rate, layer, or mpeg version).
+     */
+    available = gst_adapter_available (mp3parse->adapter);
+
+    if (G_UNLIKELY (mp3parse->resyncing &&
+            mp3parse->tracked_offset - mp3parse->sync_offset > 2 * 1024 * 1024))
+      goto sync_failure;
+
+    bpf = mp3_type_frame_length_from_header (mp3parse, header,
+        &version, &layer, &channels, &bitrate, &rate, &mode, &crc);
+    g_assert (bpf != 0);
+
+    if (channels != mp3parse->channels ||
+        rate != mp3parse->rate || layer != mp3parse->layer ||
+        version != mp3parse->version)
+      caps_change = TRUE;
+    else
+      caps_change = FALSE;
+
+    if (mp3parse->resyncing || caps_change) {
+      gboolean valid;
+      if (!gst_mp3parse_validate_extended (mp3parse, header, bpf, at_eos,
+              &valid)) {
+        /* Not enough data to validate; wait for more */
+        break;
+      }
+
+      if (!valid) {
+        /* Extended validation failed; we probably got false sync.
+           Continue searching from the next byte in the stream */
+        if (!mp3parse->resyncing)
+          mp3parse->sync_offset = mp3parse->tracked_offset;
+        mp3parse->resyncing = TRUE;
+        gst_mp3parse_flush_bytes (mp3parse, 1);
+        continue;
+      }
+    }
+
+    /* if we don't have the whole frame... */
+    if (available < bpf) {
+      GST_DEBUG_OBJECT (mp3parse, "insufficient data available, need "
+          "%d bytes, have %d", bpf, available);
+      break;
+    }
+
+    if (caps_change) {
+      GstCaps *caps;
+
+      caps = mp3_caps_create (version, layer, channels, rate);
+      gst_pad_set_caps (mp3parse->srcpad, caps);
+      gst_caps_unref (caps);
+
+      mp3parse->channels = channels;
+      mp3parse->rate = rate;
+
+      mp3parse->layer = layer;
+      mp3parse->version = version;
+
+      /* see http://www.codeproject.com/audio/MPEGAudioInfo.asp */
+      if (mp3parse->layer == 1)
+        mp3parse->spf = 384;
+      else if (mp3parse->layer == 2)
+        mp3parse->spf = 1152;
+      else if (mp3parse->version == 1) {
+        mp3parse->spf = 1152;
+      } else {
+        /* MPEG-2 or "2.5" */
+        mp3parse->spf = 576;
+      }
+
+      mp3parse->max_bitreservoir = gst_util_uint64_scale (GST_SECOND,
+          ((version == 1) ? 10 : 30) * mp3parse->spf, mp3parse->rate);
+    }
+
+    mp3parse->bit_rate = bitrate;
+
+    /* Check the first frame for a Xing header to get our total length */
+    if (mp3parse->frame_count == 0) {
+      /* For the first frame in the file, look for a Xing frame after 
+       * the header, and output a codec tag */
+      gst_mp3parse_handle_first_frame (mp3parse);
+
+      /* Check if we're seekable */
+      gst_mp3parse_check_seekability (mp3parse);
+    }
+
+    /* Update VBR stats */
+    mp3parse->bitrate_sum += mp3parse->bit_rate;
+    mp3parse->frame_count++;
+    /* Compute the average bitrate, rounded up to the nearest 1000 bits */
+    mp3parse->avg_bitrate =
+        (mp3parse->bitrate_sum / mp3parse->frame_count + 500);
+    mp3parse->avg_bitrate -= mp3parse->avg_bitrate % 1000;
+
+    if (!mp3parse->skip) {
+      mp3parse->resyncing = FALSE;
+      flow = gst_mp3parse_emit_frame (mp3parse, bpf, mode, crc);
+      if (GST_FLOW_IS_FATAL (flow))
+        break;
+    } else {
+      GST_DEBUG_OBJECT (mp3parse, "skipping buffer of %d bytes", bpf);
+      gst_mp3parse_flush_bytes (mp3parse, bpf);
+      mp3parse->skip--;
+    }
+  }
+
+  return flow;
+
+  /* ERRORS */
+sync_failure:
+  {
+    GST_ELEMENT_ERROR (mp3parse, STREAM, DECODE,
+        ("Failed to parse stream"), (NULL));
+    return GST_FLOW_ERROR;
+  }
+}
+
+static GstFlowReturn
+gst_mp3parse_chain (GstPad * pad, GstBuffer * buf)
+{
+  GstMPEGAudioParse *mp3parse;
+  GstClockTime timestamp;
+
+  mp3parse = GST_MP3PARSE (GST_PAD_PARENT (pad));
+
+  GST_LOG_OBJECT (mp3parse, "buffer of %d bytes", GST_BUFFER_SIZE (buf));
+
+  timestamp = GST_BUFFER_TIMESTAMP (buf);
+
+  mp3parse->discont |= GST_BUFFER_IS_DISCONT (buf);
+
+  /* If we don't yet have a next timestamp, save it and the incoming offset
+   * so we can apply it to the right outgoing buffer */
+  if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
+    gint64 avail = gst_adapter_available (mp3parse->adapter);
+
+    mp3parse->pending_ts = timestamp;
+    mp3parse->pending_offset = mp3parse->tracked_offset + avail;
+
+    /* If we have no data pending and the next timestamp is
+     * invalid we can use the upstream timestamp for the next frame.
+     *
+     * This will give us a timestamp if we're resyncing and upstream
+     * gave us -1 as offset. */
+    if (avail == 0 && !GST_CLOCK_TIME_IS_VALID (mp3parse->next_ts))
+      mp3parse->next_ts = timestamp;
+
+    GST_LOG_OBJECT (mp3parse, "Have pending ts %" GST_TIME_FORMAT
+        " to apply in %" G_GINT64_FORMAT " bytes (@ off %" G_GINT64_FORMAT ")",
+        GST_TIME_ARGS (mp3parse->pending_ts), avail, mp3parse->pending_offset);
+  }
+
+  /* Update the cur_offset we'll apply to outgoing buffers */
+  if (mp3parse->cur_offset == -1 && GST_BUFFER_OFFSET (buf) != -1)
+    mp3parse->cur_offset = GST_BUFFER_OFFSET (buf);
+
+  /* And add the data to the pool */
+  gst_adapter_push (mp3parse->adapter, buf);
+
+  return gst_mp3parse_handle_data (mp3parse, FALSE);
+}
+
+static gboolean
+head_check (GstMPEGAudioParse * mp3parse, unsigned long head)
+{
+  GST_DEBUG_OBJECT (mp3parse, "checking mp3 header 0x%08lx", head);
+  /* if it's not a valid sync */
+  if ((head & 0xffe00000) != 0xffe00000) {
+    GST_WARNING_OBJECT (mp3parse, "invalid sync");
+    return FALSE;
+  }
+  /* if it's an invalid MPEG version */
+  if (((head >> 19) & 3) == 0x1) {
+    GST_WARNING_OBJECT (mp3parse, "invalid MPEG version: 0x%lx",
+        (head >> 19) & 3);
+    return FALSE;
+  }
+  /* if it's an invalid layer */
+  if (!((head >> 17) & 3)) {
+    GST_WARNING_OBJECT (mp3parse, "invalid layer: 0x%lx", (head >> 17) & 3);
+    return FALSE;
+  }
+  /* if it's an invalid bitrate */
+  if (((head >> 12) & 0xf) == 0x0) {
+    GST_WARNING_OBJECT (mp3parse, "invalid bitrate: 0x%lx."
+        "Free format files are not supported yet", (head >> 12) & 0xf);
+    return FALSE;
+  }
+  if (((head >> 12) & 0xf) == 0xf) {
+    GST_WARNING_OBJECT (mp3parse, "invalid bitrate: 0x%lx", (head >> 12) & 0xf);
+    return FALSE;
+  }
+  /* if it's an invalid samplerate */
+  if (((head >> 10) & 0x3) == 0x3) {
+    GST_WARNING_OBJECT (mp3parse, "invalid samplerate: 0x%lx",
+        (head >> 10) & 0x3);
+    return FALSE;
+  }
+
+  if ((head & 0x3) == 0x2) {
+    /* Ignore this as there are some files with emphasis 0x2 that can
+     * be played fine. See BGO #537235 */
+    GST_WARNING_OBJECT (mp3parse, "invalid emphasis: 0x%lx", head & 0x3);
+  }
+
+  return TRUE;
+}
+
+static void
+gst_mp3parse_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstMPEGAudioParse *src;
+
+  src = GST_MP3PARSE (object);
+
+  switch (prop_id) {
+    case ARG_SKIP:
+      src->skip = g_value_get_int (value);
+      break;
+    default:
+      break;
+  }
+}
+
+static void
+gst_mp3parse_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstMPEGAudioParse *src;
+
+  src = GST_MP3PARSE (object);
+
+  switch (prop_id) {
+    case ARG_SKIP:
+      g_value_set_int (value, src->skip);
+      break;
+    case ARG_BIT_RATE:
+      g_value_set_int (value, src->bit_rate * 1000);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static GstStateChangeReturn
+gst_mp3parse_change_state (GstElement * element, GstStateChange transition)
+{
+  GstMPEGAudioParse *mp3parse;
+  GstStateChangeReturn result;
+
+  mp3parse = GST_MP3PARSE (element);
+
+  result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      gst_mp3parse_reset (mp3parse);
+      break;
+    default:
+      break;
+  }
+
+  return result;
+}
+
+static gboolean
+mp3parse_total_bytes (GstMPEGAudioParse * mp3parse, gint64 * total)
+{
+  GstFormat fmt = GST_FORMAT_BYTES;
+
+  if (gst_pad_query_peer_duration (mp3parse->sinkpad, &fmt, total))
+    return TRUE;
+
+  if (mp3parse->xing_flags & XING_BYTES_FLAG) {
+    *total = mp3parse->xing_bytes;
+    return TRUE;
+  }
+
+  if (mp3parse->vbri_bytes != 0 && mp3parse->vbri_valid) {
+    *total = mp3parse->vbri_bytes;
+    return TRUE;
+  }
+
+  return FALSE;
+}
+
+static gboolean
+mp3parse_total_time (GstMPEGAudioParse * mp3parse, GstClockTime * total)
+{
+  gint64 total_bytes;
+
+  *total = GST_CLOCK_TIME_NONE;
+
+  if (mp3parse->xing_flags & XING_FRAMES_FLAG) {
+    *total = mp3parse->xing_total_time;
+    return TRUE;
+  }
+
+  if (mp3parse->vbri_total_time != 0 && mp3parse->vbri_valid) {
+    *total = mp3parse->vbri_total_time;
+    return TRUE;
+  }
+
+  /* Calculate time from the measured bitrate */
+  if (!mp3parse_total_bytes (mp3parse, &total_bytes))
+    return FALSE;
+
+  if (total_bytes != -1
+      && !mp3parse_bytepos_to_time (mp3parse, total_bytes, total, TRUE))
+    return FALSE;
+
+  return TRUE;
+}
+
+/* Convert a timestamp to the file position required to start decoding that
+ * timestamp. For now, this just uses the avg bitrate. Later, use an 
+ * incrementally accumulated seek table */
+static gboolean
+mp3parse_time_to_bytepos (GstMPEGAudioParse * mp3parse, GstClockTime ts,
+    gint64 * bytepos)
+{
+  gint64 total_bytes;
+  GstClockTime total_time;
+
+  /* -1 always maps to -1 */
+  if (ts == -1) {
+    *bytepos = -1;
+    return TRUE;
+  }
+
+  /* If XING seek table exists use this for time->byte conversion */
+  if ((mp3parse->xing_flags & XING_TOC_FLAG) &&
+      (total_bytes = mp3parse->xing_bytes) &&
+      (total_time = mp3parse->xing_total_time)) {
+    gdouble fa, fb, fx;
+    gdouble percent =
+        CLAMP ((100.0 * gst_util_guint64_to_gdouble (ts)) /
+        gst_util_guint64_to_gdouble (total_time), 0.0, 100.0);
+    gint index = CLAMP (percent, 0, 99);
+
+    fa = mp3parse->xing_seek_table[index];
+    if (index < 99)
+      fb = mp3parse->xing_seek_table[index + 1];
+    else
+      fb = 256.0;
+
+    fx = fa + (fb - fa) * (percent - index);
+
+    *bytepos = (1.0 / 256.0) * fx * total_bytes;
+
+    return TRUE;
+  }
+
+  if (mp3parse->vbri_seek_table && (total_bytes = mp3parse->vbri_bytes) &&
+      (total_time = mp3parse->vbri_total_time)) {
+    gint i, j;
+    gdouble a, b, fa, fb;
+
+    i = gst_util_uint64_scale (ts, mp3parse->vbri_seek_points - 1, total_time);
+    i = CLAMP (i, 0, mp3parse->vbri_seek_points - 1);
+
+    a = gst_guint64_to_gdouble (gst_util_uint64_scale (i, total_time,
+            mp3parse->vbri_seek_points));
+    fa = 0.0;
+    for (j = i; j >= 0; j--)
+      fa += mp3parse->vbri_seek_table[j];
+
+    if (i + 1 < mp3parse->vbri_seek_points) {
+      b = gst_guint64_to_gdouble (gst_util_uint64_scale (i + 1, total_time,
+              mp3parse->vbri_seek_points));
+      fb = fa + mp3parse->vbri_seek_table[i + 1];
+    } else {
+      b = gst_guint64_to_gdouble (total_time);
+      fb = total_bytes;
+    }
+
+    *bytepos = fa + ((fb - fa) / (b - a)) * (gst_guint64_to_gdouble (ts) - a);
+
+    return TRUE;
+  }
+
+  if (mp3parse->avg_bitrate == 0)
+    goto no_bitrate;
+
+  *bytepos =
+      gst_util_uint64_scale (ts, mp3parse->avg_bitrate, (8 * GST_SECOND));
+  return TRUE;
+no_bitrate:
+  GST_DEBUG_OBJECT (mp3parse, "Cannot seek yet - no average bitrate");
+  return FALSE;
+}
+
+static gboolean
+mp3parse_bytepos_to_time (GstMPEGAudioParse * mp3parse,
+    gint64 bytepos, GstClockTime * ts, gboolean from_total_time)
+{
+  gint64 total_bytes;
+  GstClockTime total_time;
+
+  if (bytepos == -1) {
+    *ts = GST_CLOCK_TIME_NONE;
+    return TRUE;
+  }
+
+  if (bytepos == 0) {
+    *ts = 0;
+    return TRUE;
+  }
+
+  /* If XING seek table exists use this for byte->time conversion */
+  if (!from_total_time && (mp3parse->xing_flags & XING_TOC_FLAG) &&
+      (total_bytes = mp3parse->xing_bytes) &&
+      (total_time = mp3parse->xing_total_time)) {
+    gdouble fa, fb, fx;
+    gdouble pos;
+    gint index;
+
+    pos = CLAMP ((bytepos * 256.0) / total_bytes, 0.0, 256.0);
+    index = CLAMP (pos, 0, 255);
+    fa = mp3parse->xing_seek_table_inverse[index];
+    if (index < 255)
+      fb = mp3parse->xing_seek_table_inverse[index + 1];
+    else
+      fb = 10000.0;
+
+    fx = fa + (fb - fa) * (pos - index);
+
+    *ts = (1.0 / 10000.0) * fx * gst_util_guint64_to_gdouble (total_time);
+
+    return TRUE;
+  }
+
+  if (!from_total_time && mp3parse->vbri_seek_table &&
+      (total_bytes = mp3parse->vbri_bytes) &&
+      (total_time = mp3parse->vbri_total_time)) {
+    gint i = 0;
+    guint64 sum = 0;
+    gdouble a, b, fa, fb;
+
+    do {
+      sum += mp3parse->vbri_seek_table[i];
+      i++;
+    } while (i + 1 < mp3parse->vbri_seek_points
+        && sum + mp3parse->vbri_seek_table[i] < bytepos);
+    i--;
+
+    a = gst_guint64_to_gdouble (sum);
+    fa = gst_guint64_to_gdouble (gst_util_uint64_scale (i, total_time,
+            mp3parse->vbri_seek_points));
+
+    if (i + 1 < mp3parse->vbri_seek_points) {
+      b = a + mp3parse->vbri_seek_table[i + 1];
+      fb = gst_guint64_to_gdouble (gst_util_uint64_scale (i + 1, total_time,
+              mp3parse->vbri_seek_points));
+    } else {
+      b = total_bytes;
+      fb = gst_guint64_to_gdouble (total_time);
+    }
+
+    *ts = gst_gdouble_to_guint64 (fa + ((fb - fa) / (b - a)) * (bytepos - a));
+
+    return TRUE;
+  }
+
+  /* Cannot convert anything except 0 if we don't have a bitrate yet */
+  if (mp3parse->avg_bitrate == 0)
+    return FALSE;
+
+  *ts = (GstClockTime) gst_util_uint64_scale (GST_SECOND, bytepos * 8,
+      mp3parse->avg_bitrate);
+  return TRUE;
+}
+
+static gboolean
+mp3parse_handle_seek (GstMPEGAudioParse * mp3parse, GstEvent * event)
+{
+  GstFormat format;
+  gdouble rate;
+  GstSeekFlags flags;
+  GstSeekType cur_type, stop_type;
+  gint64 cur, stop;
+  gint64 byte_cur, byte_stop;
+  MPEGAudioPendingAccurateSeek *seek;
+  GstClockTime start;
+
+  gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur,
+      &stop_type, &stop);
+
+  GST_DEBUG_OBJECT (mp3parse, "Performing seek to %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (cur));
+
+  /* For any format other than TIME, see if upstream handles
+   * it directly or fail. For TIME, try upstream, but do it ourselves if
+   * it fails upstream */
+  if (format != GST_FORMAT_TIME) {
+    gst_event_ref (event);
+    return gst_pad_push_event (mp3parse->sinkpad, event);
+  } else {
+    gst_event_ref (event);
+    if (gst_pad_push_event (mp3parse->sinkpad, event))
+      return TRUE;
+  }
+
+  seek = g_new0 (MPEGAudioPendingAccurateSeek, 1);
+
+  seek->segment = mp3parse->segment;
+
+  gst_segment_set_seek (&seek->segment, rate, GST_FORMAT_TIME,
+      flags, cur_type, cur, stop_type, stop, NULL);
+
+  /* Handle TIME based seeks by converting to a BYTE position */
+
+  /* For accurate seeking get the frame 9 (MPEG1) or 29 (MPEG2) frames
+   * before the one we want to seek to and push them all to the decoder.
+   *
+   * This is necessary because of the bit reservoir. See
+   * http://www.mars.org/mailman/public/mad-dev/2002-May/000634.html
+   *
+   */
+
+  if (flags & GST_SEEK_FLAG_ACCURATE) {
+    if (!mp3parse->seek_table) {
+      byte_cur = 0;
+      byte_stop = -1;
+      start = 0;
+    } else {
+      MPEGAudioSeekEntry *entry = NULL, *start_entry = NULL, *stop_entry = NULL;
+      GList *start_node, *stop_node;
+      gint64 seek_ts = (cur > mp3parse->max_bitreservoir) ?
+          (cur - mp3parse->max_bitreservoir) : 0;
+
+      for (start_node = mp3parse->seek_table; start_node;
+          start_node = start_node->next) {
+        entry = start_node->data;
+
+        if (seek_ts >= entry->timestamp) {
+          start_entry = entry;
+          break;
+        }
+      }
+
+      if (!start_entry) {
+        start_entry = mp3parse->seek_table->data;
+        start = start_entry->timestamp;
+        byte_cur = start_entry->byte;
+      } else {
+        start = start_entry->timestamp;
+        byte_cur = start_entry->byte;
+      }
+
+      for (stop_node = mp3parse->seek_table; stop_node;
+          stop_node = stop_node->next) {
+        entry = stop_node->data;
+
+        if (stop >= entry->timestamp) {
+          stop_node = stop_node->prev;
+          stop_entry = (stop_node) ? stop_node->data : NULL;
+          break;
+        }
+      }
+
+      if (!stop_entry) {
+        byte_stop = -1;
+      } else {
+        byte_stop = stop_entry->byte;
+      }
+
+    }
+    event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, cur_type,
+        byte_cur, stop_type, byte_stop);
+    g_mutex_lock (mp3parse->pending_seeks_lock);
+    seek->upstream_start = byte_cur;
+    seek->timestamp_start = start;
+    mp3parse->pending_accurate_seeks =
+        g_slist_prepend (mp3parse->pending_accurate_seeks, seek);
+    g_mutex_unlock (mp3parse->pending_seeks_lock);
+    if (gst_pad_push_event (mp3parse->sinkpad, event)) {
+      mp3parse->exact_position = TRUE;
+      return TRUE;
+    } else {
+      mp3parse->exact_position = TRUE;
+      g_mutex_lock (mp3parse->pending_seeks_lock);
+      mp3parse->pending_accurate_seeks =
+          g_slist_remove (mp3parse->pending_accurate_seeks, seek);
+      g_mutex_unlock (mp3parse->pending_seeks_lock);
+      g_free (seek);
+      return FALSE;
+    }
+  }
+
+  mp3parse->exact_position = FALSE;
+
+  /* Convert the TIME to the appropriate BYTE position at which to resume
+   * decoding. */
+  if (!mp3parse_time_to_bytepos (mp3parse, (GstClockTime) cur, &byte_cur))
+    goto no_pos;
+  if (!mp3parse_time_to_bytepos (mp3parse, (GstClockTime) stop, &byte_stop))
+    goto no_pos;
+
+  GST_DEBUG_OBJECT (mp3parse, "Seeking to byte range %" G_GINT64_FORMAT
+      " to %" G_GINT64_FORMAT, byte_cur, byte_stop);
+
+  /* Send BYTE based seek upstream */
+  event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, cur_type,
+      byte_cur, stop_type, byte_stop);
+
+  GST_LOG_OBJECT (mp3parse, "Storing pending seek");
+  g_mutex_lock (mp3parse->pending_seeks_lock);
+  seek->upstream_start = byte_cur;
+  seek->timestamp_start = cur;
+  mp3parse->pending_nonaccurate_seeks =
+      g_slist_prepend (mp3parse->pending_nonaccurate_seeks, seek);
+  g_mutex_unlock (mp3parse->pending_seeks_lock);
+  if (gst_pad_push_event (mp3parse->sinkpad, event)) {
+    return TRUE;
+  } else {
+    g_mutex_lock (mp3parse->pending_seeks_lock);
+    mp3parse->pending_nonaccurate_seeks =
+        g_slist_remove (mp3parse->pending_nonaccurate_seeks, seek);
+    g_mutex_unlock (mp3parse->pending_seeks_lock);
+    g_free (seek);
+    return FALSE;
+  }
+
+no_pos:
+  GST_DEBUG_OBJECT (mp3parse,
+      "Could not determine byte position for desired time");
+  return FALSE;
+}
+
+static gboolean
+mp3parse_src_event (GstPad * pad, GstEvent * event)
+{
+  GstMPEGAudioParse *mp3parse;
+  gboolean res = FALSE;
+
+  mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_SEEK:
+      res = mp3parse_handle_seek (mp3parse, event);
+      gst_event_unref (event);
+      break;
+    default:
+      res = gst_pad_event_default (pad, event);
+      break;
+  }
+
+  gst_object_unref (mp3parse);
+  return res;
+}
+
+static gboolean
+mp3parse_src_query (GstPad * pad, GstQuery * query)
+{
+  GstFormat format;
+  GstClockTime total;
+  GstMPEGAudioParse *mp3parse;
+  gboolean res = FALSE;
+  GstPad *peer;
+
+  mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad));
+
+  GST_LOG_OBJECT (pad, "%s query", GST_QUERY_TYPE_NAME (query));
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_POSITION:
+      gst_query_parse_position (query, &format, NULL);
+
+      if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
+        if (mp3parse->cur_offset != -1) {
+          gst_query_set_position (query, GST_FORMAT_BYTES,
+              mp3parse->cur_offset);
+          res = TRUE;
+        }
+      } else if (format == GST_FORMAT_TIME) {
+        if (mp3parse->next_ts == GST_CLOCK_TIME_NONE)
+          goto out;
+        gst_query_set_position (query, GST_FORMAT_TIME, mp3parse->next_ts);
+        res = TRUE;
+      }
+
+      /* If no answer above, see if upstream knows */
+      if (!res) {
+        if ((peer = gst_pad_get_peer (mp3parse->sinkpad)) != NULL) {
+          res = gst_pad_query (peer, query);
+          gst_object_unref (peer);
+          if (res)
+            goto out;
+        }
+      }
+      break;
+    case GST_QUERY_DURATION:
+      gst_query_parse_duration (query, &format, NULL);
+
+      /* First, see if upstream knows */
+      if ((peer = gst_pad_get_peer (mp3parse->sinkpad)) != NULL) {
+        res = gst_pad_query (peer, query);
+        gst_object_unref (peer);
+        if (res)
+          goto out;
+      }
+
+      if (format == GST_FORMAT_TIME) {
+        if (!mp3parse_total_time (mp3parse, &total) || total == -1)
+          goto out;
+        gst_query_set_duration (query, format, total);
+        res = TRUE;
+      }
+      break;
+    case GST_QUERY_SEEKING:
+      gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
+
+      /* does upstream handle ? */
+      if ((peer = gst_pad_get_peer (mp3parse->sinkpad)) != NULL) {
+        res = gst_pad_query (peer, query);
+        gst_object_unref (peer);
+      }
+      /* we may be able to help if in TIME */
+      if (format == GST_FORMAT_TIME) {
+        gboolean seekable;
+
+        gst_query_parse_seeking (query, &format, &seekable, NULL, NULL);
+        /* already OK if upstream takes care */
+        if (!(res && seekable)) {
+          gint64 pos;
+
+          seekable = TRUE;
+          if (!mp3parse_total_time (mp3parse, &total) || total == -1) {
+            seekable = FALSE;
+          } else if (!mp3parse_time_to_bytepos (mp3parse, 0, &pos)) {
+            seekable = FALSE;
+          } else {
+            GstQuery *q;
+
+            q = gst_query_new_seeking (GST_FORMAT_BYTES);
+            if (!gst_pad_peer_query (mp3parse->sinkpad, q)) {
+              seekable = FALSE;
+            } else {
+              gst_query_parse_seeking (q, &format, &seekable, NULL, NULL);
+            }
+            gst_query_unref (q);
+          }
+          gst_query_set_seeking (query, GST_FORMAT_TIME, seekable, 0, total);
+          res = TRUE;
+        }
+      }
+      break;
+    default:
+      res = gst_pad_query_default (pad, query);
+      break;
+  }
+
+out:
+  gst_object_unref (mp3parse);
+  return res;
+}
+
+static const GstQueryType *
+mp3parse_get_query_types (GstPad * pad G_GNUC_UNUSED)
+{
+  static const GstQueryType query_types[] = {
+    GST_QUERY_POSITION,
+    GST_QUERY_DURATION,
+    0
+  };
+
+  return query_types;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/gst/mpegaudioparse/gstmpegaudioparse.h	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,154 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef __MP3PARSE_H__
+#define __MP3PARSE_H__
+
+
+#include <gst/gst.h>
+#include <gst/base/gstadapter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_MP3PARSE \
+  (gst_mp3parse_get_type())
+#define GST_MP3PARSE(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MP3PARSE,GstMPEGAudioParse))
+#define GST_MP3PARSE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MP3PARSE,GstMPEGAudioParseClass))
+#define GST_IS_MP3PARSE(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MP3PARSE))
+#define GST_IS_MP3PARSE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MP3PARSE))
+
+typedef struct _GstMPEGAudioParse GstMPEGAudioParse;
+typedef struct _GstMPEGAudioParseClass GstMPEGAudioParseClass;
+typedef struct _MPEGAudioSeekEntry MPEGAudioSeekEntry;
+typedef struct _MPEGAudioPendingAccurateSeek MPEGAudioPendingAccurateSeek;
+
+
+struct _MPEGAudioSeekEntry {
+  gint64 byte;
+  GstClockTime timestamp;
+};
+
+struct _MPEGAudioPendingAccurateSeek {
+  GstSegment segment;
+  gint64 upstream_start;
+  GstClockTime timestamp_start;
+};
+
+struct _GstMPEGAudioParse {
+  GstElement element;
+
+  GstPad *sinkpad, *srcpad;
+
+  GstSegment segment;
+  GstClockTime next_ts;
+  gboolean discont;
+
+  /* Offset as supplied by incoming buffers */
+  gint64 cur_offset;
+
+  /* Upcoming timestamp given on an incoming buffer and
+   * the offset at which it becomes active */
+  GstClockTime pending_ts;
+  gint64 pending_offset;
+  /* Offset since the last newseg */
+  gint64 tracked_offset;
+  /* tracked_offset when resyncing started */
+  gint64 sync_offset;
+
+  GstAdapter *adapter;
+
+  guint skip; /* number of frames to skip */
+  guint bit_rate; /* in kbps */
+  gint channels, rate, layer, version;
+  GstClockTime max_bitreservoir;
+  gint spf; /* Samples per frame */
+
+  gboolean resyncing; /* True when attempting to resync (stricter checks are
+                         performed) */
+  gboolean sent_codec_tag;
+
+  /* VBR tracking */
+  guint   avg_bitrate;
+  guint64 bitrate_sum;
+  guint   frame_count;
+  guint   last_posted_bitrate;
+  gint    last_posted_crc;
+  guint   last_posted_channel_mode;
+
+  /* Xing info */
+  guint32 xing_flags;
+  guint32 xing_frames;
+  GstClockTime xing_total_time;
+  guint32 xing_bytes;
+  /* percent -> filepos mapping */
+  guchar xing_seek_table[100];
+  /* filepos -> percent mapping */
+  guint16 xing_seek_table_inverse[256];
+  guint32 xing_vbr_scale;
+  guint   xing_bitrate;
+
+  /* VBRI info */
+  guint32 vbri_frames;
+  GstClockTime vbri_total_time;
+  guint32 vbri_bytes;
+  guint vbri_bitrate;
+  guint vbri_seek_points;
+  guint32 *vbri_seek_table;
+  gboolean vbri_valid;
+
+  /* Accurate seeking */
+  GList *seek_table;
+  GMutex *pending_seeks_lock;
+  GSList *pending_accurate_seeks;
+  gboolean exact_position;
+
+  GSList *pending_nonaccurate_seeks;
+
+  /* Track whether we're seekable (in BYTES format, if upstream operates in
+   * TIME format, we don't care about seekability and assume upstream handles
+   * it). The seek table for accurate seeking is not maintained if we're not
+   * seekable. */
+  gboolean seekable;
+
+  /* minimum distance between two index entries */
+  GstClockTimeDiff idx_interval;
+
+  /* pending segment */
+  GstEvent *pending_segment;
+  /* pending events */
+  GList *pending_events;
+};
+
+struct _GstMPEGAudioParseClass {
+  GstElementClass parent_class;
+};
+
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+GType gst_mp3parse_get_type(void);
+
+G_END_DECLS
+
+#endif /* __MP3PARSE_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/gst/mpegaudioparse/gstxingmux.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,681 @@
+/*
+ * Copyright (c) 2006 Christophe Fergeau  <teuf@gnome.org>
+ * Copyright (c) 2008 Sebastian Dröge  <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* Xing SDK: http://www.mp3-tech.org/programmer/sources/vbrheadersdk.zip */
+
+
+/**
+ * SECTION:element-xingmux
+ *
+ * xingmux adds a Xing header to MP3 files. This contains information about the duration and size
+ * of the file and a seek table and is very useful for getting an almost correct duration and better
+ * seeking on VBR MP3 files.
+ * 
+ * This element will remove any existing Xing, LAME or VBRI headers from the beginning of the file.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch audiotestsrc num-buffers=1000 ! audioconvert ! lame ! xingmux ! filesink location=test.mp3
+ * gst-launch filesrc location=test.mp3 ! xingmux ! filesink location=test2.mp3
+ * gst-launch filesrc location=test.mp3 ! mp3parse ! xingmux ! filesink location=test2.mp3
+ * ]|
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "../../config.h"
+#endif
+
+#include <string.h>
+#include "gstxingmux.h"
+
+GST_DEBUG_CATEGORY_STATIC (xing_mux_debug);
+#define GST_CAT_DEFAULT xing_mux_debug
+
+GST_BOILERPLATE (GstXingMux, gst_xing_mux, GstElement, GST_TYPE_ELEMENT);
+
+/* Xing Header stuff */
+#define GST_XING_FRAME_FIELD   (1 << 0)
+#define GST_XING_BYTES_FIELD   (1 << 1)
+#define GST_XING_TOC_FIELD     (1 << 2)
+#define GST_XING_QUALITY_FIELD (1 << 3)
+
+typedef struct _GstXingSeekEntry
+{
+  gint64 timestamp;
+  gint byte;
+} GstXingSeekEntry;
+
+static inline GstXingSeekEntry *
+gst_xing_seek_entry_new ()
+{
+  return g_slice_new (GstXingSeekEntry);
+}
+
+static inline void
+gst_xing_seek_entry_free (GstXingSeekEntry * entry)
+{
+  g_slice_free (GstXingSeekEntry, entry);
+}
+
+static void gst_xing_mux_finalize (GObject * obj);
+static GstStateChangeReturn
+gst_xing_mux_change_state (GstElement * element, GstStateChange transition);
+static GstFlowReturn gst_xing_mux_chain (GstPad * pad, GstBuffer * buffer);
+static gboolean gst_xing_mux_sink_event (GstPad * pad, GstEvent * event);
+
+static GstStaticPadTemplate gst_xing_mux_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("audio/mpeg, "
+        "mpegversion = (int) 1, " "layer = (int) [ 1, 3 ]"));
+
+
+static GstStaticPadTemplate gst_xing_mux_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS ("audio/mpeg, "
+        "mpegversion = (int) 1, " "layer = (int) [ 1, 3 ]"));
+static const guint mp3types_bitrates[2][3][16] = {
+  {
+        {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448,},
+        {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384,},
+        {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320,}
+      },
+  {
+        {0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256,},
+        {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160,},
+        {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160,}
+      },
+};
+
+static const guint mp3types_freqs[3][3] = { {44100, 48000, 32000},
+{22050, 24000, 16000},
+{11025, 12000, 8000}
+};
+
+static gboolean
+parse_header (guint32 header, guint * ret_size, guint * ret_spf,
+    gulong * ret_rate)
+{
+  guint length, spf;
+  gulong samplerate, bitrate, layer, padding;
+  gint lsf, mpg25;
+
+  if ((header & 0xffe00000) != 0xffe00000) {
+    g_warning ("invalid sync");
+    return FALSE;
+  }
+
+  if (((header >> 19) & 3) == 0x01) {
+    g_warning ("invalid MPEG version");
+    return FALSE;
+  }
+
+  if (((header >> 17) & 3) == 0x00) {
+    g_warning ("invalid MPEG layer");
+    return FALSE;
+  }
+
+  if (((header >> 12) & 0xf) == 0xf || ((header >> 12) & 0xf) == 0x0) {
+    g_warning ("invalid bitrate");
+    return FALSE;
+  }
+
+  if (((header >> 10) & 0x3) == 0x3) {
+    g_warning ("invalid sampling rate");
+    return FALSE;
+  }
+
+  if (header & 0x00000002) {
+    g_warning ("invalid emphasis");
+    return FALSE;
+  }
+
+  if (header & (1 << 20)) {
+    lsf = (header & (1 << 19)) ? 0 : 1;
+    mpg25 = 0;
+  } else {
+    lsf = 1;
+    mpg25 = 1;
+  }
+
+  layer = 4 - ((header >> 17) & 0x3);
+
+  bitrate = (header >> 12) & 0xF;
+  bitrate = mp3types_bitrates[lsf][layer - 1][bitrate] * 1000;
+  if (bitrate == 0)
+    return 0;
+
+  samplerate = (header >> 10) & 0x3;
+  samplerate = mp3types_freqs[lsf + mpg25][samplerate];
+
+  padding = (header >> 9) & 0x1;
+
+  switch (layer) {
+    case 1:
+      length = 4 * ((bitrate * 12) / samplerate + padding);
+      break;
+    case 2:
+      length = (bitrate * 144) / samplerate + padding;
+      break;
+    default:
+    case 3:
+      length = (bitrate * 144) / (samplerate << lsf) + padding;
+      break;
+  }
+
+  if (layer == 1)
+    spf = 384;
+  else if (layer == 2 || lsf == 0)
+    spf = 1152;
+  else
+    spf = 576;
+
+  if (ret_size)
+    *ret_size = length;
+  if (ret_spf)
+    *ret_spf = spf;
+  if (ret_rate)
+    *ret_rate = samplerate;
+
+  return TRUE;
+}
+
+static guint
+get_xing_offset (guint32 header)
+{
+  guint mpeg_version = (header >> 19) & 0x3;
+  guint channel_mode = (header >> 6) & 0x3;
+
+  if (mpeg_version == 0x3) {
+    if (channel_mode == 0x3) {
+      return 0x11;
+    } else {
+      return 0x20;
+    }
+  } else {
+    if (channel_mode == 0x3) {
+      return 0x09;
+    } else {
+      return 0x11;
+    }
+  }
+}
+
+static gboolean
+has_xing_header (guint32 header, guchar * data, gsize size)
+{
+  data += 4;
+  data += get_xing_offset (header);
+
+  if (memcmp (data, "Xing", 4) == 0 ||
+      memcmp (data, "Info", 4) == 0 || memcmp (data, "VBRI", 4) == 0)
+    return TRUE;
+  else
+    return FALSE;
+}
+
+static GstBuffer *
+generate_xing_header (GstXingMux * xing)
+{
+  guint8 *xing_flags;
+  guint32 xing_flags_tmp = 0;
+  GstBuffer *xing_header;
+  guchar *data;
+
+  guint32 header;
+  guint32 header_be;
+  guint size, spf, xing_offset;
+  gulong rate;
+  guint bitrate = 0x00;
+
+  gint64 duration;
+  gint64 byte_count;
+
+  header = xing->first_header;
+
+  /* Set bitrate and choose lowest possible size */
+  do {
+    bitrate++;
+
+    header &= 0xffff0fff;
+    header |= bitrate << 12;
+
+    parse_header (header, &size, &spf, &rate);
+    xing_offset = get_xing_offset (header);
+  } while (size < (4 + xing_offset + 4 + 4 + 4 + 4 + 100) && bitrate < 0xe);
+
+  if (bitrate == 0xe) {
+    GST_ERROR ("No usable bitrate found!");
+    return NULL;
+  }
+
+  if (gst_pad_alloc_buffer_and_set_caps (xing->srcpad, 0, size,
+          GST_PAD_CAPS (xing->srcpad), &xing_header) != GST_FLOW_OK) {
+    xing_header = gst_buffer_new_and_alloc (size);
+    gst_buffer_set_caps (xing_header, GST_PAD_CAPS (xing->srcpad));
+  }
+
+  data = GST_BUFFER_DATA (xing_header);
+  memset (data, 0, size);
+  header_be = GUINT32_TO_BE (header);
+  memcpy (data, &header_be, 4);
+
+  data += 4;
+  data += xing_offset;
+
+  memcpy (data, "Xing", 4);
+  data += 4;
+
+  xing_flags = data;
+  data += 4;
+
+  if (xing->duration != GST_CLOCK_TIME_NONE) {
+    duration = xing->duration;
+  } else {
+    GstFormat fmt = GST_FORMAT_TIME;
+
+    if (!gst_pad_query_peer_duration (xing->sinkpad, &fmt, &duration))
+      duration = GST_CLOCK_TIME_NONE;
+  }
+
+  if (duration != GST_CLOCK_TIME_NONE) {
+    guint32 number_of_frames;
+
+    /* The Xing Header contains a NumberOfFrames field, which verifies to:
+     * Duration = NumberOfFrames *SamplesPerFrame/SamplingRate
+     * SamplesPerFrame and SamplingRate are values for the current frame. 
+     */
+    number_of_frames = gst_util_uint64_scale (duration, rate, GST_SECOND) / spf;
+    GST_DEBUG ("Setting number of frames to %u", number_of_frames);
+    number_of_frames = GUINT32_TO_BE (number_of_frames);
+    memcpy (data, &number_of_frames, 4);
+    xing_flags_tmp |= GST_XING_FRAME_FIELD;
+    data += 4;
+  }
+
+  if (xing->byte_count != 0) {
+    byte_count = xing->byte_count;
+  } else {
+    GstFormat fmt = GST_FORMAT_BYTES;
+
+    if (!gst_pad_query_peer_duration (xing->sinkpad, &fmt, &byte_count))
+      byte_count = 0;
+    if (byte_count == -1)
+      byte_count = 0;
+  }
+
+  if (byte_count != 0) {
+    guint32 nbytes;
+
+    if (byte_count > G_MAXUINT32) {
+      GST_DEBUG ("Too large stream: %" G_GINT64_FORMAT " > %u bytes",
+          byte_count, G_MAXUINT32);
+    } else {
+      nbytes = byte_count;
+      GST_DEBUG ("Setting number of bytes to %u", nbytes);
+      nbytes = GUINT32_TO_BE (nbytes);
+      memcpy (data, &nbytes, 4);
+      xing_flags_tmp |= GST_XING_BYTES_FIELD;
+      data += 4;
+    }
+  }
+
+  if (xing->seek_table != NULL && byte_count != 0
+      && duration != GST_CLOCK_TIME_NONE) {
+    GList *it;
+    gint percent = 0;
+
+    xing_flags_tmp |= GST_XING_TOC_FIELD;
+
+    GST_DEBUG ("Writing seek table");
+    for (it = xing->seek_table; it != NULL && percent < 100; it = it->next) {
+      GstXingSeekEntry *entry = (GstXingSeekEntry *) it->data;
+      gint64 pos;
+      guchar byte;
+
+      while ((entry->timestamp * 100) / duration >= percent) {
+        pos = (entry->byte * 256) / byte_count;
+        GST_DEBUG ("  %d %% -- %" G_GINT64_FORMAT " 1/256", percent, pos);
+        byte = (guchar) pos;
+        memcpy (data, &byte, 1);
+        data++;
+        percent++;
+      }
+    }
+
+    if (percent < 100) {
+      guchar b;
+      gint i;
+
+      memcpy (&b, data - 1, 1);
+
+      for (i = percent; i < 100; i++) {
+        GST_DEBUG ("  %d %% -- %d 1/256", i, b);
+        memcpy (data, &b, 1);
+        data++;
+      }
+    }
+  }
+
+  GST_DEBUG ("Setting Xing flags to 0x%x\n", xing_flags_tmp);
+  xing_flags_tmp = GUINT32_TO_BE (xing_flags_tmp);
+  memcpy (xing_flags, &xing_flags_tmp, 4);
+  return xing_header;
+}
+
+static void
+gst_xing_mux_base_init (gpointer g_class)
+{
+  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+  static const GstElementDetails gst_xing_mux_details =
+      GST_ELEMENT_DETAILS ("MP3 Xing muxer",
+      "Formatter/Metadata",
+      "Adds a Xing header to the beginning of a VBR MP3 file",
+      "Christophe Fergeau <teuf@gnome.org>");
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_xing_mux_src_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_xing_mux_sink_template));
+
+  GST_DEBUG_CATEGORY_INIT (xing_mux_debug, "xingmux", 0, "Xing Header Muxer");
+
+  gst_element_class_set_details (element_class, &gst_xing_mux_details);
+}
+
+static void
+gst_xing_mux_class_init (GstXingMuxClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *gstelement_class;
+
+  gobject_class = (GObjectClass *) klass;
+  gstelement_class = (GstElementClass *) klass;
+
+  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_xing_mux_finalize);
+  gstelement_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_xing_mux_change_state);
+}
+
+static void
+gst_xing_mux_finalize (GObject * obj)
+{
+  GstXingMux *xing = GST_XING_MUX (obj);
+
+  if (xing->adapter) {
+    g_object_unref (xing->adapter);
+    xing->adapter = NULL;
+  }
+
+  if (xing->seek_table) {
+    g_list_foreach (xing->seek_table, (GFunc) gst_xing_seek_entry_free, NULL);
+    g_list_free (xing->seek_table);
+    xing->seek_table = NULL;
+  }
+
+  G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+xing_reset (GstXingMux * xing)
+{
+  xing->duration = GST_CLOCK_TIME_NONE;
+  xing->byte_count = 0;
+
+  gst_adapter_clear (xing->adapter);
+
+  if (xing->seek_table) {
+    g_list_foreach (xing->seek_table, (GFunc) gst_xing_seek_entry_free, NULL);
+    g_list_free (xing->seek_table);
+    xing->seek_table = NULL;
+  }
+
+  xing->sent_xing = FALSE;
+}
+
+
+static void
+gst_xing_mux_init (GstXingMux * xing, GstXingMuxClass * xingmux_class)
+{
+  GstElementClass *klass = GST_ELEMENT_CLASS (xingmux_class);
+
+  /* pad through which data comes in to the element */
+  xing->sinkpad =
+      gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
+          "sink"), "sink");
+  gst_pad_set_setcaps_function (xing->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_pad_proxy_setcaps));
+  gst_pad_set_chain_function (xing->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_xing_mux_chain));
+  gst_pad_set_event_function (xing->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_xing_mux_sink_event));
+  gst_element_add_pad (GST_ELEMENT (xing), xing->sinkpad);
+
+  /* pad through which data goes out of the element */
+  xing->srcpad =
+      gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
+          "src"), "src");
+  gst_element_add_pad (GST_ELEMENT (xing), xing->srcpad);
+
+  xing->adapter = gst_adapter_new ();
+
+  xing_reset (xing);
+}
+
+static GstFlowReturn
+gst_xing_mux_chain (GstPad * pad, GstBuffer * buffer)
+{
+  GstXingMux *xing = GST_XING_MUX (GST_PAD_PARENT (pad));
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  gst_adapter_push (xing->adapter, buffer);
+
+  while (gst_adapter_available (xing->adapter) >= 4) {
+    const guchar *data = gst_adapter_peek (xing->adapter, 4);
+    guint32 header;
+    GstBuffer *outbuf;
+    GstClockTime duration;
+    guint size, spf;
+    gulong rate;
+    GstXingSeekEntry *seek_entry;
+
+    header = GST_READ_UINT32_BE (data);
+
+    if (!parse_header (header, &size, &spf, &rate)) {
+      GST_DEBUG ("Lost sync, resyncing");
+      gst_adapter_flush (xing->adapter, 1);
+      continue;
+    }
+
+    if (gst_adapter_available (xing->adapter) < size)
+      break;
+
+    outbuf = gst_adapter_take_buffer (xing->adapter, size);
+    gst_buffer_set_caps (outbuf, GST_PAD_CAPS (xing->srcpad));
+
+    if (!xing->sent_xing) {
+      if (has_xing_header (header, GST_BUFFER_DATA (outbuf), size)) {
+        GST_LOG_OBJECT (xing, "Dropping old Xing header");
+        gst_buffer_unref (outbuf);
+        continue;
+      } else {
+        GstBuffer *xing_header;
+        guint64 xing_header_size;
+
+        xing->first_header = header;
+
+        xing_header = generate_xing_header (xing);
+
+        if (xing_header == NULL) {
+          GST_ERROR ("Can't generate Xing header");
+          gst_buffer_unref (outbuf);
+          return GST_FLOW_ERROR;
+        }
+
+        xing_header_size = GST_BUFFER_SIZE (xing_header);
+
+        if (GST_FLOW_IS_FATAL (ret = gst_pad_push (xing->srcpad, xing_header))) {
+          GST_ERROR_OBJECT (xing, "Failed to push Xing header: %s",
+              gst_flow_get_name (ret));
+          gst_buffer_unref (xing_header);
+          gst_buffer_unref (outbuf);
+          return ret;
+        }
+
+        xing->byte_count += xing_header_size;
+        xing->sent_xing = TRUE;
+      }
+    }
+
+    seek_entry = gst_xing_seek_entry_new ();
+    seek_entry->timestamp =
+        (xing->duration == GST_CLOCK_TIME_NONE) ? 0 : xing->duration;
+    /* Workaround for parsers checking that the first seek table entry is 0 */
+    seek_entry->byte = (seek_entry->timestamp == 0) ? 0 : xing->byte_count;
+    xing->seek_table = g_list_append (xing->seek_table, seek_entry);
+
+    duration = gst_util_uint64_scale (spf, GST_SECOND, rate);
+
+    GST_BUFFER_TIMESTAMP (outbuf) =
+        (xing->duration == GST_CLOCK_TIME_NONE) ? 0 : xing->duration;
+    GST_BUFFER_DURATION (outbuf) = duration;
+    GST_BUFFER_OFFSET (outbuf) = xing->byte_count;
+    GST_BUFFER_OFFSET_END (outbuf) =
+        xing->byte_count + GST_BUFFER_SIZE (outbuf);
+
+    xing->byte_count += GST_BUFFER_SIZE (outbuf);
+
+    if (xing->duration == GST_CLOCK_TIME_NONE)
+      xing->duration = duration;
+    else
+      xing->duration += duration;
+
+    if (GST_FLOW_IS_FATAL (ret = gst_pad_push (xing->srcpad, outbuf))) {
+      GST_ERROR_OBJECT (xing, "Failed to push MP3 frame: %s",
+          gst_flow_get_name (ret));
+      return ret;
+    }
+  }
+
+  return ret;
+}
+
+static gboolean
+gst_xing_mux_sink_event (GstPad * pad, GstEvent * event)
+{
+  GstXingMux *xing;
+  gboolean result;
+
+  xing = GST_XING_MUX (gst_pad_get_parent (pad));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_NEWSEGMENT:
+      if (xing->sent_xing) {
+        GST_ERROR ("Already sent Xing header, dropping NEWSEGMENT event!");
+        gst_event_unref (event);
+        result = FALSE;
+      } else {
+        GstFormat fmt;
+
+        gst_event_parse_new_segment (event, NULL, NULL, &fmt, NULL, NULL, NULL);
+
+        if (fmt == GST_FORMAT_BYTES) {
+          result = gst_pad_push_event (xing->srcpad, event);
+        } else {
+          gst_event_unref (event);
+
+          event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES,
+              0, GST_CLOCK_TIME_NONE, 0);
+
+          result = gst_pad_push_event (xing->srcpad, event);
+        }
+      }
+      break;
+
+    case GST_EVENT_EOS:{
+      GstEvent *n_event;
+
+      GST_DEBUG_OBJECT (xing, "handling EOS event");
+
+      if (xing->sent_xing) {
+
+        n_event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES,
+            0, GST_CLOCK_TIME_NONE, 0);
+
+        if (G_UNLIKELY (!gst_pad_push_event (xing->srcpad, n_event))) {
+          GST_WARNING
+              ("Failed to seek to position 0 for pushing the Xing header");
+        } else {
+          GstBuffer *header;
+          GstFlowReturn ret;
+
+          header = generate_xing_header (xing);
+
+          if (header == NULL) {
+            GST_ERROR ("Can't generate Xing header");
+          } else {
+
+            GST_INFO ("Writing real Xing header to beginning of stream");
+
+            if (GST_FLOW_IS_FATAL (ret = gst_pad_push (xing->srcpad, header)))
+              GST_WARNING ("Failed to push updated Xing header: %s\n",
+                  gst_flow_get_name (ret));
+          }
+        }
+      }
+      result = gst_pad_push_event (xing->srcpad, event);
+      break;
+    }
+    default:
+      result = gst_pad_event_default (pad, event);
+      break;
+  }
+  gst_object_unref (GST_OBJECT (xing));
+
+  return result;
+}
+
+
+static GstStateChangeReturn
+gst_xing_mux_change_state (GstElement * element, GstStateChange transition)
+{
+  GstXingMux *xing;
+  GstStateChangeReturn result;
+
+  xing = GST_XING_MUX (element);
+
+  result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      xing_reset (xing);
+      break;
+    default:
+      break;
+  }
+
+  return result;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/gst/mpegaudioparse/gstxingmux.h	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2006 Christophe Fergeau  <teuf@gnome.org>
+ * Copyright (c) 2008 Sebastian Dröge  <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/gst.h>
+#include <gst/base/gstadapter.h>
+
+#ifndef __GST_XINGMUX_H__
+#define __GST_XINGMUX_H__
+
+G_BEGIN_DECLS
+
+/* Standard macros for defining types for this element.  */
+#define GST_TYPE_XING_MUX \
+  (gst_xing_mux_get_type())
+#define GST_XING_MUX(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_XING_MUX,GstXingMux))
+#define GST_XING_MUX_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_XING_MUX,GstXingMuxClass))
+#define GST_IS_XING_MUX(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XING_MUX))
+#define GST_IS_XING_MUX_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XING_MUX))
+
+typedef struct _GstXingMux GstXingMux;
+typedef struct _GstXingMuxClass GstXingMuxClass;
+
+/* Definition of structure storing data for this element. */
+
+/**
+ * GstXingMux:
+ *
+ * Opaque data structure.
+ */
+struct _GstXingMux {
+  GstElement element;
+
+  GstPad *sinkpad, *srcpad;
+
+  /* < private > */
+
+  GstAdapter *adapter;
+  GstClockTime duration;
+  guint64 byte_count;
+  guint64 frame_count;
+  GList *seek_table;
+  gboolean sent_xing;
+
+  /* Copy of the first frame header */
+  guint32 first_header;
+};
+
+/* Standard definition defining a class for this element. */
+
+/**
+ * GstXingMuxClass:
+ *
+ * Opaque data structure.
+ */
+struct _GstXingMuxClass {
+  GstElementClass parent_class;
+};
+
+/* Standard function returning type information. */
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+GType gst_xing_mux_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_XINGMUX_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/gst/mpegaudioparse/plugin.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,49 @@
+/* GStreamer
+ * Copyright (C) <2008> Jan Schmidt <jan.schmidt@sun.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "../../config.h"
+#endif
+
+#include <gst/gst.h>
+#include "gstmpegaudioparse.h"
+#include "gstxingmux.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  if (!gst_element_register (plugin, "xingmux", GST_RANK_NONE,
+          GST_TYPE_XING_MUX))
+    return FALSE;
+  if (!gst_element_register (plugin, "mp3parse", GST_RANK_PRIMARY + 1,
+          GST_TYPE_MP3PARSE))
+    return FALSE;
+
+  return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    "mpegaudioparse",
+    "MPEG-1 layer 1/2/3 audio stream elements",
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
+EXPORT_C GstPluginDesc* _GST_PLUGIN_DESC()
+{
+    return &gst_plugin_desc;
+}
--- a/gst_plugins_good/gst/qtdemux/gstrtpxqtdepay.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/gst/qtdemux/gstrtpxqtdepay.h	Thu Jul 22 16:36:00 2010 +0100
@@ -57,6 +57,9 @@
   GstBaseRTPDepayloadClass parent_class;
 };
 
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
 GType gst_rtp_xqt_depay_get_type (void);
 
 G_END_DECLS
--- a/gst_plugins_good/gst/qtdemux/qtdemux.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/gst/qtdemux/qtdemux.c	Thu Jul 22 16:36:00 2010 +0100
@@ -4797,7 +4797,10 @@
 
   /* re-route to normal string tag if not 3GP */
   if (!qtdemux_is_string_3gp (qtdemux, FOURCC_kywd))
-    return qtdemux_tag_add_str (qtdemux, tag, dummy, node);
+    {
+    	qtdemux_tag_add_str (qtdemux, tag, dummy, node);
+    	return ;
+    }
 
   GST_DEBUG_OBJECT (qtdemux, "found 3gpp keyword tag");
 
@@ -5013,7 +5016,10 @@
 
   /* re-route to normal string tag if 3GP */
   if (qtdemux_is_string_3gp (qtdemux, FOURCC_gnre))
-    return qtdemux_tag_add_str (qtdemux, tag, dummy, node);
+	{
+		qtdemux_tag_add_str (qtdemux, tag, dummy, node);
+		return;
+	}
 
   data = qtdemux_tree_get_child_by_type (node, FOURCC_data);
   if (data) {
--- a/gst_plugins_good/gst/qtdemux/qtdemux.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_good/gst/qtdemux/qtdemux.h	Thu Jul 22 16:36:00 2010 +0100
@@ -101,6 +101,9 @@
   GstElementClass parent_class;
 };
 
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
 GType gst_qtdemux_get_type (void);
 
 G_END_DECLS
--- a/gst_plugins_symbian/group/gstamrmux.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/group/gstamrmux.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,14 +37,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-
-
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 
--- a/gst_plugins_symbian/group/gstdevsoundext.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/group/gstdevsoundext.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,10 +44,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/audio
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst/devsound
 SOURCE          gsterrorconcealment.c
--- a/gst_plugins_symbian/group/gstdevsoundsink.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/group/gstdevsoundsink.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -44,10 +44,8 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/audio
 
 SOURCEPATH      ../gst/devsound
 SOURCE          gstdevsoundsinkaudio.c
--- a/gst_plugins_symbian/group/gstdevsoundsrc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/group/gstdevsoundsrc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -43,10 +43,8 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/audio
 
 
 SOURCEPATH      ../gst/devsound
--- a/gst_plugins_symbian/gst/AudioRecordBin/group/GstAudioRecordBin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/AudioRecordBin/group/GstAudioRecordBin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -39,10 +39,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-
-USERINCLUDE		../../../../include/gstreamer
-USERINCLUDE		../../../../include/gstreamer/gst
-USERINCLUDE		../../../../include/gstreamer/gst/audio
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 USERINCLUDE	 ../inc
--- a/gst_plugins_symbian/gst/AudioRecordBin/src/GstAudioRecordBin.cpp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/AudioRecordBin/src/GstAudioRecordBin.cpp	Thu Jul 22 16:36:00 2010 +0100
@@ -29,6 +29,10 @@
 #include <stdlib.h>
 
 GST_DEBUG_CATEGORY_STATIC (aud_recbin_cat);     // define category (statically)
+#ifdef GST_CAT_DEFAULT
+#undef GST_CAT_DEFAULT
+#endif
+
 #define GST_CAT_DEFAULT aud_recbin_cat     // set as default
 
 /** Macro to enable weak ref monitoring, used to track
@@ -56,9 +60,10 @@
     /** The caps expected to be supported by a src pad */
     GstCaps* srcCaps;
 } FilterData;
-
+#ifdef ENABLE_CAPS_FILTER
 /** Create the capability filter */
 static GstElement* sCreateCapsFilter( GstCaps* encCaps);
+#endif
 
 /** Creates the element , which accepts \a sinkcaps and 
  * provides \a srccaps on the src pad */
@@ -537,6 +542,7 @@
         gst_object_unref( encbin );
     return NULL;
 }
+#ifdef ENABLE_CAPS_FILTER
 /** Create the caps filter */
 GstElement* sCreateCapsFilter( GstCaps* encCaps)
 {
@@ -552,7 +558,7 @@
 
     return audiofilter;
 }
-
+#endif
 /** Create a filter, which accepts \a encCaps on sink pad and 
  * provides \a muxCaps on the src pad */
 GstElement* sCreateCompatibleFilter(GstFactoryListType type,
--- a/gst_plugins_symbian/gst/amrmux/gstamrmux.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/amrmux/gstamrmux.c	Thu Jul 22 16:36:00 2010 +0100
@@ -97,7 +97,7 @@
 
     gst_amrmux_type =
         g_type_register_static (GST_TYPE_ELEMENT, "GstAmrMux",
-        &amrmux_info, 0);
+        &amrmux_info, (GTypeFlags)0);
   }
   return gst_amrmux_type;
 }
@@ -138,7 +138,7 @@
   
   g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HEADER,
         g_param_spec_boolean ("header", "header",
-            "For writing AMR header", TRUE, G_PARAM_READWRITE));
+            "For writing AMR header", TRUE, (GParamFlags)G_PARAM_READWRITE));
   
  
  }
--- a/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.cpp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.cpp	Thu Jul 22 16:36:00 2010 +0100
@@ -42,6 +42,7 @@
     iIlbcDecoderIntfc = NULL;
     iCallbackError = KErrNone;
     iAudioOutput = NULL;
+    iIsBufferToBeFilledDone = TRUE;
     }
 
 /*********************************************************/
@@ -78,6 +79,7 @@
         {
         User::RequestComplete(stat, KErrNone);
         iCallbackError = KErrNone;
+        iIsBufferToBeFilledDone = FALSE;
         }
     else
         {
@@ -613,15 +615,19 @@
 int playinit(DevSoundWrapper *handle)
     {
     TRACE_PRN_FN_ENT;
-
-    ((handle)->AL)->InitialiseActiveListener();
-    handle->eosReceived = false;
+    handle->iCallbackError = KErrNone;
+    if( handle->iIsBufferToBeFilledDone )
+    {
+        ((handle)->AL)->InitialiseActiveListener();
+        handle->eosReceived = false;
+    
+        TRAP(handle->iCallbackError,(handle->dev_sound)->PlayInitL());
+        if (handle->iCallbackError == KErrNone)
+            {
+            ((handle)->AL)->StartActiveScheduler();
+            }    
+    }
 
-    TRAP(handle->iCallbackError,(handle->dev_sound)->PlayInitL());
-    if (handle->iCallbackError == KErrNone)
-        {
-        ((handle)->AL)->StartActiveScheduler();
-        }
 
     TRACE_PRN_IF_ERR(handle->iCallbackError);
     TRACE_PRN_FN_EXT;
@@ -679,7 +685,7 @@
     (handle->dev_sound)->PlayData();
 
     ((handle)->AL)->StartActiveScheduler();
-
+    handle->iIsBufferToBeFilledDone = TRUE;
     TRACE_PRN_FN_EXT;
     return KErrNone;
     }
--- a/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.h	Thu Jul 22 16:36:00 2010 +0100
@@ -105,7 +105,7 @@
     CG729DecoderIntfc*      iG729DecoderIntfc;
     CIlbcDecoderIntfc*      iIlbcDecoderIntfc;
     CAudioOutput*           iAudioOutput;
-
+    bool iIsBufferToBeFilledDone;
 
 public:
 	void InitializeComplete(TInt aError);
--- a/gst_plugins_symbian/gst/devsound/devsoundsrcwrapper.cpp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/devsoundsrcwrapper.cpp	Thu Jul 22 16:36:00 2010 +0100
@@ -307,7 +307,7 @@
 
     g_list_foreach(ds->fmt, (GFunc) g_free, NULL);
     g_list_free(ds->fmt);
-    
+    ds->fmt = NULL;
     delete (STATIC_CAST(DevSoundWrapperSrc*, ds->handle))->iAudoInputRecord;
     delete ds->handle;
     TRACE_PRN_FN_EXT;
--- a/gst_plugins_symbian/gst/devsound/gstdevsoundsink.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstdevsoundsink.c	Thu Jul 22 16:36:00 2010 +0100
@@ -38,6 +38,10 @@
 
 
 GST_DEBUG_CATEGORY_EXTERN (devsound_debug);
+#ifdef GST_CAT_DEFAULT
+#undef GST_CAT_DEFAULT
+#endif
+
 #define GST_CAT_DEFAULT devsound_debug
 
 /* elementfactory information */
@@ -81,7 +85,7 @@
 //Error concealment interface impl
 static void gst_error_concealment_handler_init (gpointer g_iface,
     gpointer iface_data);
-static gint gst_ConcealErrorForNextBuffer();
+static gint gst_ConcealErrorForNextBuffer(void);
 static gint gst_SetFrameMode(gboolean aFrameMode);
 static gint gst_FrameModeRqrdForEC(gboolean* aFrameModeRqrd);
 static void gst_Apply_ErrorConcealment_Update(GstDevsoundSink* dssink);
@@ -99,7 +103,7 @@
 //G729 interface impl
 static void gst_g729_decoder_handler_init (gpointer g_iface,
     gpointer iface_data);
-static gint gst_BadLsfNextBuffer();
+static gint gst_BadLsfNextBuffer(void);
 static void gst_Apply_G729_Decoder_Update(GstDevsoundSink* dssink );
 
 //Ilbc interface impl
@@ -207,7 +211,7 @@
                 "audio/AMR, " "rate = (int) 8000, " "channels = (int) 1 ; "
                 "audio/x-alaw, " "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]; "
                 "audio/g729, " "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]; "
-                "audio/mp3, " "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]; "                
+                "audio/mpeg, mpegversion = (int) 1, layer = (int) [ 1, 3 ], rate = (int) [ 8000, 48000 ], channels = (int) [ 1, 2 ]; "                
                 "audio/ilbc, " "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]; "
                 "audio/x-mulaw, " "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]")
                 );
@@ -260,7 +264,7 @@
 
         devsoundsink_type =
         g_type_register_static (GST_TYPE_BASE_SINK, "GstDevsoundSink",
-            &devsoundsink_info, 0);
+            &devsoundsink_info, (GTypeFlags)0);
 
 
         g_type_add_interface_static (devsoundsink_type, GST_TYPE_ERROR_CONCEALMENT,
@@ -334,15 +338,15 @@
     
     g_object_class_install_property(gobject_class, PROP_DEVICE,
             g_param_spec_string("device", "Device", "Devsound device ",
-            DEFAULT_DEVICE, G_PARAM_READWRITE));
+            DEFAULT_DEVICE, (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, VOLUME,
                 g_param_spec_int("volume", "Volume", "Devsound volume",
-                        -1, G_MAXINT, -1, G_PARAM_READWRITE));
+                        -1, G_MAXINT, -1, (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, VOLUMERAMP,
               g_param_spec_int("volumeramp", "VolumeRamp", "Devsound volume ramp",
-                      -1, G_MAXINT, -1, G_PARAM_READWRITE));
+                      -1, G_MAXINT, -1, (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, MAXVOLUME,
             g_param_spec_int("maxvolume", "MaxVolume", "Devsound max volume",
@@ -350,11 +354,11 @@
 
     g_object_class_install_property(gobject_class, LEFTBALANCE,
                   g_param_spec_int("leftbalance", "Left Balance", "Left Balance",
-                          -1, G_MAXINT, -1, G_PARAM_READWRITE));
+                          -1, G_MAXINT, -1, (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, RIGHTBALANCE,
                    g_param_spec_int("rightbalance", "Right Balance", "Right Balance",
-                           -1, G_MAXINT, -1, G_PARAM_READWRITE));
+                           -1, G_MAXINT, -1, (GParamFlags)G_PARAM_READWRITE));
 /*
     g_object_class_install_property(gobject_class, SAMPLESPLAYED,
                       g_param_spec_int("samplesplayed", "Samples Played", "Samples Played",
@@ -363,12 +367,12 @@
     g_object_class_install_property(gobject_class, PRIORITY,
             g_param_spec_int("priority", "Priority", "Priority ", -1,
                     G_MAXINT, -1,
-                    G_PARAM_READWRITE));
+                    (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, PREFERENCE,
             g_param_spec_int("preference", "Preference", "Preference ", -1,
                     G_MAXINT, -1,
-                    G_PARAM_READWRITE));
+                    (GParamFlags)G_PARAM_READWRITE));
 /*
     g_object_class_install_property(gobject_class, RATE,
             g_param_spec_int("rate", "Rate", "Rate ", -1,
@@ -383,7 +387,7 @@
     g_object_class_install_property(gobject_class, OUTPUTDEVICE,
              g_param_spec_int("outputdevice", "Output Device", "Output Device ", -1,
                      G_MAXINT, -1,
-                     G_PARAM_READWRITE));
+                     (GParamFlags)G_PARAM_READWRITE));
     
 #ifdef AV_SYNC
     gstelement_class->provide_clock = GST_DEBUG_FUNCPTR (gst_devsound_sink_provide_clock);
@@ -821,7 +825,7 @@
         {
         devsoundsink->fourcc = 0x39323747; //KMccFourCCIdG729   
         }
-    else if (!strncmp(mimetype, "audio/mp3", 9))
+    else if (!strncmp(mimetype, "audio/mpeg", 10))
         {
         devsoundsink->fourcc = 0x33504d20; //KMMFFourCCCodeMP3    
         }
@@ -1221,6 +1225,7 @@
 static gint gst_BadLsfNextBuffer()
     {
     customInfaceUpdate.g729badlsfnextbufferupdate = TRUE;
+    return 0;
     }
 
 static void gst_Apply_G729_Decoder_Update(GstDevsoundSink* dssink )
--- a/gst_plugins_symbian/gst/devsound/gstdevsoundsrc.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstdevsoundsrc.c	Thu Jul 22 16:36:00 2010 +0100
@@ -36,6 +36,10 @@
 #include "string.h"
 
 GST_DEBUG_CATEGORY_EXTERN (devsoundsrc_debug);
+#ifdef GST_CAT_DEFAULT
+#undef GST_CAT_DEFAULT
+#endif
+
 #define GST_CAT_DEFAULT devsoundsrc_debug
 
 /* elementfactory information */
@@ -284,7 +288,7 @@
 
     devsoundsrc_type =
     g_type_register_static (GST_TYPE_PUSH_SRC, "GstDevsoundSrc",
-            &devsoundsrc_info, 0);
+            &devsoundsrc_info, (GTypeFlags)0);
 
     g_type_add_interface_static (devsoundsrc_type, GST_TYPE_SPEECH_ENCODER_CONFIG,
             &speech_encoder_config_info);
@@ -331,11 +335,11 @@
     
     g_object_class_install_property(gobject_class, PROP_DEVICE,
             g_param_spec_string("device", "Device", "Devsound device ",
-                    DEFAULT_DEVICE, G_PARAM_READWRITE));
+                    DEFAULT_DEVICE, (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, GAIN, g_param_spec_int(
             "gain", "Gain", "Devsound src gain", -1, G_MAXINT, -1,
-            G_PARAM_READWRITE));
+            (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, MAXGAIN, g_param_spec_int(
             "maxgain", "MaxGain", "Devsound src max gain", -1, G_MAXINT, -1,
@@ -343,11 +347,11 @@
 
     g_object_class_install_property(gobject_class, LEFTBALANCE,
             g_param_spec_int("leftbalance", "Left Balance", "Left Balance",
-                    -1, G_MAXINT, -1, G_PARAM_READWRITE));
+                    -1, G_MAXINT, -1, (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, RIGHTBALANCE,
             g_param_spec_int("rightbalance", "Right Balance",
-                    "Right Balance", -1, G_MAXINT, -1, G_PARAM_READWRITE));
+                    "Right Balance", -1, G_MAXINT, -1, (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, SAMPLESRECORDED,
             g_param_spec_int("samplesrecorded", "Samples Recorded",
@@ -356,22 +360,22 @@
     g_object_class_install_property(gobject_class, PRIORITY,
             g_param_spec_int("priority", "Priority", "Priority ", -1,
             G_MAXINT, -1,
-            G_PARAM_READWRITE));
+            (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, PREFERENCE,
             g_param_spec_int("preference", "Preference", "Preference ", -1,
             G_MAXINT, -1,
-            G_PARAM_READWRITE));
+            (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, RATE,
             g_param_spec_int("rate", "Rate", "Rate ", -1,
                     G_MAXINT, -1,
-                    G_PARAM_READWRITE));
+                    (GParamFlags)G_PARAM_READWRITE));
 
     g_object_class_install_property(gobject_class, CHANNELS,
             g_param_spec_int("channels", "Channels", "Channels ", -1,
                     G_MAXINT, -1,
-                    G_PARAM_READWRITE));
+                    (GParamFlags)G_PARAM_READWRITE));
     
     gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_devsound_src_start);
     gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_devsound_src_stop);
@@ -390,8 +394,9 @@
     devsoundsrc->handle=NULL;
     devsoundsrc->preference = 0; //default=>EMdaPriorityPreferenceNone;
     devsoundsrc->priority = 0;   //default=>EMdaPriorityNormal;
-    pthread_mutex_init(&create_mutex1, NULL);
-    pthread_cond_init(&create_condition1, NULL);
+    devsoundsrc->firstTimeInit = kUnInitialized;
+//    pthread_mutex_init(&create_mutex1, NULL);
+//    pthread_cond_init(&create_condition1, NULL);
     //gst_debug_log(devsound_debug, GST_LEVEL_LOG, "", "", 0, (GObject *) devsoundsrc, "gst_devsound_src_init EXIT ",NULL);
     }
 
@@ -684,7 +689,9 @@
     GstBuffer *tmp_gstbuffer=NULL;	
     GstDevsoundSrc *src= GST_DEVSOUND_SRC(bsrc);
     //gst_debug_log(devsound_debug, GST_LEVEL_LOG, "", "", 0, (GObject *) src, "gst_devsound_src_start ENTER ",NULL);
-
+    pthread_mutex_init(&create_mutex1, NULL);
+    pthread_cond_init(&create_condition1, NULL);
+    
     if(dataqueue)
         {
         while (g_queue_get_length(dataqueue))
@@ -763,6 +770,8 @@
     pthread_cond_destroy(&(create_condition1));
 
     g_free(src->device);
+    src->device = NULL;
+    src->firstTimeInit = kUnInitialized;
     //gst_debug_log(devsound_debug, GST_LEVEL_LOG, "", "", 0, (GObject *) src, "gst_devsound_src_stop EXIT ");
     return TRUE;
     }
@@ -873,8 +882,14 @@
             GST_OBJECT_UNLOCK(dsrc);
             //gst_debug_log(devsound_debug, GST_LEVEL_LOG, "", "", 0, (GObject *) dsrc, "AFTER POP in CREATE ",NULL);
             if(!popBuffer)
-                {
-                return GST_FLOW_UNEXPECTED;
+            	{
+              	return GST_FLOW_UNEXPECTED;
+            	}
+            if(dsrc->firstTimeInit != kPlayed)
+                {        
+                dsrc->prevbuffersize = gst_base_src_get_blocksize(src);
+                gst_base_src_set_blocksize (src, GST_BUFFER_SIZE(popBuffer));
+                (*buf)->size = GST_BUFFER_SIZE(popBuffer);
                 }
             // copy the data from the popped buffer based on how much of the incoming
             //buffer size is left to fill. we might have filled the fresh buffer somewhat
@@ -905,7 +920,19 @@
                 popBuffer = NULL;
                 }
             }
-        }
+        if (dsrc->firstTimeInit == kPlayBufferPreRoll)
+            {
+            gst_base_src_set_blocksize (src, dsrc->prevbuffersize);
+            dsrc->firstTimeInit = kPlayed;
+            return GST_FLOW_OK;
+            }
+        
+        if (dsrc->firstTimeInit == kPausedToPlaying)
+            {
+            dsrc->firstTimeInit = kPlayBufferPreRoll;
+            return GST_FLOW_OK;
+            }
+       }
     //gst_debug_log(devsound_debug, GST_LEVEL_LOG, "", "", 0, (GObject *) dsrc, "gst_devsound_src_create EXIT ",NULL);
     return GST_FLOW_OK;
     }
@@ -916,10 +943,12 @@
     {
     GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
     GstDevsoundSrc *src= GST_DEVSOUND_SRC (element);
-    
+ 
     switch (transition) {
         
         case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+            if (src->firstTimeInit != kPlayed)
+            src->firstTimeInit = kPausedToPlaying;
             if(cmd == PAUSE)
                 {
                 cmd = RESUME;
--- a/gst_plugins_symbian/gst/devsound/gstdevsoundsrc.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstdevsoundsrc.h	Thu Jul 22 16:36:00 2010 +0100
@@ -54,6 +54,13 @@
 gboolean  priorityupdate;
 };
 
+typedef enum
+{
+    kUnInitialized = -1,
+    kPausedToPlaying,
+    kPlayBufferPreRoll,
+    kPlayed
+} ;
 struct _GstDevsoundSrc {
     GstPushSrc    src;
 
@@ -86,7 +93,8 @@
   gboolean g729vadmode;
   gint ilbcencodemode;
   gboolean ilbcvadmode;
-
+  gint firstTimeInit;
+  guint prevbuffersize;
   
 };
 
--- a/gst_plugins_symbian/gst/devsound/gsterrorconcealment.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gsterrorconcealment.c	Thu Jul 22 16:36:00 2010 +0100
@@ -54,7 +54,7 @@
 
   
     error_concealment_type = g_type_register_static (G_TYPE_INTERFACE, "GstErrorConcealment",
-        &error_concealment_info, 0);
+        &error_concealment_info, (GTypeFlags)0);
 
   }
 
--- a/gst_plugins_symbian/gst/devsound/gstg711decoderinterface.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstg711decoderinterface.c	Thu Jul 22 16:36:00 2010 +0100
@@ -56,7 +56,7 @@
 
 
     g711_decoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstG711DecoderInterface",
-        &g711_decoder_info, 0);
+        &g711_decoder_info, (GTypeFlags)0);
 
   }
 
--- a/gst_plugins_symbian/gst/devsound/gstg711encoderinterface.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstg711encoderinterface.c	Thu Jul 22 16:36:00 2010 +0100
@@ -55,7 +55,7 @@
 
   
     g711_encoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstG711EncoderInterface",
-        &g711_encoder_info, 0);
+        &g711_encoder_info, (GTypeFlags)0);
   
   }
 
--- a/gst_plugins_symbian/gst/devsound/gstg729decoderinterface.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstg729decoderinterface.c	Thu Jul 22 16:36:00 2010 +0100
@@ -55,7 +55,7 @@
 
   
     g729_decoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstG729DecoderInterface",
-        &g729_decoder_info, 0);
+        &g729_decoder_info, (GTypeFlags)0);
   
   }
 
--- a/gst_plugins_symbian/gst/devsound/gstg729encoderinterface.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstg729encoderinterface.c	Thu Jul 22 16:36:00 2010 +0100
@@ -54,7 +54,7 @@
 
   
     g729_encoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstG729EncoderInterface",
-        &g729_encoder_info, 0);
+        &g729_encoder_info, (GTypeFlags)0);
   
   }
 
--- a/gst_plugins_symbian/gst/devsound/gstilbcdecoderinterface.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstilbcdecoderinterface.c	Thu Jul 22 16:36:00 2010 +0100
@@ -55,7 +55,7 @@
 
   
     ilbc_decoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstIlbcDecoderInterface",
-        &ilbc_decoder_info, 0);
+        &ilbc_decoder_info, (GTypeFlags)0);
   
   }
 
--- a/gst_plugins_symbian/gst/devsound/gstilbcencoderinterface.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstilbcencoderinterface.c	Thu Jul 22 16:36:00 2010 +0100
@@ -55,7 +55,7 @@
 
   
     ilbc_encoder_type = g_type_register_static (G_TYPE_INTERFACE, "GstIlbcEncoderInterface",
-        &ilbc_encoder_info, 0);
+        &ilbc_encoder_info, (GTypeFlags)0);
   
   }
 
--- a/gst_plugins_symbian/gst/devsound/gstspeechencoderconfig.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/gst/devsound/gstspeechencoderconfig.c	Thu Jul 22 16:36:00 2010 +0100
@@ -24,7 +24,7 @@
 #include "config.h"
 #endif
 
-#include "gstregistry.h"
+#include "gst/gstregistry.h"
 
 #include "gstspeechencoderconfig.h"
 
@@ -55,7 +55,7 @@
 
   
     speech_encoder_config_type = g_type_register_static (G_TYPE_INTERFACE, "GstSpeechEncoderConfig",
-        &speech_encoder_config_info, 0);
+        &speech_encoder_config_info, (GTypeFlags)0);
 
   }
 
--- a/gst_plugins_symbian/tsrc/gstreamertestmodule/group/GStreamerTestClass.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/tsrc/gstreamertestmodule/group/GStreamerTestClass.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -50,10 +50,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-
-USERINCLUDE		../../../../include/gstreamer
-USERINCLUDE		../../../../include/gstreamer/gst
-USERINCLUDE		../../../../include/gstreamer/gst/base
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 // FIXME  Fix this path when we check in this project.
 USERINCLUDE     ../../../gst/devsound
--- a/gst_plugins_symbian/tsrc/gstreamertestmodule/inc/GStreamerTestClass.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/tsrc/gstreamertestmodule/inc/GStreamerTestClass.h	Thu Jul 22 16:36:00 2010 +0100
@@ -468,6 +468,7 @@
 		TInt SetMainLoopRun( CStifItemParser& aItem );
 		TInt GetConfigureData();
 		TInt SetConfigureData();
+		TInt PlayBack( CStifItemParser& aItem );
 
 
     
--- a/gst_plugins_symbian/tsrc/gstreamertestmodule/src/GStreamerTestClassBlocks.cpp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gst_plugins_symbian/tsrc/gstreamertestmodule/src/GStreamerTestClassBlocks.cpp	Thu Jul 22 16:36:00 2010 +0100
@@ -281,6 +281,7 @@
         ENTRY( "CheckProperties", CGStreamerTestClass::CheckProperties ),
         ENTRY( "GstReliabilitytestPlaypause", CGStreamerTestClass::GstReliabilitytestPlaypause ),
         ENTRY( "GstReliabilitytestRecording", CGStreamerTestClass::GstReliabilitytestRecording ),
+        ENTRY( "PlayBack", CGStreamerTestClass::PlayBack ),  
         };
 
     const TInt count = sizeof( KFunctions ) / 
@@ -593,6 +594,142 @@
     return KErrNone;
     }
 
+/*** block b  from ../../../docs/manual/highlevel-components.xml ***/
+static gboolean
+my_bus_callback (GstBus     *bus,
+         GstMessage *message,
+         gpointer    data)
+{
+      
+  GMainLoop *loop = ( GMainLoop * )data;
+
+  switch (GST_MESSAGE_TYPE (message)) {
+    case GST_MESSAGE_ERROR: {
+      GError *err;
+      gchar *debug;
+
+      gst_message_parse_error (message, &err, &debug);
+      g_print ("Error: %s\n", err->message);
+      g_error_free (err);
+      g_free (debug);
+
+      g_main_loop_quit (loop);
+      break;
+    }
+    case GST_MESSAGE_EOS:
+        
+       /* end-of-stream */
+      g_main_loop_quit (loop);
+      break;
+    default:
+      /* unhandled message */
+      break;
+  }
+
+  /* remove message from the queue */
+  return TRUE;
+}
+
+/*** block c  from ../../../docs/manual/highlevel-components.xml ***/
+GstElement *pipeline;
+GstPad* devsoundsinkpad = NULL;
+
+static void
+cb_newpad (GstElement *decodebin,
+       GstPad     *pad,
+       gboolean    last,
+       gpointer    data)
+{
+    GstCaps *caps;
+      GstStructure *str;
+      GstPadLinkReturn linkret= GST_PAD_LINK_OK ;
+
+      /* check media type */
+      caps = gst_pad_get_caps (pad);
+      str = gst_caps_get_structure (caps, 0);
+      if (!g_strrstr (gst_structure_get_name (str), "audio")) {
+        gst_caps_unref (caps);
+        return;
+      }
+      gst_caps_unref (caps);
+
+      /* link'n'play */
+      linkret = gst_pad_link (pad, devsoundsinkpad);
+}
+
+
+gboolean  cb_autoplug( GstBin * *bin,
+                        GstPad        *pad,
+                        GstCaps       *caps,
+                        gpointer       user_data)
+{
+    
+    GstCaps* sinkcaps = NULL;    
+    gboolean supported = FALSE; 
+    
+    sinkcaps = gst_pad_get_caps( devsoundsinkpad );
+        
+    supported = gst_caps_is_subset( caps, sinkcaps );
+    
+    if( supported )
+    {
+      return FALSE;
+    }
+   
+    return TRUE;
+
+}
+
+
+
+TInt CGStreamerTestClass::PlayBack( CStifItemParser& aItem )
+{
+      GMainLoop *loop;
+      GstElement *src, *dec, *sink;
+      GstBus *bus;            
+      
+      FTRACE(FPrint(_L("CGStreamerTestClass::PlayBack")));     
+      
+      iLog->Log(_L(">>filesrc creation "));
+
+      src = gst_element_factory_make ("filesrc", "source");
+      
+      iLog->Log(_L("<<filesrc creation "));
+      
+      TPtrC location;
+      TFileName filename;
+      
+      char carray[1024];
+      aItem.GetNextString(location);
+      filename.Copy(location);
+      wcstombs(carray, (const wchar_t *)filename.PtrZ(), 1024);
+                      
+      g_object_set (G_OBJECT (src), "location", carray, NULL);
+      
+     // gst_bin_add_many(GST_BIN (iObjects->iPipeline),src, NULL);
+      
+      iLog->Log(_L(">>decodebin2 creation "));
+      dec = gst_element_factory_make ("decodebin2", "decoder");
+      iLog->Log(_L("<<decodebin2 creation "));       
+
+      /* create audio output */     
+      sink = gst_element_factory_make ("devsoundsink", "sink");
+            
+      gst_bin_add_many (GST_BIN (iObjects->iPipeline), src, dec, sink, NULL);
+      
+      devsoundsinkpad = gst_element_get_pad( sink, "sink");          
+      
+      g_signal_connect (dec, "new-decoded-pad", G_CALLBACK (cb_newpad), NULL);
+      g_signal_connect (dec, "autoplug-continue", G_CALLBACK (cb_autoplug), NULL);
+      
+      gst_element_link (src, dec);        
+           
+      iLog->Log(_L("<<Setting pipeline to Play"));
+            
+      return KErrNone;   
+    
+}
+
 // -----------------------------------------------------------------------------
 // CGStreamerTestClass::CreatePipeLine
 // Create Pipeline
--- a/gstreamer_core/group/bld.inf	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/group/bld.inf	Thu Jul 22 16:36:00 2010 +0100
@@ -25,93 +25,93 @@
 DEFAULT
 
 PRJ_EXPORTS
-../gst/glib-compat.h					/sf/mw/gstreamer/include/gstreamer/gst/glib-compat.h
-../gst/gstbin.h						/sf/mw/gstreamer/include/gstreamer/gst/gstbin.h
-../gst/gstbuffer.h					/sf/mw/gstreamer/include/gstreamer/gst/gstbuffer.h
-../gst/gstbus.h						/sf/mw/gstreamer/include/gstreamer/gst/gstbus.h
-../gst/gstcaps.h					/sf/mw/gstreamer/include/gstreamer/gst/gstcaps.h
-../gst/gstchildproxy.h					/sf/mw/gstreamer/include/gstreamer/gst/gstchildproxy.h
-../gst/gstclock.h					/sf/mw/gstreamer/include/gstreamer/gst/gstclock.h
-../gst/gstcompat.h					/sf/mw/gstreamer/include/gstreamer/gst/gstcompat.h
-../gst/gstconfig.h					/sf/mw/gstreamer/include/gstreamer/gst/gstconfig.h
-../gst/gstelementfactory.h 				/sf/mw/gstreamer/include/gstreamer/gst/gstelementfactory.h
-../gst/gstelement.h					/sf/mw/gstreamer/include/gstreamer/gst/gstelement.h
-../gst/gstenumtypes.h					/sf/mw/gstreamer/include/gstreamer/gst/gstenumtypes.h
-../gst/gsterror.h					/sf/mw/gstreamer/include/gstreamer/gst/gsterror.h
-../gst/gstevent.h					/sf/mw/gstreamer/include/gstreamer/gst/gstevent.h
-../gst/gstfilter.h					/sf/mw/gstreamer/include/gstreamer/gst/gstfilter.h
-../gst/gstformat.h					/sf/mw/gstreamer/include/gstreamer/gst/gstformat.h
-../gst/gstghostpad.h					/sf/mw/gstreamer/include/gstreamer/gst/gstghostpad.h
-../gst/gst.h						/sf/mw/gstreamer/include/gstreamer/gst/gst.h
-../gst/gstindexfactory.h   				/sf/mw/gstreamer/include/gstreamer/gst/gstindexfactory.h
-../gst/gstindex.h					/sf/mw/gstreamer/include/gstreamer/gst/gstindex.h
-../gst/gst_private.h					/sf/mw/gstreamer/include/gstreamer/gst/gst_private.h
-../gst/gst-i18n-lib.h					/sf/mw/gstreamer/include/gstreamer/gst/gst-i18n-lib.h
-../gst/gstinfo.h					/sf/mw/gstreamer/include/gstreamer/gst/gstinfo.h
-../gst/gstinterface.h					/sf/mw/gstreamer/include/gstreamer/gst/gstinterface.h
-../gst/gstiterator.h					/sf/mw/gstreamer/include/gstreamer/gst/gstiterator.h
-../gst/gstmacros.h					/sf/mw/gstreamer/include/gstreamer/gst/gstmacros.h
-../gst/gstmarshal.h					/sf/mw/gstreamer/include/gstreamer/gst/gstmarshal.h
-../gst/gstmessage.h					/sf/mw/gstreamer/include/gstreamer/gst/gstmessage.h
-../gst/gstminiobject.h					/sf/mw/gstreamer/include/gstreamer/gst/gstminiobject.h
-../gst/gstobject.h					/sf/mw/gstreamer/include/gstreamer/gst/gstobject.h
-../gst/gstpad.h						/sf/mw/gstreamer/include/gstreamer/gst/gstpad.h
-../gst/gstpadtemplate.h					/sf/mw/gstreamer/include/gstreamer/gst/gstpadtemplate.h
-../gst/gstparse.h					/sf/mw/gstreamer/include/gstreamer/gst/gstparse.h
-../gst/gstpipeline.h					/sf/mw/gstreamer/include/gstreamer/gst/gstpipeline.h
-../gst/gstpluginfeature.h  				/sf/mw/gstreamer/include/gstreamer/gst/gstpluginfeature.h
-../gst/gstplugin.h					/sf/mw/gstreamer/include/gstreamer/gst/gstplugin.h
-../gst/gstquery.h					/sf/mw/gstreamer/include/gstreamer/gst/gstquery.h
-../gst/gstregistry.h					/sf/mw/gstreamer/include/gstreamer/gst/gstregistry.h
-../gst/gstsegment.h					/sf/mw/gstreamer/include/gstreamer/gst/gstsegment.h
-../gst/gststructure.h					/sf/mw/gstreamer/include/gstreamer/gst/gststructure.h
-../gst/gstsystemclock.h					/sf/mw/gstreamer/include/gstreamer/gst/gstsystemclock.h
-../gst/gsttaglist.h					/sf/mw/gstreamer/include/gstreamer/gst/gsttaglist.h
-../gst/gsttagsetter.h					/sf/mw/gstreamer/include/gstreamer/gst/gsttagsetter.h
-../gst/gsttask.h					/sf/mw/gstreamer/include/gstreamer/gst/gsttask.h
-../gst/gsttrace.h					/sf/mw/gstreamer/include/gstreamer/gst/gsttrace.h
-../gst/gsttypefindfactory.h 				/sf/mw/gstreamer/include/gstreamer/gst/gsttypefindfactory.h
-../gst/gsttypefind.h					/sf/mw/gstreamer/include/gstreamer/gst/gsttypefind.h
-../gst/gsturi.h						/sf/mw/gstreamer/include/gstreamer/gst/gsturi.h
-../gst/gstutils.h					/sf/mw/gstreamer/include/gstreamer/gst/gstutils.h
-../gst/gstvalue.h					/sf/mw/gstreamer/include/gstreamer/gst/gstvalue.h
-../gst/gstversion.h					/sf/mw/gstreamer/include/gstreamer/gst/gstversion.h
-../gst/gstxml.h						/sf/mw/gstreamer/include/gstreamer/gst/gstxml.h
-../gst/gst_global.h					/sf/mw/gstreamer/include/gstreamer/gst/gst_global.h
+../gst/glib-compat.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/glib-compat.h)
+../gst/gstbin.h						MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstbin.h)
+../gst/gstbuffer.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstbuffer.h)
+../gst/gstbus.h						MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstbus.h)
+../gst/gstcaps.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstcaps.h)
+../gst/gstchildproxy.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstchildproxy.h)
+../gst/gstclock.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstclock.h)
+../gst/gstcompat.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstcompat.h)
+../gst/gstconfig.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstconfig.h)
+../gst/gstelementfactory.h 				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstelementfactory.h)
+../gst/gstelement.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstelement.h)
+../gst/gstenumtypes.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstenumtypes.h )
+../gst/gsterror.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsterror.h )
+../gst/gstevent.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstevent.h )
+../gst/gstfilter.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstfilter.h )
+../gst/gstformat.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstformat.h )
+../gst/gstghostpad.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstghostpad.h )
+../gst/gst.h						MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gst.h )
+../gst/gstindexfactory.h   				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstindexfactory.h )
+../gst/gstindex.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstindex.h )
+//../gst/gst_private.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gst_private.h )
+//../gst/gst-i18n-lib.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gst-i18n-lib.h )
+../gst/gstinfo.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstinfo.h )
+../gst/gstinterface.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstinterface.h )
+../gst/gstiterator.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstiterator.h )
+../gst/gstmacros.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstmacros.h )
+../gst/gstmarshal.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstmarshal.h )
+../gst/gstmessage.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstmessage.h )
+../gst/gstminiobject.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstminiobject.h )
+../gst/gstobject.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstobject.h )
+../gst/gstpad.h						MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstpad.h )
+../gst/gstpadtemplate.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstpadtemplate.h )
+../gst/gstparse.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstparse.h )
+../gst/gstpipeline.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstpipeline.h )
+../gst/gstpluginfeature.h  				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstpluginfeature.h )
+../gst/gstplugin.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstplugin.h )
+../gst/gstquery.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstquery.h )
+../gst/gstregistry.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstregistry.h )
+../gst/gstsegment.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstsegment.h )
+../gst/gststructure.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gststructure.h )
+../gst/gstsystemclock.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstsystemclock.h )
+../gst/gsttaglist.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsttaglist.h )
+../gst/gsttagsetter.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsttagsetter.h )
+../gst/gsttask.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsttask.h )
+../gst/gsttrace.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsttrace.h )
+../gst/gsttypefindfactory.h 				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsttypefindfactory.h )
+../gst/gsttypefind.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsttypefind.h )
+../gst/gsturi.h						MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsturi.h )
+../gst/gstutils.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstutils.h )
+../gst/gstvalue.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstvalue.h )
+../gst/gstversion.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstversion.h )
+../gst/gstxml.h						MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstxml.h )
+../gst/gst_global.h					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gst_global.h )
 
-../gst/gstdebugutils.h 					/sf/mw/gstreamer/include/gstreamer/gst/gstdebugutils.h
-../gst/gstparamspecs.h 					/sf/mw/gstreamer/include/gstreamer/gst/gstparamspecs.h
-../gst/gstpoll.h 					/sf/mw/gstreamer/include/gstreamer/gst/gstpoll.h
-../gst/gstregistrybinary.h 				/sf/mw/gstreamer/include/gstreamer/gst/gstregistrybinary.h
-../gst/gstpreset.h 				/sf/mw/gstreamer/include/gstreamer/gst/gstpreset.h
-../gst/gstbufferlist.h 				/sf/mw/gstreamer/include/gstreamer/gst/gstbufferlist.h
-../gst/gsttaskpool.h 				/sf/mw/gstreamer/include/gstreamer/gst/gsttaskpool.h
+../gst/gstdebugutils.h 					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstdebugutils.h )
+../gst/gstparamspecs.h 					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstparamspecs.h )
+../gst/gstpoll.h 					MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstpoll.h )
+../gst/gstregistrybinary.h 				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstregistrybinary.h )
+../gst/gstpreset.h 				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstpreset.h )
+../gst/gstbufferlist.h 				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gstbufferlist.h )
+../gst/gsttaskpool.h 				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/gsttaskpool.h )
 
 //libs
 
 //base
-../libs/gst/base/gstadapter.h				/sf/mw/gstreamer/include/gstreamer/gst/base/gstadapter.h					
-../libs/gst/base/gstbasesink.h				/sf/mw/gstreamer/include/gstreamer/gst/base/gstbasesink.h
-../libs/gst/base/gstbasesrc.h				/sf/mw/gstreamer/include/gstreamer/gst/base/gstbasesrc.h
-../libs/gst/base/gstbasetransform.h			/sf/mw/gstreamer/include/gstreamer/gst/base/gstbasetransform.h
-../libs/gst/base/gstcollectpads.h			/sf/mw/gstreamer/include/gstreamer/gst/base/gstcollectpads.h
-../libs/gst/base/gstpushsrc.h				/sf/mw/gstreamer/include/gstreamer/gst/base/gstpushsrc.h
-../libs/gst/base/gsttypefindhelper.h  			/sf/mw/gstreamer/include/gstreamer/gst/base/gsttypefindhelper.h
-../libs/gst/base/gstdataqueue.h       			/sf/mw/gstreamer/include/gstreamer/gst/base/gstdataqueue.h
+../libs/gst/base/gstadapter.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/base/gstadapter.h )					
+../libs/gst/base/gstbasesink.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/base/gstbasesink.h )
+../libs/gst/base/gstbasesrc.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/base/gstbasesrc.h )
+../libs/gst/base/gstbasetransform.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/base/gstbasetransform.h )
+../libs/gst/base/gstcollectpads.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/base/gstcollectpads.h )
+../libs/gst/base/gstpushsrc.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/base/gstpushsrc.h )
+../libs/gst/base/gsttypefindhelper.h  			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/base/gsttypefindhelper.h )
+../libs/gst/base/gstdataqueue.h       			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/base/gstdataqueue.h )
 
 //controller  rj
-../libs/gst/controller/gstcontroller.h			/sf/mw/gstreamer/include/gstreamer/gst/controller/gstcontroller.h
-../libs/gst/controller/gstcontrolsource.h		/sf/mw/gstreamer/include/gstreamer/gst/controller/gstcontrolsource.h
-../libs/gst/controller/gstinterpolationcontrolsource.h	/sf/mw/gstreamer/include/gstreamer/gst/controller/gstinterpolationcontrolsource.h
+../libs/gst/controller/gstcontroller.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/controller/gstcontroller.h )
+../libs/gst/controller/gstcontrolsource.h		MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/controller/gstcontrolsource.h )
+../libs/gst/controller/gstinterpolationcontrolsource.h	MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/controller/gstinterpolationcontrolsource.h )
 
 //dataprotocol
-../libs/gst/dataprotocol/dataprotocol.h	 		/sf/mw/gstreamer/include/gstreamer/gst/dataprotocol/dataprotocol.h
+../libs/gst/dataprotocol/dataprotocol.h	 		MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/dataprotocol/dataprotocol.h )
 
 //net
-../libs/gst/net/gstnetclientclock.h			/sf/mw/gstreamer/include/gstreamer/gst/net/gstnetclientclock.h
-../libs/gst/net/gstnet.h				/sf/mw/gstreamer/include/gstreamer/gst/net/gstnet.h
-../libs/gst/net/gstnettimepacket.h  			/sf/mw/gstreamer/include/gstreamer/gst/net/gstnettimepacket.h
-../libs/gst/net/gstnettimeprovider.h			/sf/mw/gstreamer/include/gstreamer/gst/net/gstnettimeprovider.h
+../libs/gst/net/gstnetclientclock.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/net/gstnetclientclock.h )
+../libs/gst/net/gstnet.h				MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/net/gstnet.h )
+../libs/gst/net/gstnettimepacket.h  			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/net/gstnettimepacket.h )
+../libs/gst/net/gstnettimeprovider.h			MW_LAYER_PLATFORM_EXPORT_PATH(gstreamer/gst/net/gstnettimeprovider.h )
 
 
 
@@ -125,5 +125,6 @@
 gstelements.mmp
 gstindexers.mmp
 
-
+// GST tools
+#include "../tools/group/bld.inf"
 					
--- a/gstreamer_core/group/gstbase.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/group/gstbase.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -25,7 +25,7 @@
 
 TARGET          libgstbase.dll
 TARGETTYPE      DLL
-UID             0x20004c45 0x2001F420
+UID             0x1000008d 0x2001F420
 
 #ifdef EKA2
 LANG            SC
@@ -50,12 +50,7 @@
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 USERINCLUDE		../libs/
 
--- a/gstreamer_core/group/gstcontroller.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/group/gstcontroller.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -25,7 +25,7 @@
 
 TARGET          libgstcontroller.dll
 TARGETTYPE      DLL
-UID             0x20004c45 0x2001F421
+UID             0x1000008d 0x2001F421
 
 #ifdef EKA2
 LANG            SC
@@ -50,12 +50,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 SOURCEPATH      ../libs/gst/controller
@@ -85,6 +80,6 @@
 LIBRARY		    ewsd.lib //wsd solution
 #endif
 
-//VENDORID VID_DEFAULT g
+//VENDORID VID_DEFAULT
 
 SMPSAFE
--- a/gstreamer_core/group/gstdataprotocol.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/group/gstdataprotocol.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -25,7 +25,7 @@
 
 TARGET          libgstdataprotocol.dll
 TARGETTYPE      DLL
-UID             0x20004c45 0x2001F422
+UID             0x1000008d 0x2001F422
 
 #ifdef EKA2
 LANG            SC
@@ -50,12 +50,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 SOURCEPATH      ../libs/gst/dataprotocol
--- a/gstreamer_core/group/gstelements.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/group/gstelements.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -25,7 +25,7 @@
 
 TARGET          libgstcoreelements.dll
 TARGETTYPE  	DLL
-UID             0x20004c45 0x2001F424
+UID             0x1000008d 0x2001F424
 
 #ifdef EKA2
 LANG            SC
@@ -51,12 +51,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../plugins/elements
 
--- a/gstreamer_core/group/gstindexers.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/group/gstindexers.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -25,7 +25,7 @@
 
 TARGET          libgstcoreindexers.dll
 TARGETTYPE      DLL
-UID             0x20004c45 0x2001F425
+UID             0x1000008d 0x2001F425
 
 #ifdef EKA2
 LANG            SC
@@ -51,19 +51,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-//USERINCLUDE		../../include/gstreamer
-//USERINCLUDE		../../include/gstreamer/gst
-//USERINCLUDE		../../include/gstreamer/gst/base
-//USERINCLUDE		../../include/gstreamer/gst/controller
-//USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-//USERINCLUDE		../../include/gstreamer/gst/net
-
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 SOURCEPATH      ../plugins/indexers
--- a/gstreamer_core/group/gstnet.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/group/gstnet.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -26,7 +26,7 @@
 
 TARGET          libgstnet.dll
 TARGETTYPE      DLL
-UID             0x20004c45 0x2001F423
+UID             0x1000008d 0x2001F423
 
 #ifdef EKA2
 LANG            SC
@@ -50,12 +50,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../libs/gst/net
 
--- a/gstreamer_core/group/gstreamer.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/group/gstreamer.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -25,7 +25,7 @@
 
 TARGET          libgstreamer.dll
 TARGETTYPE		DLL
-UID             0x20004c45 0x2001F41F
+UID             0x1000008d 0x2001F41F
 
 #ifdef EKA2
 LANG            SC
@@ -50,12 +50,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 USERINCLUDE		../gst
 
--- a/gstreamer_core/gst/gstregistry.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/gst/gstregistry.c	Thu Jul 22 16:36:00 2010 +0100
@@ -921,7 +921,9 @@
     
     arglist++;
     /// get the full path of DLL 
-    filename = libgstreamer_get_dll_path( filename );    
+    filename = libgstreamer_get_dll_path( filename );   
+    if( !filename ) 
+    	continue;
 #endif    
     if (g_stat (filename, &file_status) < 0) {
       /* Plugin will be removed from cache after the scan completes if it
--- a/gstreamer_core/gst/gstutils.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/gst/gstutils.h	Thu Jul 22 16:36:00 2010 +0100
@@ -173,7 +173,7 @@
   type_as_function ## _class_init ((type ## Class *)g_class);		\
 }									\
 									\
-__declspec(dllimport) GType type_as_function ## _get_type (void);				\
+GType type_as_function ## _get_type (void);				\
 									\
 __declspec(dllexport) GType									\
 type_as_function ## _get_type (void)					\
--- a/gstreamer_core/gst/parse/lex._gst_parse_yy.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/gst/parse/lex._gst_parse_yy.c	Thu Jul 22 16:36:00 2010 +0100
@@ -1,6 +1,6 @@
 #ifdef HAVE_CONFIG_H
 #ifdef __SYMBIAN32__
-#include "config.h"
+#include <config.h>
 #else
 #include <config.h>
 #endif
--- a/gstreamer_core/libs/gst/check/gstcheck.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/libs/gst/check/gstcheck.h	Thu Jul 22 16:36:00 2010 +0100
@@ -29,10 +29,10 @@
 #include <stdlib.h>
 #include <math.h>
 
-#include "check.h"
+
 
 #include "libgstreamer_wsd_solution.h" 
-
+#include <check.h>
 #include <gst/gst.h>
 
 G_BEGIN_DECLS
--- a/gstreamer_core/libs/gst/controller/gstcontroller.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/libs/gst/controller/gstcontroller.h	Thu Jul 22 16:36:00 2010 +0100
@@ -30,8 +30,8 @@
 #include <glib/gprintf.h>
 #include <gst/gst.h>
 
-#include "gstcontrolsource.h"
-#include "gstinterpolationcontrolsource.h"
+#include <gst/controller/gstcontrolsource.h>
+#include <gst/controller/gstinterpolationcontrolsource.h>
 
 G_BEGIN_DECLS
 
--- a/gstreamer_core/libs/gst/controller/gstcontrolsource.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/libs/gst/controller/gstcontrolsource.c	Thu Jul 22 16:36:00 2010 +0100
@@ -44,7 +44,7 @@
 #include <glib-object.h>
 #include <gst/gst.h>
 
-#include "gstcontrolsource.h"
+#include "gst/controller/gstcontrolsource.h"
 
 #define GST_CAT_DEFAULT controller_debug
 GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT);
--- a/gstreamer_core/libs/gst/controller/gstinterpolationcontrolsource.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/libs/gst/controller/gstinterpolationcontrolsource.h	Thu Jul 22 16:36:00 2010 +0100
@@ -27,7 +27,7 @@
 #include <glib-object.h>
 #include <gst/gst.h>
 
-#include "gstcontrolsource.h"
+#include "gst/controller/gstcontrolsource.h"
 
 G_BEGIN_DECLS
 
--- a/gstreamer_core/libs/gst/controller/gstlfocontrolsource.h	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/libs/gst/controller/gstlfocontrolsource.h	Thu Jul 22 16:36:00 2010 +0100
@@ -27,7 +27,7 @@
 #include <glib-object.h>
 #include <gst/gst.h>
 
-#include "gstcontrolsource.h"
+//#include "gstcontrolsource.h"
 
 G_BEGIN_DECLS
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/grammar.y	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,932 @@
+%{
+
+
+#include <glib-object.h>
+#include <glib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "../gst_private.h"
+#include "../gst-i18n-lib.h"
+
+#include "../gstconfig.h"
+#include "../gstparse.h"
+#include "../gstinfo.h"
+#include "../gsterror.h"
+#include "../gsturi.h"
+#include "../gstutils.h"
+#include "../gstvalue.h"
+#include "../gstchildproxy.h"
+#include "types.h"
+
+#include <glib_global.h>
+#include <glib_object.h>
+
+
+
+
+/* All error messages in this file are user-visible and need to be translated.
+ * Don't start the message with a capital, and don't end them with a period,
+ * as they will be presented inside a sentence/error.
+ */
+  
+#define YYERROR_VERBOSE 1
+#define YYLEX_PARAM scanner
+
+typedef void* yyscan_t;
+
+int _gst_parse_yylex (void * yylval_param , yyscan_t yyscanner);
+int _gst_parse_yylex_init (yyscan_t scanner);
+int _gst_parse_yylex_destroy (yyscan_t scanner);
+struct yy_buffer_state * _gst_parse_yy_scan_string (char* , yyscan_t);
+void _gst_parse_yypush_buffer_state (void * new_buffer ,yyscan_t yyscanner );
+void _gst_parse_yypop_buffer_state (yyscan_t yyscanner );
+
+
+#ifdef __GST_PARSE_TRACE
+static guint __strings;
+static guint __links;
+static guint __chains;
+gchar *
+__gst_parse_strdup (gchar *org)
+{
+  gchar *ret; 
+  __strings++;
+  ret = g_strdup (org);
+  /* g_print ("ALLOCATED STR   (%3u): %p %s\n", __strings, ret, ret); */
+  return ret;
+}
+void
+__gst_parse_strfree (gchar *str)
+{
+  if (str) {
+    /* g_print ("FREEING STR     (%3u): %p %s\n", __strings - 1, str, str); */
+    g_free (str);
+    g_return_if_fail (__strings > 0);
+    __strings--;
+  }
+}
+link_t *__gst_parse_link_new ()
+{
+  link_t *ret;
+  __links++;
+  ret = g_new0 (link_t, 1);
+  /* g_print ("ALLOCATED LINK  (%3u): %p\n", __links, ret); */
+  return ret;
+}
+void
+__gst_parse_link_free (link_t *data)
+{
+  if (data) {
+    /* g_print ("FREEING LINK    (%3u): %p\n", __links - 1, data); */
+    g_free (data);
+    g_return_if_fail (__links > 0);
+    __links--;
+  }
+}
+chain_t *
+__gst_parse_chain_new ()
+{
+  chain_t *ret;
+  __chains++;
+  ret = g_new0 (chain_t, 1);
+  /* g_print ("ALLOCATED CHAIN (%3u): %p\n", __chains, ret); */
+  return ret;
+}
+void
+__gst_parse_chain_free (chain_t *data)
+{
+  /* g_print ("FREEING CHAIN   (%3u): %p\n", __chains - 1, data); */
+  g_free (data);
+  g_return_if_fail (__chains > 0);
+  __chains--;
+}
+
+#endif /* __GST_PARSE_TRACE */
+
+typedef struct {
+  gchar *src_pad;
+  gchar *sink_pad;
+  GstElement *sink;
+  GstCaps *caps;
+  gulong signal_id;
+  /* FIXME: need to connect to "disposed" signal to clean up,
+   * but there is no such signal */
+} DelayedLink;
+
+typedef struct {
+  GstElement *parent;
+  gchar *name;
+  gchar *value_str;
+  gulong signal_id;
+} DelayedSet;
+
+/*** define SET_ERROR and ERROR macros/functions */
+
+#ifdef G_HAVE_ISO_VARARGS
+
+#  define SET_ERROR(error, type, ...) \
+G_STMT_START { \
+  GST_CAT_ERROR (GST_CAT_PIPELINE, __VA_ARGS__); \
+  if ((error) && !*(error)) { \
+    g_set_error ((error), GST_PARSE_ERROR, (type), __VA_ARGS__); \
+  } \
+} G_STMT_END
+
+#  define ERROR(type, ...) \
+  SET_ERROR (((graph_t *) graph)->error, (type), __VA_ARGS__ )
+
+#elif defined(G_HAVE_GNUC_VARARGS)
+
+#  define SET_ERROR(error, type, args...) \
+G_STMT_START { \
+  GST_CAT_ERROR (GST_CAT_PIPELINE, args ); \
+  if ((error) && !*(error)) { \
+    g_set_error ((error), GST_PARSE_ERROR, (type), args ); \
+  } \
+} G_STMT_END
+
+#  define ERROR(type, args...) \
+  SET_ERROR (((graph_t *) graph)->error,(type) , args )
+
+#else
+
+static inline void
+SET_ERROR (GError **error, gint type, const char *format, ...)
+{
+  if (error) {
+    if (*error) {
+      g_warning ("error while parsing");
+    } else {
+      va_list varargs;
+      char *string;
+
+      va_start (varargs, format);
+      string = g_strdup_vprintf (format, varargs);
+      va_end (varargs);
+      
+      g_set_error (error, GST_PARSE_ERROR, type, string);
+
+      g_free (string);
+    }
+  }
+}
+
+#endif /* G_HAVE_ISO_VARARGS */
+
+/*** define YYPRINTF macro/function if we're debugging */
+
+/* bison 1.35 calls this macro with side effects, we need to make sure the
+   side effects work - crappy bison */
+
+#ifndef GST_DISABLE_GST_DEBUG
+#  define YYDEBUG 1
+
+#  ifdef G_HAVE_ISO_VARARGS
+
+/* #  define YYFPRINTF(a, ...) GST_CAT_DEBUG (GST_CAT_PIPELINE, __VA_ARGS__) */
+#    define YYFPRINTF(a, ...) \
+G_STMT_START { \
+     gchar *temp = g_strdup_printf (__VA_ARGS__); \
+     GST_CAT_LOG (GST_CAT_PIPELINE, temp); \
+     g_free (temp); \
+} G_STMT_END
+
+#  elif defined(G_HAVE_GNUC_VARARGS)
+
+#    define YYFPRINTF(a, args...) \
+G_STMT_START { \
+     gchar *temp = g_strdup_printf ( args ); \
+     GST_CAT_LOG (GST_CAT_PIPELINE, temp); \
+     g_free (temp); \
+} G_STMT_END
+
+#  else
+
+static inline void
+YYPRINTF(const char *format, ...)
+{
+  va_list varargs;
+  gchar *temp;
+  
+  va_start (varargs, format);
+  temp = g_strdup_vprintf (format, varargs);
+  GST_CAT_LOG (GST_CAT_PIPELINE, "%s", temp);
+  g_free (temp);
+  va_end (varargs);
+}
+
+#  endif /* G_HAVE_ISO_VARARGS */
+
+#endif /* GST_DISABLE_GST_DEBUG */
+
+#define GST_BIN_MAKE(res, type, chainval, assign, free_string) \
+G_STMT_START { \
+  chain_t *chain = chainval; \
+  GSList *walk; \
+  GstBin *bin = (GstBin *) gst_element_factory_make (type, NULL); \
+  if (!chain) { \
+    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_EMPTY_BIN, \
+        _("specified empty bin \"%s\", not allowed"), type); \
+    g_slist_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
+    g_slist_free (assign); \
+    gst_object_unref (bin); \
+    if (free_string) \
+      gst_parse_strfree (type); /* Need to clean up the string */ \
+    YYERROR; \
+  } else if (!bin) { \
+    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, \
+        _("no bin \"%s\", skipping"), type); \
+    g_slist_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
+    g_slist_free (assign); \
+    res = chain; \
+  } else { \
+    for (walk = chain->elements; walk; walk = walk->next ) \
+      gst_bin_add (bin, GST_ELEMENT (walk->data)); \
+    g_slist_free (chain->elements); \
+    chain->elements = g_slist_prepend (NULL, bin); \
+    res = chain; \
+    /* set the properties now */ \
+    for (walk = assign; walk; walk = walk->next) \
+      gst_parse_element_set ((gchar *) walk->data, GST_ELEMENT (bin), graph); \
+    g_slist_free (assign); \
+  } \
+} G_STMT_END
+
+#define MAKE_LINK(link, _src, _src_name, _src_pads, _sink, _sink_name, _sink_pads) \
+G_STMT_START { \
+  link = gst_parse_link_new (); \
+  link->src = _src; \
+  link->sink = _sink; \
+  link->src_name = _src_name; \
+  link->sink_name = _sink_name; \
+  link->src_pads = _src_pads; \
+  link->sink_pads = _sink_pads; \
+  link->caps = NULL; \
+} G_STMT_END
+
+#define MAKE_REF(link, _src, _pads) \
+G_STMT_START { \
+  gchar *padname = _src; \
+  GSList *pads = _pads; \
+  if (padname) { \
+    while (*padname != '.') padname++; \
+    *padname = '\0'; \
+    padname++; \
+    if (*padname != '\0') \
+      pads = g_slist_prepend (pads, gst_parse_strdup (padname)); \
+  } \
+  MAKE_LINK (link, NULL, _src, pads, NULL, NULL, NULL); \
+} G_STMT_END
+
+static void gst_parse_new_child(GstChildProxy *child_proxy, GObject *object,
+                                gpointer data)
+{
+  DelayedSet *set = (DelayedSet *) data;
+  GParamSpec *pspec;
+  GValue v = { 0, }; 
+  GstObject *target = NULL;
+  GType value_type;
+
+  if (gst_child_proxy_lookup (GST_OBJECT (set->parent), set->name, &target, &pspec)) { 
+    value_type = G_PARAM_SPEC_VALUE_TYPE (pspec);
+
+    GST_CAT_LOG (GST_CAT_PIPELINE, "parsing delayed property %s as a %s from %s", pspec->name,
+      g_type_name (value_type), set->value_str);
+    g_value_init (&v, value_type);
+    if (gst_value_deserialize (&v, set->value_str)) {
+      g_object_set_property (G_OBJECT (target), pspec->name, &v);
+    }
+    g_signal_handler_disconnect (child_proxy, set->signal_id);
+    g_free(set->name);
+    g_free(set->value_str);
+    g_free(set);
+  }
+
+  if (G_IS_VALUE (&v))
+    g_value_unset (&v);
+  if (target)
+    gst_object_unref (target);
+  return;
+}
+
+
+static void
+gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
+{
+  GParamSpec *pspec;
+  gchar *pos = value;
+  GValue v = { 0, }; 
+  GstObject *target = NULL;
+  GType value_type;
+
+  /* parse the string, so the property name is null-terminated an pos points
+     to the beginning of the value */
+  while (!g_ascii_isspace (*pos) && (*pos != '=')) pos++; 
+  if (*pos == '=') { 
+    *pos = '\0'; 
+  } else { 
+    *pos = '\0'; 
+    pos++;
+    while (g_ascii_isspace (*pos)) pos++; 
+  } 
+  pos++; 
+  while (g_ascii_isspace (*pos)) pos++; 
+  if (*pos == '"') {
+    pos++;
+    pos[strlen (pos) - 1] = '\0';
+  }
+  gst_parse_unescape (pos);
+
+  if (gst_child_proxy_lookup (GST_OBJECT (element), value, &target, &pspec)) { 
+    value_type = G_PARAM_SPEC_VALUE_TYPE (pspec); 
+    GST_CAT_LOG (GST_CAT_PIPELINE, "parsing property %s as a %s", pspec->name,
+      g_type_name (value_type));
+    g_value_init (&v, value_type);
+    if (!gst_value_deserialize (&v, pos))
+      goto error;
+    g_object_set_property (G_OBJECT (target), pspec->name, &v);
+  } else { 
+    /* do a delayed set */
+    if (GST_IS_CHILD_PROXY (element)) {
+      DelayedSet *data = g_new (DelayedSet, 1);
+      
+      data->parent = element;
+      data->name = g_strdup(value);
+      data->value_str = g_strdup(pos);
+      data->signal_id = g_signal_connect(GST_OBJECT (element),"child-added", G_CALLBACK (gst_parse_new_child), data);
+    }
+    else {
+      SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, \
+          _("no property \"%s\" in element \"%s\""), value, \
+          GST_ELEMENT_NAME (element));
+    }
+      }
+
+out:
+  gst_parse_strfree (value);
+  if (G_IS_VALUE (&v))
+    g_value_unset (&v);
+  if (target)
+    gst_object_unref (target);
+  return;
+  
+error:
+  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
+         _("could not set property \"%s\" in element \"%s\" to \"%s\""), 
+	 value, GST_ELEMENT_NAME (element), pos); 
+  goto out;
+}
+static inline void
+gst_parse_free_link (link_t *link)
+{
+  gst_parse_strfree (link->src_name);
+  gst_parse_strfree (link->sink_name);
+  g_slist_foreach (link->src_pads, (GFunc) gst_parse_strfree, NULL);
+  g_slist_foreach (link->sink_pads, (GFunc) gst_parse_strfree, NULL);
+  g_slist_free (link->src_pads);
+  g_slist_free (link->sink_pads);
+  if (link->caps) gst_caps_unref (link->caps);
+  gst_parse_link_free (link);  
+}
+
+static void
+gst_parse_found_pad (GstElement *src, GstPad *pad, gpointer data)
+{
+  DelayedLink *link = (DelayedLink *) data;
+  
+  GST_CAT_INFO (GST_CAT_PIPELINE, "trying delayed linking %s:%s to %s:%s", 
+                GST_STR_NULL (GST_ELEMENT_NAME (src)), GST_STR_NULL (link->src_pad),
+                GST_STR_NULL (GST_ELEMENT_NAME (link->sink)), GST_STR_NULL (link->sink_pad));
+
+  if (gst_element_link_pads_filtered (src, link->src_pad, link->sink,
+      link->sink_pad, link->caps)) {
+    /* do this here, we don't want to get any problems later on when
+     * unlocking states */
+    GST_CAT_DEBUG (GST_CAT_PIPELINE, "delayed linking %s:%s to %s:%s worked", 
+               	   GST_STR_NULL (GST_ELEMENT_NAME (src)), GST_STR_NULL (link->src_pad),
+               	   GST_STR_NULL (GST_ELEMENT_NAME (link->sink)), GST_STR_NULL (link->sink_pad));
+    g_signal_handler_disconnect (src, link->signal_id);
+    g_free (link->src_pad);
+    g_free (link->sink_pad);
+    if (link->caps) gst_caps_unref (link->caps);
+    g_free (link);
+  }
+}
+/* both padnames and the caps may be NULL */
+static gboolean
+gst_parse_perform_delayed_link (GstElement *src, const gchar *src_pad, 
+                                GstElement *sink, const gchar *sink_pad,
+                                GstCaps *caps)
+{
+  GList *templs = gst_element_class_get_pad_template_list (
+      GST_ELEMENT_GET_CLASS (src));
+	 
+  for (; templs; templs = templs->next) {
+    GstPadTemplate *templ = (GstPadTemplate *) templs->data;
+    if ((GST_PAD_TEMPLATE_DIRECTION (templ) == GST_PAD_SRC) &&
+        (GST_PAD_TEMPLATE_PRESENCE(templ) == GST_PAD_SOMETIMES))
+    {
+      DelayedLink *data = g_new (DelayedLink, 1); 
+      
+      /* TODO: maybe we should check if src_pad matches this template's names */
+
+      GST_CAT_DEBUG (GST_CAT_PIPELINE, "trying delayed link %s:%s to %s:%s", 
+                     GST_STR_NULL (GST_ELEMENT_NAME (src)), GST_STR_NULL (src_pad),
+                     GST_STR_NULL (GST_ELEMENT_NAME (sink)), GST_STR_NULL (sink_pad));
+
+      data->src_pad = g_strdup (src_pad);
+      data->sink = sink;
+      data->sink_pad = g_strdup (sink_pad);
+      if (caps) {
+      	data->caps = gst_caps_copy (caps);
+      } else {
+      	data->caps = NULL;
+      }
+      data->signal_id = g_signal_connect (G_OBJECT (src), "pad-added", 
+          G_CALLBACK (gst_parse_found_pad), data);
+      return TRUE;
+    }
+  }
+  return FALSE;
+}
+/*
+ * performs a link and frees the struct. src and sink elements must be given
+ * return values   0 - link performed
+ *                 1 - link delayed
+ *                <0 - error
+ */
+static gint
+gst_parse_perform_link (link_t *link, graph_t *graph)
+{
+  GstElement *src = link->src;
+  GstElement *sink = link->sink;
+  GSList *srcs = link->src_pads;
+  GSList *sinks = link->sink_pads;
+  g_assert (GST_IS_ELEMENT (src));
+  g_assert (GST_IS_ELEMENT (sink));
+  
+  GST_CAT_INFO (GST_CAT_PIPELINE,
+      "linking %s:%s to %s:%s (%u/%u) with caps \"%" GST_PTR_FORMAT "\"", 
+      GST_ELEMENT_NAME (src), link->src_name ? link->src_name : "(any)",
+      GST_ELEMENT_NAME (sink), link->sink_name ? link->sink_name : "(any)",
+      g_slist_length (srcs), g_slist_length (sinks), link->caps);
+
+  if (!srcs || !sinks) {
+    if (gst_element_link_pads_filtered (src,
+        srcs ? (const gchar *) srcs->data : NULL, sink,
+        sinks ? (const gchar *) sinks->data : NULL, link->caps)) {
+      goto success;
+    } else {
+      if (gst_parse_perform_delayed_link (src,
+          srcs ? (const gchar *) srcs->data : NULL,
+          sink, sinks ? (const gchar *) sinks->data : NULL, link->caps)) {
+	goto success;
+      } else {
+        goto error;
+      }
+    }
+  }
+  if (g_slist_length (link->src_pads) != g_slist_length (link->src_pads)) {
+    goto error;
+  }
+  while (srcs && sinks) {
+    const gchar *src_pad = (const gchar *) srcs->data;
+    const gchar *sink_pad = (const gchar *) sinks->data;
+    srcs = g_slist_next (srcs);
+    sinks = g_slist_next (sinks);
+    if (gst_element_link_pads_filtered (src, src_pad, sink, sink_pad,
+        link->caps)) {
+      continue;
+    } else {
+      if (gst_parse_perform_delayed_link (src, src_pad,
+                                          sink, sink_pad,
+					  link->caps)) {
+	continue;
+      } else {
+        goto error;
+      }
+    }
+  }
+  
+success:
+  gst_parse_free_link (link);
+  return 0;
+  
+error:
+  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK,
+      _("could not link %s to %s"), GST_ELEMENT_NAME (src),
+      GST_ELEMENT_NAME (sink));
+  gst_parse_free_link (link);
+  return -1;
+}
+
+
+static int yyerror (void *scanner, graph_t *graph, const char *s);
+%}
+
+%union {
+    gchar *s;
+    chain_t *c;
+    link_t *l;
+    GstElement *e;
+    GSList *p;
+    graph_t *g;
+}
+
+%token <s> PARSE_URL
+%token <s> IDENTIFIER
+%left <s> REF PADREF BINREF
+%token <s> ASSIGNMENT
+%token <s> LINK
+
+%type <g> graph
+%type <c> chain bin
+%type <l> reference
+%type <l> linkpart link
+%type <p> linklist
+%type <e> element 
+%type <p> padlist pads assignments
+
+%left '(' ')'
+%left ','
+%right '.'
+%left '!' '='
+
+%parse-param { void *scanner }
+%parse-param { graph_t *graph }
+%pure-parser
+
+%start graph
+%%
+
+element:	IDENTIFIER     		      { $$ = gst_element_factory_make ($1, NULL); 
+						if ($$ == NULL) {
+						  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no element \"%s\""), $1);
+						  gst_parse_strfree ($1);
+						  YYERROR;
+						}
+						gst_parse_strfree ($1);
+                                              }
+	|	element ASSIGNMENT	      { gst_parse_element_set ($2, $1, graph);
+						$$ = $1;
+	                                      }
+	;
+assignments:	/* NOP */		      { $$ = NULL; }
+	|	assignments ASSIGNMENT	      { $$ = g_slist_prepend ($1, $2); }
+	;		
+bin:	        '(' assignments chain ')' { GST_BIN_MAKE ($$, "bin", $3, $2, FALSE); }
+        |       BINREF assignments chain ')'  { GST_BIN_MAKE ($$, $1, $3, $2, TRUE); 
+						gst_parse_strfree ($1);
+					      }
+        |       BINREF assignments ')'	      { GST_BIN_MAKE ($$, $1, NULL, $2, TRUE); 
+						gst_parse_strfree ($1);
+					      }
+        |       BINREF assignments error ')'  { GST_BIN_MAKE ($$, $1, NULL, $2, TRUE); 
+						gst_parse_strfree ($1);
+					      }
+	;
+	
+pads:		PADREF 			      { $$ = g_slist_prepend (NULL, $1); }
+	|	PADREF padlist		      { $$ = $2;
+						$$ = g_slist_prepend ($$, $1);
+					      }				     
+	;
+padlist:	',' IDENTIFIER		      { $$ = g_slist_prepend (NULL, $2); }
+	|	',' IDENTIFIER padlist	      { $$ = g_slist_prepend ($3, $2); }
+	;
+	
+reference:	REF 			      { MAKE_REF ($$, $1, NULL); }
+	|	REF padlist		      { MAKE_REF ($$, $1, $2); }
+	;
+
+linkpart:	reference		      { $$ = $1; }
+	|	pads			      { MAKE_REF ($$, NULL, $1); }
+	|	/* NOP */		      { MAKE_REF ($$, NULL, NULL); }
+	;
+	
+link:		linkpart LINK linkpart	      { $$ = $1;
+						if ($2) {
+						  $$->caps = gst_caps_from_string ($2);
+						  if ($$->caps == NULL)
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("could not parse caps \"%s\""), $2);
+						  gst_parse_strfree ($2);
+						}
+						$$->sink_name = $3->src_name;
+						$$->sink_pads = $3->src_pads;
+						gst_parse_link_free ($3);
+					      }
+	;
+	
+linklist:	link			      { $$ = g_slist_prepend (NULL, $1); }
+	|	link linklist		      { $$ = g_slist_prepend ($2, $1); }
+	|	linklist error		      { $$ = $1; }
+	;	
+
+chain:   	element			      { $$ = gst_parse_chain_new ();
+						$$->first = $$->last = $1;
+						$$->front = $$->back = NULL;
+						$$->elements = g_slist_prepend (NULL, $1);
+					      }
+	|	bin			      { $$ = $1; }
+	|	chain chain		      { if ($1->back && $2->front) {
+						  if (!$1->back->sink_name) {
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
+						    gst_parse_free_link ($1->back);
+						  } else {
+						    ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $1->back);
+						  }
+						  if (!$2->front->src_name) {
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
+						    gst_parse_free_link ($2->front);
+						  } else {
+						    ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
+						  }
+						  $1->back = NULL;
+						} else if ($1->back) {
+						  if (!$1->back->sink_name) {
+						    $1->back->sink = $2->first;
+						  }
+						} else if ($2->front) {
+						  if (!$2->front->src_name) {
+						    $2->front->src = $1->last;
+						  }
+						  $1->back = $2->front;
+						}
+						
+						if ($1->back) {
+						  ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $1->back);
+						}
+						$1->last = $2->last;
+						$1->back = $2->back;
+						$1->elements = g_slist_concat ($1->elements, $2->elements);
+						if ($2)
+						  gst_parse_chain_free ($2);
+						$$ = $1;
+					      }
+	|	chain linklist		      { GSList *walk;
+						if ($1->back) {
+						  $2 = g_slist_prepend ($2, $1->back);
+						  $1->back = NULL;
+						} else {
+						  if (!((link_t *) $2->data)->src_name) {
+						    ((link_t *) $2->data)->src = $1->last;
+						  }						  
+						}
+						for (walk = $2; walk; walk = walk->next) {
+						  link_t *link = (link_t *) walk->data;
+						  if (!link->sink_name && walk->next) {
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
+						    gst_parse_free_link (link);
+						  } else if (!link->src_name && !link->src) {
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
+						    gst_parse_free_link (link);
+						  } else {
+						    if (walk->next) {
+						      ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, link);
+						    } else {
+						      $1->back = link;
+						    }
+						  }
+						}
+						g_slist_free ($2);
+						$$ = $1;
+					      }
+	|	chain error		      { $$ = $1; }
+	|	link chain		      { if ($2->front) {
+						  if (!$2->front->src_name) {
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
+						    gst_parse_free_link ($2->front);
+						  } else {
+						    ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
+						  }
+						}
+						if (!$1->sink_name) {
+						  $1->sink = $2->first;
+						}
+						$2->front = $1;
+						$$ = $2;
+					      }
+	|	PARSE_URL chain		      { $$ = $2;
+						if ($$->front) {
+						  GstElement *element = 
+							  gst_element_make_from_uri (GST_URI_SRC, $1, NULL);
+						  if (!element) {
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, 
+							    _("no source element for URI \"%s\""), $1);
+						  } else {
+						    $$->front->src = element;
+						    ((graph_t *) graph)->links = g_slist_prepend (
+							    ((graph_t *) graph)->links, $$->front);
+						    $$->front = NULL;
+						    $$->elements = g_slist_prepend ($$->elements, element);
+						  }
+						} else {
+						  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, 
+							  _("no element to link URI \"%s\" to"), $1);
+						}
+						g_free ($1);
+					      }
+	|	link PARSE_URL		      { GstElement *element =
+							  gst_element_make_from_uri (GST_URI_SINK, $2, NULL);
+						if (!element) {
+						  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, 
+							  _("no sink element for URI \"%s\""), $2);
+						  gst_parse_link_free ($1);
+						  g_free ($2);
+						  YYERROR;
+						} else if ($1->sink_name || $1->sink_pads) {
+                                                  gst_object_unref (element);
+						  SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, 
+							  _("could not link sink element for URI \"%s\""), $2);
+						  gst_parse_link_free ($1);
+						  g_free ($2);
+						  YYERROR;
+						} else {
+						  $$ = gst_parse_chain_new ();
+						  $$->first = $$->last = element;
+						  $$->front = $1;
+						  $$->front->sink = element;
+						  $$->elements = g_slist_prepend (NULL, element);
+						}
+						g_free ($2);
+					      }
+	;
+graph:		/* NOP */		      { SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_EMPTY, _("empty pipeline not allowed"));
+						$$ = (graph_t *) graph;
+					      }
+	|	chain			      { $$ = (graph_t *) graph;
+						if ($1->front) {
+						  if (!$1->front->src_name) {
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
+						    gst_parse_free_link ($1->front);
+						  } else {
+						    $$->links = g_slist_prepend ($$->links, $1->front);
+						  }
+						  $1->front = NULL;
+						}
+						if ($1->back) {
+						  if (!$1->back->sink_name) {
+						    SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
+						    gst_parse_free_link ($1->back);
+						  } else {
+						    $$->links = g_slist_prepend ($$->links, $1->back);
+						  }
+						  $1->back = NULL;
+						}
+						$$->chain = $1;
+					      }
+	;
+
+%%
+
+
+static int
+yyerror (void *scanner, graph_t *graph, const char *s)
+{
+  /* FIXME: This should go into the GError somehow, but how? */
+  GST_WARNING ("Error during parsing: %s", s);
+  return -1;
+}
+
+
+GstElement *
+_gst_parse_launch (const gchar *str, GError **error)
+{
+  graph_t g;
+  gchar *dstr;
+  GSList *walk;
+  GstBin *bin = NULL;
+  GstElement *ret;
+  yyscan_t scanner;
+
+  g_return_val_if_fail (str != NULL, NULL);
+
+  g.chain = NULL;
+  g.links = NULL;
+  g.error = error;
+  
+#ifdef __GST_PARSE_TRACE
+  GST_CAT_DEBUG (GST_CAT_PIPELINE, "TRACE: tracing enabled");
+  __strings = __chains = __links = 0;
+#endif /* __GST_PARSE_TRACE */
+
+  dstr = g_strdup (str);
+  _gst_parse_yylex_init (&scanner);
+  _gst_parse_yy_scan_string (dstr, scanner);
+
+#ifndef YYDEBUG
+  yydebug = 1;
+#endif
+
+  if (yyparse (scanner, &g) != 0) {
+    SET_ERROR (error, GST_PARSE_ERROR_SYNTAX,
+        "Unrecoverable syntax error while parsing pipeline %s", str);
+    
+    _gst_parse_yylex_destroy (scanner);
+    g_free (dstr);
+  
+    goto error1;
+  }
+  _gst_parse_yylex_destroy (scanner);
+  g_free (dstr);
+  
+  GST_CAT_DEBUG (GST_CAT_PIPELINE, "got %u elements and %u links",
+      g.chain ? g_slist_length (g.chain->elements) : 0,
+      g_slist_length (g.links));
+  
+  if (!g.chain) {
+    ret = NULL;
+  } else if (!(((chain_t *) g.chain)->elements->next)) {
+    /* only one toplevel element */  
+    ret = (GstElement *) ((chain_t *) g.chain)->elements->data;
+    g_slist_free (((chain_t *) g.chain)->elements);
+    if (GST_IS_BIN (ret))
+      bin = GST_BIN (ret);
+    gst_parse_chain_free (g.chain);
+  } else {  
+    /* put all elements in our bin */
+    bin = GST_BIN (gst_element_factory_make ("pipeline", NULL));
+    g_assert (bin);
+    
+    for (walk = g.chain->elements; walk; walk = walk->next) {
+      if (walk->data != NULL)
+        gst_bin_add (bin, GST_ELEMENT (walk->data));
+    }
+    
+    g_slist_free (g.chain->elements);
+    ret = GST_ELEMENT (bin);
+    gst_parse_chain_free (g.chain);
+  }
+  
+  /* remove links */
+  for (walk = g.links; walk; walk = walk->next) {
+    link_t *l = (link_t *) walk->data;
+    if (!l->src) {
+      if (l->src_name) {
+        if (bin) {
+          l->src = gst_bin_get_by_name_recurse_up (bin, l->src_name);
+          if (l->src)
+            gst_object_unref (l->src);
+        } else {
+          l->src = strcmp (GST_ELEMENT_NAME (ret), l->src_name) == 0 ? ret : NULL;
+        }
+      }
+      if (!l->src) {
+        SET_ERROR (error, GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+            "No element named \"%s\" - omitting link", l->src_name);
+        gst_parse_free_link (l);
+        continue;
+      }
+    }
+    if (!l->sink) {
+      if (l->sink_name) {
+        if (bin) {
+          l->sink = gst_bin_get_by_name_recurse_up (bin, l->sink_name);
+          if (l->sink)
+            gst_object_unref (l->sink);
+        } else {
+          l->sink = strcmp (GST_ELEMENT_NAME (ret), l->sink_name) == 0 ? ret : NULL;
+        }
+      }
+      if (!l->sink) {
+        SET_ERROR (error, GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+            "No element named \"%s\" - omitting link", l->sink_name);
+        gst_parse_free_link (l);
+        continue;
+      }
+    }
+    gst_parse_perform_link (l, &g);
+  }
+  g_slist_free (g.links);
+
+out:
+#ifdef __GST_PARSE_TRACE
+  GST_CAT_DEBUG (GST_CAT_PIPELINE,
+      "TRACE: %u strings, %u chains and %u links left", __strings, __chains,
+      __links);
+  if (__strings || __chains || __links) {
+    g_warning ("TRACE: %u strings, %u chains and %u links left", __strings,
+        __chains, __links);
+  }
+#endif /* __GST_PARSE_TRACE */
+
+  return ret;
+  
+error1:
+  if (g.chain) {
+    g_slist_foreach (g.chain->elements, (GFunc)gst_object_unref, NULL);
+    g_slist_free (g.chain->elements);
+    gst_parse_chain_free (g.chain);
+  }
+
+  g_slist_foreach (g.links, (GFunc)gst_parse_free_link, NULL);
+  g_slist_free (g.links);
+  
+  if (error)
+    g_assert (*error);
+  ret = NULL;
+  
+  goto out;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/group/bld.inf	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,28 @@
+
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+
+PRJ_MMPFILES
+gst-inspect.mmp
+gst-typefind.mmp
+gst-launch.mmp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/group/gst-inspect.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,79 @@
+//createelementcore.mmp
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+       
+#include <platform_paths.hrh> 
+                    
+TARGET            gst-inspect.exe
+TARGETTYPE		exe
+UID           	0 0x0AB230B2
+
+#ifdef EKA2
+LANG            SC
+CAPABILITY All -Tcb
+//VENDORID        VID_DEFAULT
+#endif
+
+
+MACRO           __SYMBIAN32__
+MACRO           HAVE_CONFIG_H
+MACRO            DISABLE_FAULT_HANDLER
+
+
+
+
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+
+OS_LAYER_GLIB_SYSTEMINCLUDE
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
+
+
+USERINCLUDE ../
+USERINCLUDE ../../
+USERINCLUDE ../../gst
+SOURCEPATH	../
+SOURCE             gst-inspect.c
+
+LIBRARY			libgstreamer.lib
+LIBRARY			euser.lib
+LIBRARY 		libc.lib
+LIBRARY 		libpthread.lib
+LIBRARY			libdl.lib
+LIBRARY			libm.lib
+LIBRARY 		libz.lib
+LIBRARY			libglib.lib
+LIBRARY			libgmodule.lib
+LIBRARY			libgobject.lib
+LIBRARY			libgthread.lib
+
+
+LIBRARY 		libgstnet.lib
+LIBRARY 		libgstbase.lib
+LIBRARY 		libgstcontroller.lib
+LIBRARY 		libgstdataprotocol.lib
+
+STATICLIBRARY  libcrt0.lib
+
+EPOCSTACKSIZE 0x5000
+
+EPOCHEAPSIZE 0x500 0x1000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/group/gst-launch.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,77 @@
+//createelementcore.mmp
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+       
+#include <platform_paths.hrh>       
+                    
+TARGET            gst-launch.exe
+TARGETTYPE		exe
+UID           	0 0x0AB230B3
+
+#ifdef EKA2
+LANG            SC
+CAPABILITY All -Tcb
+//VENDORID        VID_DEFAULT
+#endif
+
+
+MACRO           __SYMBIAN32__
+MACRO           HAVE_CONFIG_H
+MACRO           __SYMBIAN32__ DISABLE_FAULT_HANDLER
+
+
+
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+
+OS_LAYER_GLIB_SYSTEMINCLUDE
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
+
+USERINCLUDE ../
+USERINCLUDE ../../
+USERINCLUDE ../../gst
+SOURCEPATH	../
+
+SOURCE             gst-launch.c
+
+LIBRARY			libgstreamer.lib
+LIBRARY			euser.lib
+LIBRARY 		libc.lib
+LIBRARY 		libpthread.lib
+LIBRARY			libdl.lib
+LIBRARY			libglib.lib
+LIBRARY			libgmodule.lib
+LIBRARY			libgobject.lib
+LIBRARY			libgthread.lib
+LIBRARY			libm.lib
+LIBRARY 		libz.lib
+
+LIBRARY 		libgstnet.lib
+LIBRARY 		libgstbase.lib
+LIBRARY 		libgstcontroller.lib
+LIBRARY 		libgstdataprotocol.lib
+
+STATICLIBRARY  libcrt0.lib
+
+EPOCSTACKSIZE 0x5000
+
+EPOCHEAPSIZE 0x500 0x1000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/group/gst-typefind.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,78 @@
+//createelementcore.mmp
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+       
+#include <platform_paths.hrh>       
+                    
+TARGET            gst-typefind.exe
+TARGETTYPE		exe
+UID           	0 0x0AB230B4
+
+#ifdef EKA2
+LANG            SC
+CAPABILITY All -Tcb
+//VENDORID        VID_DEFAULT
+#endif
+
+
+MACRO           __SYMBIAN32__
+MACRO           HAVE_CONFIG_H
+MACRO           __SYMBIAN32__ DISABLE_FAULT_HANDLER
+
+
+
+
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+
+OS_LAYER_GLIB_SYSTEMINCLUDE
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
+
+USERINCLUDE ../
+USERINCLUDE ../../
+USERINCLUDE ../../gst
+SOURCEPATH	../
+
+SOURCE             gst-typefind.c
+
+LIBRARY			libgstreamer.lib
+LIBRARY			euser.lib
+LIBRARY 		libc.lib
+LIBRARY 		libpthread.lib
+LIBRARY			libdl.lib
+LIBRARY			libglib.lib
+LIBRARY			libgmodule.lib
+LIBRARY			libgobject.lib
+LIBRARY			libgthread.lib
+LIBRARY			libm.lib
+LIBRARY 		libz.lib
+
+LIBRARY 		libgstnet.lib
+LIBRARY 		libgstbase.lib
+LIBRARY 		libgstcontroller.lib
+LIBRARY 		libgstdataprotocol.lib
+
+STATICLIBRARY  libcrt0.lib
+
+EPOCSTACKSIZE 0x5000
+
+EPOCHEAPSIZE 0x500 0x1000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/group/testgstreamer.pkg	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,36 @@
+; ============================================================================
+;  Name        : gstreamer.pkg
+;  Part of     : Gstreamer project
+;  Description : Package file for all gstreamer libraries
+;
+;  Version     : %version: da1mmcf#3 %
+;
+;  Copyright © 2002-2006 Nokia.  All rights reserved.
+;  This material, including documentation and any related computer
+;  programs, is protected by copyright controlled by Nokia.  All
+;  rights are reserved.  Copying, including reproducing, storing,
+;  adapting or translating, any or all of this material requires the
+;  prior written consent of Nokia.  This material also contains
+;  confidential information which may not be disclosed to others
+;  without the prior written consent of Nokia.
+; ============================================================================
+
+;Languages
+&EN
+
+;Header
+#{"testgstreamer.pkg"},(0x2001F47C),1,0,0
+
+;Supports S60 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+;Localised Vendor name
+%{"Nokia Testing EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+
+"\epoc32\release\armv5\urel\gst-inspect.exe"-"!:\sys\bin\gst-inspect.exe"
+"\epoc32\release\armv5\urel\gst-typefind.exe"-"!:\sys\bin\gst-typefind.exe"
+"\epoc32\release\armv5\urel\gst-launch.exe"-"!:\sys\bin\gst-launch.exe"
\ No newline at end of file
Binary file gstreamer_core/tools/group/tools.pkg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/gst-inspect.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,1401 @@
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
+ *               2000 Wim Taymans <wtay@chello.be>
+ *               2004 Thomas Vander Stichele <thomas@apestaart.org>
+ *
+ * gst-inspect.c: tool to inspect the GStreamer registry
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+
+#include<gst/gst_global.h>
+#include "tools.h"
+
+#include <string.h>
+#include <locale.h>
+#include <glib/gprintf.h>
+#include <gobject_global.h>
+#include <gst/controller/gstcontroller.h>
+
+static char *_name = NULL;
+
+static int print_element_info (GstElementFactory * factory,
+    gboolean print_names);
+
+static void
+n_print (const char *format, ...)
+{
+  va_list args;
+  gint retval;
+
+  if (_name)
+    g_print (_name);
+
+  va_start (args, format);
+  retval = g_vprintf (format, args);
+  va_end (args);
+}
+
+static gboolean
+print_field (GQuark field, const GValue * value, gpointer pfx)
+{
+  gchar *str = gst_value_serialize (value);
+
+  n_print ("%s  %15s: %s\n", (gchar *) pfx, g_quark_to_string (field), str);
+  g_free (str);
+  return TRUE;
+}
+
+static void
+print_caps (const GstCaps * caps, const gchar * pfx)
+{
+  guint i;
+
+  g_return_if_fail (caps != NULL);
+
+  if (gst_caps_is_any (caps)) {
+    n_print ("%sANY\n", pfx);
+    return;
+  }
+  if (gst_caps_is_empty (caps)) {
+    n_print ("%sEMPTY\n", pfx);
+    return;
+  }
+
+  for (i = 0; i < gst_caps_get_size (caps); i++) {
+    GstStructure *structure = gst_caps_get_structure (caps, i);
+
+    n_print ("%s%s\n", pfx, gst_structure_get_name (structure));
+    gst_structure_foreach (structure, print_field, (gpointer) pfx);
+  }
+}
+
+#if 0
+static void
+print_formats (const GstFormat * formats)
+{
+  while (formats && *formats) {
+    const GstFormatDefinition *definition;
+
+    definition = gst_format_get_details (*formats);
+    if (definition)
+      n_print ("\t\t(%d):\t%s (%s)\n", *formats,
+          definition->nick, definition->description);
+    else
+      n_print ("\t\t(%d):\tUnknown format\n", *formats);
+
+    formats++;
+  }
+}
+#endif
+
+static void
+print_query_types (const GstQueryType * types)
+{
+  while (types && *types) {
+    const GstQueryTypeDefinition *definition;
+
+    definition = gst_query_type_get_details (*types);
+    if (definition)
+      n_print ("\t\t(%d):\t%s (%s)\n", *types,
+          definition->nick, definition->description);
+    else
+      n_print ("\t\t(%d):\tUnknown query format\n", *types);
+
+    types++;
+  }
+}
+
+#ifndef GST_DISABLE_ENUMTYPES
+#if 0
+static void
+print_event_masks (const GstEventMask * masks)
+{
+  GType event_type;
+  GEnumClass *klass;
+  GType event_flags;
+  GFlagsClass *flags_class = NULL;
+
+  event_type = gst_event_type_get_type ();
+  klass = (GEnumClass *) g_type_class_ref (event_type);
+
+  while (masks && masks->type) {
+    GEnumValue *value;
+    gint flags = 0, index = 0;
+
+    switch (masks->type) {
+      case GST_EVENT_SEEK:
+        flags = masks->flags;
+        event_flags = gst_seek_type_get_type ();
+        flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
+        break;
+      default:
+        break;
+    }
+
+    value = g_enum_get_value (klass, masks->type);
+    g_print ("\t\t%s ", value->value_nick);
+
+    while (flags) {
+      GFlagsValue *value;
+
+      if (flags & 1) {
+        value = g_flags_get_first_value (flags_class, 1 << index);
+
+        if (value)
+          g_print ("| %s ", value->value_nick);
+        else
+          g_print ("| ? ");
+      }
+      flags >>= 1;
+      index++;
+    }
+    g_print ("\n");
+
+    masks++;
+  }
+}
+#endif
+#else
+static void
+print_event_masks (const GstEventMask * masks)
+{
+}
+#endif
+
+static char *
+get_rank_name (gint rank)
+{
+  switch (rank) {
+    case GST_RANK_NONE:
+      return "none";
+    case GST_RANK_MARGINAL:
+      return "marginal";
+    case GST_RANK_SECONDARY:
+      return "secondary";
+    case GST_RANK_PRIMARY:
+      return "primary";
+    default:
+      return "unknown";
+  }
+}
+
+static void
+print_factory_details_info (GstElementFactory * factory)
+{
+  n_print ("Factory Details:\n");
+  n_print ("  Long name:\t%s\n", factory->details.longname);
+  n_print ("  Class:\t%s\n", factory->details.klass);
+  n_print ("  Description:\t%s\n", factory->details.description);
+  n_print ("  Author(s):\t%s\n", factory->details.author);
+  n_print ("  Rank:\t\t%s (%d)\n",
+      get_rank_name (GST_PLUGIN_FEATURE (factory)->rank),
+      GST_PLUGIN_FEATURE (factory)->rank);
+  n_print ("\n");
+}
+
+static void
+print_hierarchy (GType type, gint level, gint * maxlevel)
+{
+  GType parent;
+  gint i;
+
+  parent = g_type_parent (type);
+
+  *maxlevel = *maxlevel + 1;
+  level++;
+
+  if (parent)
+    print_hierarchy (parent, level, maxlevel);
+
+  if (_name)
+    g_print (_name);
+
+  for (i = 1; i < *maxlevel - level; i++)
+    g_print ("      ");
+  if (*maxlevel - level)
+    g_print (" +----");
+
+  g_print ("%s\n", g_type_name (type));
+
+  if (level == 1)
+    n_print ("\n");
+}
+
+static void
+print_interfaces (GType type)
+{
+  guint n_ifaces;
+  GType *iface, *ifaces = g_type_interfaces (type, &n_ifaces);
+
+  if (ifaces) {
+    if (n_ifaces) {
+      if (_name)
+        g_print (_name);
+      g_print (_("Implemented Interfaces:\n"));
+      iface = ifaces;
+      while (*iface) {
+        if (_name)
+          g_print (_name);
+        g_print ("  %s\n", g_type_name (*iface));
+        iface++;
+      }
+      if (_name)
+        g_print (_name);
+      g_print ("\n");
+    }
+    g_free (ifaces);
+  }
+}
+
+static void
+print_element_properties_info (GstElement * element)
+{
+  GParamSpec **property_specs;
+  guint num_properties, i;
+  gboolean readable;
+  gboolean first_flag;
+
+  property_specs = g_object_class_list_properties
+      (G_OBJECT_GET_CLASS (element), &num_properties);
+  n_print ("\n");
+  n_print ("Element Properties:\n");
+
+  for (i = 0; i < num_properties; i++) {
+    GValue value = { 0, };
+    GParamSpec *param = property_specs[i];
+
+    readable = FALSE;
+
+    g_value_init (&value, param->value_type);
+
+    n_print ("  %-20s: %s\n", g_param_spec_get_name (param),
+        g_param_spec_get_blurb (param));
+
+    first_flag = TRUE;
+    n_print ("%-23.23s flags: ", "");
+    if (param->flags & G_PARAM_READABLE) {
+      g_object_get_property (G_OBJECT (element), param->name, &value);
+      readable = TRUE;
+      if (!first_flag)
+        g_print (", ");
+      else
+        first_flag = FALSE;
+      g_print (_("readable"));
+    }
+    if (param->flags & G_PARAM_WRITABLE) {
+      if (!first_flag)
+        g_print (", ");
+      else
+        first_flag = FALSE;
+      g_print (_("writable"));
+    }
+    if (param->flags & GST_PARAM_CONTROLLABLE) {
+      if (!first_flag)
+        g_print (", ");
+      else
+        first_flag = FALSE;
+      g_print (_("controllable"));
+    }
+    n_print ("\n");
+
+    switch (G_VALUE_TYPE (&value)) {
+      case G_TYPE_STRING:
+      {
+        GParamSpecString *pstring = G_PARAM_SPEC_STRING (param);
+
+        n_print ("%-23.23s String. ", "");
+
+        if (pstring->default_value == NULL)
+          g_print ("Default: null ");
+        else
+          g_print ("Default: \"%s\" ", pstring->default_value);
+
+        if (readable) {
+          const char *string_val = g_value_get_string (&value);
+
+          if (string_val == NULL)
+            g_print ("Current: null");
+          else
+            g_print ("Current: \"%s\"", string_val);
+        }
+        break;
+      }
+      case G_TYPE_BOOLEAN:
+      {
+        GParamSpecBoolean *pboolean = G_PARAM_SPEC_BOOLEAN (param);
+
+        n_print ("%-23.23s Boolean. ", "");
+        g_print ("Default: %s ", (pboolean->default_value ? "true" : "false"));
+        if (readable)
+          g_print ("Current: %s",
+              (g_value_get_boolean (&value) ? "true" : "false"));
+        break;
+      }
+      case G_TYPE_ULONG:
+      {
+        GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
+
+        n_print ("%-23.23s Unsigned Long. ", "");
+        g_print ("Range: %lu - %lu Default: %lu ",
+            pulong->minimum, pulong->maximum, pulong->default_value);
+        if (readable)
+          g_print ("Current: %lu", g_value_get_ulong (&value));
+        break;
+      }
+      case G_TYPE_LONG:
+      {
+        GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
+
+        n_print ("%-23.23s Long. ", "");
+        g_print ("Range: %ld - %ld Default: %ld ",
+            plong->minimum, plong->maximum, plong->default_value);
+        if (readable)
+          g_print ("Current: %ld", g_value_get_long (&value));
+        break;
+      }
+      case G_TYPE_UINT:
+      {
+        GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
+
+        n_print ("%-23.23s Unsigned Integer. ", "");
+        g_print ("Range: %u - %u Default: %u ",
+            puint->minimum, puint->maximum, puint->default_value);
+        if (readable)
+          g_print ("Current: %u", g_value_get_uint (&value));
+        break;
+      }
+      case G_TYPE_INT:
+      {
+        GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
+
+        n_print ("%-23.23s Integer. ", "");
+        g_print ("Range: %d - %d Default: %d ",
+            pint->minimum, pint->maximum, pint->default_value);
+        if (readable)
+          g_print ("Current: %d", g_value_get_int (&value));
+        break;
+      }
+      case G_TYPE_UINT64:
+      {
+        GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
+
+        n_print ("%-23.23s Unsigned Integer64. ", "");
+        g_print ("Range: %" G_GUINT64_FORMAT " - %" G_GUINT64_FORMAT
+            " Default: %" G_GUINT64_FORMAT " ",
+            puint64->minimum, puint64->maximum, puint64->default_value);
+        if (readable)
+          g_print ("Current: %" G_GUINT64_FORMAT, g_value_get_uint64 (&value));
+        break;
+      }
+      case G_TYPE_INT64:
+      {
+        GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
+
+        n_print ("%-23.23s Integer64. ", "");
+        g_print ("Range: %" G_GINT64_FORMAT " - %" G_GINT64_FORMAT
+            " Default: %" G_GINT64_FORMAT " ",
+            pint64->minimum, pint64->maximum, pint64->default_value);
+        if (readable)
+          g_print ("Current: %" G_GINT64_FORMAT, g_value_get_int64 (&value));
+        break;
+      }
+      case G_TYPE_FLOAT:
+      {
+        GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
+
+        n_print ("%-23.23s Float. ", "");
+        g_print ("Range: %15.7g - %15.7g Default: %15.7g ",
+            pfloat->minimum, pfloat->maximum, pfloat->default_value);
+        if (readable)
+          g_print ("Current: %15.7g", g_value_get_float (&value));
+        break;
+      }
+      case G_TYPE_DOUBLE:
+      {
+        GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
+
+        n_print ("%-23.23s Double. ", "");
+        g_print ("Range: %15.7g - %15.7g Default: %15.7g ",
+            pdouble->minimum, pdouble->maximum, pdouble->default_value);
+        if (readable)
+          g_print ("Current: %15.7g", g_value_get_double (&value));
+        break;
+      }
+      default:
+        if (param->value_type == GST_TYPE_CAPS) {
+          const GstCaps *caps = gst_value_get_caps (&value);
+
+          if (!caps)
+            n_print ("%-23.23s Caps (NULL)", "");
+          else {
+            print_caps (caps, "                           ");
+          }
+        } else if (G_IS_PARAM_SPEC_ENUM (param)) {
+          GParamSpecEnum *penum = G_PARAM_SPEC_ENUM (param);
+          GEnumValue *values;
+          guint j = 0;
+          gint enum_value;
+          const gchar *def_val_nick = "", *cur_val_nick = "";
+
+          values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;
+          enum_value = g_value_get_enum (&value);
+
+          while (values[j].value_name) {
+            if (values[j].value == enum_value)
+              cur_val_nick = values[j].value_nick;
+            if (values[j].value == penum->default_value)
+              def_val_nick = values[j].value_nick;
+            j++;
+          }
+
+          n_print
+              ("%-23.23s Enum \"%s\" Default: %d, \"%s\" Current: %d, \"%s\"",
+              "", g_type_name (G_VALUE_TYPE (&value)), penum->default_value,
+              def_val_nick, enum_value, cur_val_nick);
+
+          j = 0;
+          while (values[j].value_name) {
+            g_print ("\n");
+            if (_name)
+              g_print (_name);
+            g_print ("%-23.23s    (%d): %-16s - %s", "",
+                values[j].value, values[j].value_nick, values[j].value_name);
+            j++;
+          }
+          /* g_type_class_unref (ec); */
+        } else if (G_IS_PARAM_SPEC_FLAGS (param)) {
+          GParamSpecFlags *pflags = G_PARAM_SPEC_FLAGS (param);
+          GFlagsValue *values;
+          guint j = 0;
+          gint flags_value;
+          GString *cur_flags = NULL, *def_flags = NULL;
+
+          values = G_FLAGS_CLASS (g_type_class_ref (param->value_type))->values;
+          flags_value = g_value_get_flags (&value);
+
+          while (values[j].value_name) {
+            if (values[j].value & flags_value) {
+              if (cur_flags) {
+                g_string_append_printf (cur_flags, " | %s",
+                    values[j].value_nick);
+              } else {
+                cur_flags = g_string_new (values[j].value_nick);
+              }
+            }
+            if (values[j].value & pflags->default_value) {
+              if (def_flags) {
+                g_string_append_printf (def_flags, " | %s",
+                    values[j].value_nick);
+              } else {
+                def_flags = g_string_new (values[j].value_nick);
+              }
+            }
+            j++;
+          }
+
+          n_print
+              ("%-23.23s Flags \"%s\" Default: 0x%08x, \"%s\" Current: 0x%08x, \"%s\"",
+              "", g_type_name (G_VALUE_TYPE (&value)), pflags->default_value,
+              (def_flags ? def_flags->str : "(none)"), flags_value,
+              (cur_flags ? cur_flags->str : "(none)"));
+
+          j = 0;
+          while (values[j].value_name) {
+            g_print ("\n");
+            if (_name)
+              g_print (_name);
+            g_print ("%-23.23s    (0x%08x): %-16s - %s", "",
+                values[j].value, values[j].value_nick, values[j].value_name);
+            j++;
+          }
+
+          if (cur_flags)
+            g_string_free (cur_flags, TRUE);
+          if (def_flags)
+            g_string_free (def_flags, TRUE);
+        } else if (G_IS_PARAM_SPEC_OBJECT (param)) {
+          n_print ("%-23.23s Object of type \"%s\"", "",
+              g_type_name (param->value_type));
+        } else if (G_IS_PARAM_SPEC_BOXED (param)) {
+          n_print ("%-23.23s Boxed pointer of type \"%s\"", "",
+              g_type_name (param->value_type));
+        } else if (G_IS_PARAM_SPEC_POINTER (param)) {
+          if (param->value_type != G_TYPE_POINTER) {
+            n_print ("%-23.23s Pointer of type \"%s\".", "",
+                g_type_name (param->value_type));
+          } else {
+            n_print ("%-23.23s Pointer.", "");
+          }
+        } else if (param->value_type == G_TYPE_VALUE_ARRAY) {
+          n_print ("%-23.23s Array of GValues", "");
+        } else if (GST_IS_PARAM_SPEC_FRACTION (param)) {
+          GstParamSpecFraction *pfraction = GST_PARAM_SPEC_FRACTION (param);
+
+          n_print ("%-23.23s Fraction. ", "");
+
+          g_print ("Range: %d/%d - %d/%d Default: %d/%d ",
+              pfraction->min_num, pfraction->min_den,
+              pfraction->max_num, pfraction->max_den,
+              pfraction->def_num, pfraction->def_den);
+          if (readable)
+            g_print ("Current: %d/%d",
+                gst_value_get_fraction_numerator (&value),
+                gst_value_get_fraction_denominator (&value));
+
+        } else {
+          n_print ("%-23.23s Unknown type %ld \"%s\"", "", param->value_type,
+              g_type_name (param->value_type));
+        }
+        break;
+    }
+    if (!readable)
+      g_print (" Write only\n");
+    else
+      g_print ("\n");
+
+    g_value_reset (&value);
+  }
+  if (num_properties == 0)
+    n_print ("  none\n");
+
+  g_free (property_specs);
+}
+
+static void
+print_pad_templates_info (GstElement * element, GstElementFactory * factory)
+{
+  GstElementClass *gstelement_class;
+  const GList *pads;
+  GstStaticPadTemplate *padtemplate;
+
+  n_print ("Pad Templates:\n");
+  if (!factory->numpadtemplates) {
+    n_print ("  none\n");
+    return;
+  }
+
+  gstelement_class = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
+
+  pads = factory->staticpadtemplates;
+  while (pads) {
+    padtemplate = (GstStaticPadTemplate *) (pads->data);
+    pads = g_list_next (pads);
+
+    if (padtemplate->direction == GST_PAD_SRC)
+      n_print ("  SRC template: '%s'\n", padtemplate->name_template);
+    else if (padtemplate->direction == GST_PAD_SINK)
+      n_print ("  SINK template: '%s'\n", padtemplate->name_template);
+    else
+      n_print ("  UNKNOWN!!! template: '%s'\n", padtemplate->name_template);
+
+    if (padtemplate->presence == GST_PAD_ALWAYS)
+      n_print ("    Availability: Always\n");
+    else if (padtemplate->presence == GST_PAD_SOMETIMES)
+      n_print ("    Availability: Sometimes\n");
+    else if (padtemplate->presence == GST_PAD_REQUEST) {
+      n_print ("    Availability: On request\n");
+      n_print ("      Has request_new_pad() function: %s\n",
+          GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
+    } else
+      n_print ("    Availability: UNKNOWN!!!\n");
+
+    if (padtemplate->static_caps.string) {
+      n_print ("    Capabilities:\n");
+      print_caps (gst_static_caps_get (&padtemplate->static_caps), "      ");
+    }
+
+    n_print ("\n");
+  }
+}
+
+static void
+print_element_flag_info (GstElement * element)
+{
+  gboolean have_flags = FALSE;
+
+  n_print ("\n");
+  n_print ("Element Flags:\n");
+
+  if (!have_flags)
+    n_print ("  no flags set\n");
+
+  if (GST_IS_BIN (element)) {
+    n_print ("\n");
+    n_print ("Bin Flags:\n");
+    if (!have_flags)
+      n_print ("  no flags set\n");
+  }
+}
+
+static void
+print_implementation_info (GstElement * element)
+{
+  GstObjectClass *gstobject_class;
+  GstElementClass *gstelement_class;
+
+  gstobject_class = GST_OBJECT_CLASS (G_OBJECT_GET_CLASS (element));
+  gstelement_class = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
+
+  n_print ("\n");
+  n_print ("Element Implementation:\n");
+
+  n_print ("  Has change_state() function: %s\n",
+      GST_DEBUG_FUNCPTR_NAME (gstelement_class->change_state));
+#ifndef GST_DISABLE_LOADSAVE
+  n_print ("  Has custom save_thyself() function: %s\n",
+      GST_DEBUG_FUNCPTR_NAME (gstobject_class->save_thyself));
+  n_print ("  Has custom restore_thyself() function: %s\n",
+      GST_DEBUG_FUNCPTR_NAME (gstobject_class->restore_thyself));
+#endif
+}
+
+static void
+print_clocking_info (GstElement * element)
+{
+  if (!gst_element_requires_clock (element) &&
+      !(gst_element_provides_clock (element) &&
+          gst_element_get_clock (element))) {
+    n_print ("\n");
+    n_print ("Element has no clocking capabilities.");
+    return;
+  }
+
+  n_print ("\n");
+  n_print ("Clocking Interaction:\n");
+  if (gst_element_requires_clock (element)) {
+    n_print ("  element requires a clock\n");
+  }
+
+  if (gst_element_provides_clock (element)) {
+    GstClock *clock;
+
+    clock = gst_element_get_clock (element);
+    if (clock)
+      n_print ("  element provides a clock: %s\n", GST_OBJECT_NAME (clock));
+    else
+      n_print ("  element is supposed to provide a clock but returned NULL\n");
+  }
+}
+
+#ifndef GST_DISABLE_INDEX
+static void
+print_index_info (GstElement * element)
+{
+  if (gst_element_is_indexable (element)) {
+    n_print ("\n");
+    n_print ("Indexing capabilities:\n");
+    n_print ("  element can do indexing\n");
+  } else {
+    n_print ("\n");
+    n_print ("Element has no indexing capabilities.\n");
+  }
+}
+#else
+static void
+print_index_info (GstElement * element)
+{
+}
+#endif
+
+static void
+print_pad_info (GstElement * element)
+{
+  const GList *pads;
+  GstPad *pad;
+
+  n_print ("\n");
+  n_print ("Pads:\n");
+
+  if (!element->numpads) {
+    n_print ("  none\n");
+    return;
+  }
+
+  pads = element->pads;
+  while (pads) {
+    gchar *name;
+
+    pad = GST_PAD (pads->data);
+    pads = g_list_next (pads);
+
+    n_print ("");
+
+    name = gst_pad_get_name (pad);
+    if (gst_pad_get_direction (pad) == GST_PAD_SRC)
+      g_print ("  SRC: '%s'", name);
+    else if (gst_pad_get_direction (pad) == GST_PAD_SINK)
+      g_print ("  SINK: '%s'", name);
+    else
+      g_print ("  UNKNOWN!!!: '%s'", name);
+
+    g_free (name);
+
+    g_print ("\n");
+
+    n_print ("    Implementation:\n");
+    if (pad->chainfunc)
+      n_print ("      Has chainfunc(): %s\n",
+          GST_DEBUG_FUNCPTR_NAME (pad->chainfunc));
+    if (pad->getrangefunc)
+      n_print ("      Has getrangefunc(): %s\n",
+          GST_DEBUG_FUNCPTR_NAME (pad->getrangefunc));
+    if (pad->eventfunc != gst_pad_event_default)
+      n_print ("      Has custom eventfunc(): %s\n",
+          GST_DEBUG_FUNCPTR_NAME (pad->eventfunc));
+    if (pad->queryfunc != gst_pad_query_default)
+      n_print ("      Has custom queryfunc(): %s\n",
+          GST_DEBUG_FUNCPTR_NAME (pad->queryfunc));
+    if (pad->querytypefunc != gst_pad_get_query_types_default) {
+      n_print ("        Provides query types:\n");
+      print_query_types (gst_pad_get_query_types (pad));
+    }
+
+    if (pad->intlinkfunc != gst_pad_get_internal_links_default)
+      n_print ("      Has custom intconnfunc(): %s\n",
+          GST_DEBUG_FUNCPTR_NAME (pad->intlinkfunc));
+
+    if (pad->bufferallocfunc)
+      n_print ("      Has bufferallocfunc(): %s\n",
+          GST_DEBUG_FUNCPTR_NAME (pad->bufferallocfunc));
+
+    if (pad->padtemplate)
+      n_print ("    Pad Template: '%s'\n", pad->padtemplate->name_template);
+
+    if (pad->caps) {
+      n_print ("    Capabilities:\n");
+      print_caps (pad->caps, "      ");
+    }
+  }
+}
+
+#if 0
+static gint
+compare_signal_names (GSignalQuery * a, GSignalQuery * b)
+{
+  return strcmp (a->signal_name, b->signal_name);
+}
+#endif
+
+static void
+print_signal_info (GstElement * element)
+{
+  /* Signals/Actions Block */
+  guint *signals;
+  guint nsignals;
+  gint i = 0, j, k;
+  GSignalQuery *query = NULL;
+  GType type;
+  GSList *found_signals, *l;
+
+  for (k = 0; k < 2; k++) {
+    found_signals = NULL;
+    for (type = G_OBJECT_TYPE (element); type; type = g_type_parent (type)) {
+      if (type == GST_TYPE_ELEMENT || type == GST_TYPE_OBJECT)
+        break;
+
+      if (type == GST_TYPE_BIN && G_OBJECT_TYPE (element) != GST_TYPE_BIN)
+        continue;
+
+      signals = g_signal_list_ids (type, &nsignals);
+      for (i = 0; i < nsignals; i++) {
+        query = g_new0 (GSignalQuery, 1);
+        g_signal_query (signals[i], query);
+
+        if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
+            (k == 1 && (query->signal_flags & G_SIGNAL_ACTION)))
+          found_signals = g_slist_append (found_signals, query);
+        else
+          g_free (query);
+      }
+      g_free (signals);
+      signals = NULL;
+    }
+
+    if (found_signals) {
+      n_print ("\n");
+      if (k == 0)
+        n_print ("Element Signals:\n");
+      else
+        n_print ("Element Actions:\n");
+    } else {
+      continue;
+    }
+
+    for (l = found_signals; l; l = l->next) {
+      gchar *indent;
+      int indent_len;
+
+      query = (GSignalQuery *) l->data;
+      indent_len = strlen (query->signal_name) +
+          strlen (g_type_name (query->return_type)) + 24;
+
+      indent = g_new0 (gchar, indent_len + 1);
+      memset (indent, ' ', indent_len);
+
+      n_print ("  \"%s\" :  %s user_function (%s* object",
+          query->signal_name,
+          g_type_name (query->return_type), g_type_name (type));
+
+      for (j = 0; j < query->n_params; j++) {
+        if (_name)
+          g_print (_name);
+        if (G_TYPE_IS_FUNDAMENTAL (query->param_types[j])) {
+          g_print (",\n%s%s arg%d", indent,
+              g_type_name (query->param_types[j]), j);
+        } else if (G_TYPE_IS_ENUM (query->param_types[j])) {
+          g_print (",\n%s%s arg%d", indent,
+              g_type_name (query->param_types[j]), j);
+        } else {
+          g_print (",\n%s%s* arg%d", indent,
+              g_type_name (query->param_types[j]), j);
+        }
+      }
+
+      if (k == 0) {
+        if (_name)
+          g_print (_name);
+        g_print (",\n%sgpointer user_data);\n", indent);
+      } else
+        g_print (");\n");
+
+      g_free (indent);
+    }
+
+    if (found_signals) {
+      g_slist_foreach (found_signals, (GFunc) g_free, NULL);
+      g_slist_free (found_signals);
+    }
+  }
+}
+
+static void
+print_children_info (GstElement * element)
+{
+  GList *children;
+
+  if (!GST_IS_BIN (element))
+    return;
+
+  children = (GList *) GST_BIN (element)->children;
+  if (children) {
+    n_print ("\n");
+    g_print ("Children:\n");
+  }
+
+  while (children) {
+    n_print ("  %s\n", GST_ELEMENT_NAME (GST_ELEMENT (children->data)));
+    children = g_list_next (children);
+  }
+}
+
+static void
+print_element_list (gboolean print_all)
+{
+  int plugincount = 0, featurecount = 0;
+  GList *plugins, *orig_plugins;
+
+  orig_plugins = plugins = gst_default_registry_get_plugin_list ();
+  while (plugins) {
+    GList *features, *orig_features;
+    GstPlugin *plugin;
+
+    plugin = (GstPlugin *) (plugins->data);
+    plugins = g_list_next (plugins);
+    plugincount++;
+
+    orig_features = features =
+        gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
+        plugin->desc.name);
+    while (features) {
+      GstPluginFeature *feature;
+
+      feature = GST_PLUGIN_FEATURE (features->data);
+      featurecount++;
+
+      if (GST_IS_ELEMENT_FACTORY (feature)) {
+        GstElementFactory *factory;
+
+        factory = GST_ELEMENT_FACTORY (feature);
+        if (print_all)
+          print_element_info (factory, TRUE);
+        else
+          g_print ("%s:  %s: %s\n", plugin->desc.name,
+              GST_PLUGIN_FEATURE_NAME (factory),
+              gst_element_factory_get_longname (factory));
+      }
+#ifndef GST_DISABLE_INDEX
+      else if (GST_IS_INDEX_FACTORY (feature)) {
+        GstIndexFactory *factory;
+
+        factory = GST_INDEX_FACTORY (feature);
+        if (!print_all)
+          g_print ("%s:  %s: %s\n", plugin->desc.name,
+              GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
+      }
+#endif
+      else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
+        GstTypeFindFactory *factory;
+
+        factory = GST_TYPE_FIND_FACTORY (feature);
+        if (!print_all)
+          g_print ("%s: %s: ", plugin->desc.name,
+              gst_plugin_feature_get_name (feature));
+        if (factory->extensions) {
+          guint i = 0;
+
+          while (factory->extensions[i]) {
+            if (!print_all)
+              g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
+            i++;
+          }
+          if (!print_all)
+            g_print ("\n");
+        } else {
+          if (!print_all)
+            g_print ("no extensions\n");
+        }
+      } else {
+        if (!print_all)
+          n_print ("%s:  %s (%s)\n", plugin->desc.name,
+              GST_PLUGIN_FEATURE_NAME (feature),
+              g_type_name (G_OBJECT_TYPE (feature)));
+      }
+
+      features = g_list_next (features);
+    }
+
+    gst_plugin_feature_list_free (orig_features);
+  }
+
+  gst_plugin_list_free (orig_plugins);
+
+  g_print ("\n");
+  g_print (_("Total count: "));
+  g_print (ngettext ("%d plugin", "%d plugins", plugincount), plugincount);
+  g_print (", ");
+  g_print (ngettext ("%d feature", "%d features", featurecount), featurecount);
+  g_print ("\n");
+}
+
+static void
+print_plugin_info (GstPlugin * plugin)
+{
+  n_print ("Plugin Details:\n");
+  n_print ("  Name:\t\t\t%s\n", plugin->desc.name);
+  n_print ("  Description:\t\t%s\n", plugin->desc.description);
+  n_print ("  Filename:\t\t%s\n",
+      plugin->filename ? plugin->filename : "(null)");
+  n_print ("  Version:\t\t%s\n", plugin->desc.version);
+  n_print ("  License:\t\t%s\n", plugin->desc.license);
+  n_print ("  Source module:\t%s\n", plugin->desc.source);
+  n_print ("  Binary package:\t%s\n", plugin->desc.package);
+  n_print ("  Origin URL:\t\t%s\n", plugin->desc.origin);
+  n_print ("\n");
+}
+
+static void
+print_plugin_features (GstPlugin * plugin)
+{
+  GList *features;
+  gint num_features = 0;
+  gint num_elements = 0;
+  gint num_types = 0;
+  gint num_indexes = 0;
+  gint num_other = 0;
+
+  features =
+      gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
+      plugin->desc.name);
+
+  while (features) {
+    GstPluginFeature *feature;
+
+    feature = GST_PLUGIN_FEATURE (features->data);
+
+    if (GST_IS_ELEMENT_FACTORY (feature)) {
+      GstElementFactory *factory;
+
+      factory = GST_ELEMENT_FACTORY (feature);
+      n_print ("  %s: %s\n", GST_PLUGIN_FEATURE_NAME (factory),
+          gst_element_factory_get_longname (factory));
+      num_elements++;
+    }
+#ifndef GST_DISABLE_INDEX
+    else if (GST_IS_INDEX_FACTORY (feature)) {
+      GstIndexFactory *factory;
+
+      factory = GST_INDEX_FACTORY (feature);
+      n_print ("  %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
+      num_indexes++;
+    }
+#endif
+    else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
+      GstTypeFindFactory *factory;
+
+      factory = GST_TYPE_FIND_FACTORY (feature);
+      if (factory->extensions) {
+        guint i = 0;
+
+        g_print ("%s: %s: ", plugin->desc.name,
+            gst_plugin_feature_get_name (feature));
+        while (factory->extensions[i]) {
+          g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
+          i++;
+        }
+        g_print ("\n");
+      } else
+        g_print ("%s: %s: no extensions\n", plugin->desc.name,
+            gst_plugin_feature_get_name (feature));
+
+      num_types++;
+    } else {
+      n_print ("  %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
+          g_type_name (G_OBJECT_TYPE (feature)));
+      num_other++;
+    }
+    num_features++;
+    features = g_list_next (features);
+  }
+  n_print ("\n");
+  n_print ("  %d features:\n", num_features);
+  if (num_elements > 0)
+    n_print ("  +-- %d elements\n", num_elements);
+  if (num_types > 0)
+    n_print ("  +-- %d types\n", num_types);
+  if (num_indexes > 0)
+    n_print ("  +-- %d indexes\n", num_indexes);
+  if (num_other > 0)
+    n_print ("  +-- %d other objects\n", num_other);
+
+  n_print ("\n");
+}
+
+static int
+print_element_features (const gchar * element_name)
+{
+  GstPluginFeature *feature;
+
+  /* FIXME implement other pretty print function for these */
+#ifndef GST_DISABLE_INDEX
+  feature = gst_default_registry_find_feature (element_name,
+      GST_TYPE_INDEX_FACTORY);
+  if (feature) {
+    n_print ("%s: an index\n", element_name);
+    return 0;
+  }
+#endif
+  feature = gst_default_registry_find_feature (element_name,
+      GST_TYPE_TYPE_FIND_FACTORY);
+  if (feature) {
+    n_print ("%s: a typefind function\n", element_name);
+    return 0;
+  }
+
+  return -1;
+}
+
+static int
+print_element_info (GstElementFactory * factory, gboolean print_names)
+{
+  GstElement *element;
+  gint maxlevel = 0;
+
+  factory =
+      GST_ELEMENT_FACTORY (gst_plugin_feature_load (GST_PLUGIN_FEATURE
+          (factory)));
+
+  if (!factory) {
+    g_print ("element plugin couldn't be loaded\n");
+    return -1;
+  }
+
+  element = gst_element_factory_create (factory, NULL);
+  if (!element) {
+    g_print ("couldn't construct element for some reason\n");
+    return -1;
+  }
+
+  if (print_names)
+    _name = g_strdup_printf ("%s: ", GST_PLUGIN_FEATURE (factory)->name);
+  else
+    _name = NULL;
+
+  print_factory_details_info (factory);
+  if (GST_PLUGIN_FEATURE (factory)->plugin_name) {
+    GstPlugin *plugin;
+
+    plugin = gst_registry_find_plugin (gst_registry_get_default (),
+        GST_PLUGIN_FEATURE (factory)->plugin_name);
+    if (plugin) {
+      print_plugin_info (plugin);
+    }
+  }
+
+  print_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel);
+  print_interfaces (G_OBJECT_TYPE (element));
+
+  print_pad_templates_info (element, factory);
+  print_element_flag_info (element);
+  print_implementation_info (element);
+  print_clocking_info (element);
+  print_index_info (element);
+  print_pad_info (element);
+  print_element_properties_info (element);
+  print_signal_info (element);
+  print_children_info (element);
+
+  gst_object_unref (element);
+  gst_object_unref (factory);
+  g_free (_name);
+
+  return 0;
+}
+
+
+static void
+print_plugin_automatic_install_info_codecs (GstElementFactory * factory)
+{
+  GstPadDirection direction;
+  const gchar *type_name;
+  const gchar *klass;
+  const GList *static_templates, *l;
+  GstCaps *caps = NULL;
+  guint i, num;
+
+  klass = gst_element_factory_get_klass (factory);
+  g_return_if_fail (klass != NULL);
+
+  if (strstr (klass, "Demuxer") ||
+      strstr (klass, "Decoder") ||
+      strstr (klass, "Depay") || strstr (klass, "Parser")) {
+    type_name = "decoder";
+    direction = GST_PAD_SINK;
+  } else if (strstr (klass, "Muxer") ||
+      strstr (klass, "Encoder") || strstr (klass, "Pay")) {
+    type_name = "encoder";
+    direction = GST_PAD_SRC;
+  } else {
+    return;
+  }
+
+  /* decoder/demuxer sink pads should always be static and there should only
+   * be one, the same applies to encoders/muxers and source pads */
+  static_templates = gst_element_factory_get_static_pad_templates (factory);
+  for (l = static_templates; l != NULL; l = l->next) {
+    GstStaticPadTemplate *tmpl = NULL;
+
+    tmpl = (GstStaticPadTemplate *) l->data;
+    if (tmpl->direction == direction) {
+      caps = gst_static_pad_template_get_caps (tmpl);
+      break;
+    }
+  }
+
+  if (caps == NULL) {
+    g_printerr ("Couldn't find static pad template for %s '%s'\n",
+        type_name, GST_PLUGIN_FEATURE_NAME (factory));
+    return;
+  }
+
+  caps = gst_caps_make_writable (caps);
+  num = gst_caps_get_size (caps);
+  for (i = 0; i < num; ++i) {
+    GstStructure *s;
+    gchar *s_str;
+
+    s = gst_caps_get_structure (caps, i);
+    /* remove fields that are almost always just MIN-MAX of some sort
+     * in order to make the caps look less messy */
+    gst_structure_remove_field (s, "pixel-aspect-ratio");
+    gst_structure_remove_field (s, "framerate");
+    gst_structure_remove_field (s, "channels");
+    gst_structure_remove_field (s, "width");
+    gst_structure_remove_field (s, "height");
+    gst_structure_remove_field (s, "rate");
+    gst_structure_remove_field (s, "depth");
+    gst_structure_remove_field (s, "clock-rate");
+    s_str = gst_structure_to_string (s);
+    g_print ("%s-%s\n", type_name, s_str);
+    g_free (s_str);
+  }
+  gst_caps_unref (caps);
+}
+
+static void
+print_plugin_automatic_install_info_protocols (GstElementFactory * factory)
+{
+  gchar **protocols, **p;
+
+  protocols = gst_element_factory_get_uri_protocols (factory);
+  if (protocols != NULL && *protocols != NULL) {
+    switch (gst_element_factory_get_uri_type (factory)) {
+      case GST_URI_SINK:
+        for (p = protocols; *p != NULL; ++p)
+          g_print ("urisink-%s\n", *p);
+        break;
+      case GST_URI_SRC:
+        for (p = protocols; *p != NULL; ++p)
+          g_print ("urisource-%s\n", *p);
+        break;
+      default:
+        break;
+    }
+    g_strfreev (protocols);
+  }
+}
+
+static void
+print_plugin_automatic_install_info (GstPlugin * plugin)
+{
+  const gchar *plugin_name;
+  GList *features, *l;
+
+  plugin_name = gst_plugin_get_name (plugin);
+
+  /* not interested in typefind factories, only element factories */
+  features = gst_registry_get_feature_list (gst_registry_get_default (),
+      GST_TYPE_ELEMENT_FACTORY);
+
+  for (l = features; l != NULL; l = l->next) {
+    GstPluginFeature *feature;
+
+    feature = GST_PLUGIN_FEATURE (l->data);
+
+    /* only interested in the ones that are in the plugin we just loaded */
+    if (g_str_equal (plugin_name, feature->plugin_name)) {
+      GstElementFactory *factory;
+
+      g_print ("element-%s\n", gst_plugin_feature_get_name (feature));
+
+      factory = GST_ELEMENT_FACTORY (feature);
+      print_plugin_automatic_install_info_protocols (factory);
+      print_plugin_automatic_install_info_codecs (factory);
+    }
+  }
+
+  g_list_foreach (features, (GFunc) gst_object_unref, NULL);
+  g_list_free (features);
+}
+
+int
+main (int argc, char *argv[])
+{
+  static gboolean print_all = FALSE;
+  static gboolean print_aii = FALSE;
+  GOptionEntry options[] = {
+    {"print-all", 'a', 0, G_OPTION_ARG_NONE, &print_all,
+        N_("Print all elements"), NULL},
+    {"print-plugin-auto-install-info", '\0', 0, G_OPTION_ARG_NONE, &print_aii,
+        N_("Print a machine-parsable list of features the specified plugin "
+              "provides.\n                                       "
+              "Useful in connection with external automatic plugin "
+              "installation mechanisms"), NULL},
+    GST_TOOLS_GOPTION_VERSION,
+    {NULL}
+  };
+  GOptionContext *ctx;
+  GError *err = NULL;
+
+#ifdef ENABLE_NLS
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  textdomain (GETTEXT_PACKAGE);
+#endif
+
+  if (!g_thread_supported ())
+    g_thread_init (NULL);
+
+  ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]");
+  g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
+  g_option_context_add_group (ctx, gst_init_get_option_group ());
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    g_print ("Error initializing: %s\n", err->message);
+    exit (1);
+  }
+  g_option_context_free (ctx);
+
+  gst_tools_print_version ("gst-inspect");
+
+  if (print_all && argc > 2) {
+    g_print ("-a requires no extra arguments\n");
+    return 1;
+  }
+
+  /* if no arguments, print out list of elements */
+  if (argc == 1 || print_all) {
+    print_element_list (print_all);
+    /* else we try to get a factory */
+  } else {
+    GstElementFactory *factory;
+    GstPlugin *plugin;
+    const char *arg = argv[argc - 1];
+    int retval;
+
+    factory = gst_element_factory_find (arg);
+    /* if there's a factory, print out the info */
+    if (factory) {
+      retval = print_element_info (factory, print_all);
+      gst_object_unref (factory);
+    } else {
+      retval = print_element_features (arg);
+    }
+
+    /* otherwise check if it's a plugin */
+    if (retval) {
+      plugin = gst_default_registry_find_plugin (arg);
+
+      /* if there is such a plugin, print out info */
+      if (plugin) {
+        if (print_aii) {
+          print_plugin_automatic_install_info (plugin);
+        } else {
+          print_plugin_info (plugin);
+          print_plugin_features (plugin);
+        }
+      } else {
+        GError *error = NULL;
+
+        if (g_file_test (arg, G_FILE_TEST_EXISTS)) {
+          plugin = gst_plugin_load_file (arg, &error);
+
+          if (plugin) {
+            if (print_aii) {
+              print_plugin_automatic_install_info (plugin);
+            } else {
+              print_plugin_info (plugin);
+              print_plugin_features (plugin);
+            }
+          } else {
+            g_print (_("Could not load plugin file: %s\n"), error->message);
+            g_error_free (error);
+            return -1;
+          }
+        } else {
+          g_print (_("No such element or plugin '%s'\n"), arg);
+          return -1;
+        }
+      }
+    }
+  }
+
+  return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/gst-launch.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,808 @@
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
+ *               2000 Wim Taymans <wtay@chello.be>
+ *               2004 Thomas Vander Stichele <thomas@apestaart.org>
+ *
+ * gst-launch.c: tool to launch GStreamer pipelines from the command line
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+/* FIXME: hack alert */
+#ifdef WIN32
+#define DISABLE_FAULT_HANDLER
+#endif
+
+#include <string.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef DISABLE_FAULT_HANDLER
+#include <sys/wait.h>
+#endif
+#include <locale.h>             /* for LC_ALL */
+#include "tools.h"
+#include <glib.h>
+#include "../gst/gst-i18n-app.h"
+
+/* FIXME: This is just a temporary hack.  We should have a better
+ * check for siginfo handling. */
+#ifdef SA_SIGINFO
+#define USE_SIGINFO
+#endif
+
+//extern volatile gboolean glib_on_error_halt;
+
+#ifndef DISABLE_FAULT_HANDLER
+static void fault_restore (void);
+static void fault_spin (void);
+static void sigint_restore (void);
+static gboolean caught_intr = FALSE;
+#endif
+
+static GstElement *pipeline;
+static gboolean caught_error = FALSE;
+static gboolean tags = FALSE;
+static gboolean messages = FALSE;
+static gboolean is_live = FALSE;
+
+
+#ifndef GST_DISABLE_LOADSAVE
+static GstElement *
+xmllaunch_parse_cmdline (const gchar ** argv)
+{
+  GstElement *pipeline = NULL, *e;
+  GstXML *xml;
+  gboolean err;
+  const gchar *arg;
+  gchar *element, *property, *value;
+  GList *l;
+  gint i = 0;
+
+  if (!(arg = argv[0])) {
+    g_print (_
+        ("Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"));
+    exit (1);
+  }
+
+  xml = gst_xml_new ();
+  /* FIXME guchar from gstxml.c */
+  err = gst_xml_parse_file (xml, (guchar *) arg, NULL);
+
+  if (err != TRUE) {
+    fprintf (stderr, _("ERROR: parse of xml file '%s' failed.\n"), arg);
+    exit (1);
+  }
+
+  l = gst_xml_get_topelements (xml);
+  if (!l) {
+    fprintf (stderr, _("ERROR: no toplevel pipeline element in file '%s'.\n"),
+        arg);
+    exit (1);
+  }
+
+  if (l->next)
+    fprintf (stderr,
+        _("WARNING: only one toplevel element is supported at this time."));
+
+  pipeline = GST_ELEMENT (l->data);
+
+  while ((arg = argv[++i])) {
+    element = g_strdup (arg);
+    property = strchr (element, '.');
+    value = strchr (element, '=');
+
+    if (!(element < property && property < value)) {
+      fprintf (stderr,
+          _("ERROR: could not parse command line argument %d: %s.\n"), i,
+          element);
+      g_free (element);
+      exit (1);
+    }
+
+    *property++ = '\0';
+    *value++ = '\0';
+
+    e = gst_bin_get_by_name (GST_BIN (pipeline), element);
+    if (!e) {
+      fprintf (stderr, _("WARNING: element named '%s' not found.\n"), element);
+    } else {
+      gst_util_set_object_arg (G_OBJECT (e), property, value);
+    }
+    g_free (element);
+  }
+
+  if (!l)
+    return NULL;
+
+  gst_object_ref (pipeline);
+  gst_object_unref (xml);
+  return pipeline;
+}
+#endif
+
+#ifndef DISABLE_FAULT_HANDLER
+#ifndef USE_SIGINFO
+static void
+fault_handler_sighandler (int signum)
+{
+  fault_restore ();
+
+  /* printf is used instead of g_print(), since it's less likely to
+   * deadlock */
+  switch (signum) {
+    case SIGSEGV:
+      printf ("Caught SIGSEGV\n");
+      break;
+    case SIGQUIT:
+      printf ("Caught SIGQUIT\n");
+      break;
+    default:
+      printf ("signo:  %d\n", signum);
+      break;
+  }
+
+  fault_spin ();
+}
+
+#else /* USE_SIGINFO */
+
+static void
+fault_handler_sigaction (int signum, siginfo_t * si, void *misc)
+{
+  fault_restore ();
+
+  /* printf is used instead of g_print(), since it's less likely to
+   * deadlock */
+  switch (si->si_signo) {
+    case SIGSEGV:
+      printf ("Caught SIGSEGV accessing address %p\n", si->si_addr);
+      break;
+    case SIGQUIT:
+      printf ("Caught SIGQUIT\n");
+      break;
+    default:
+      printf ("signo:  %d\n", si->si_signo);
+      printf ("errno:  %d\n", si->si_errno);
+      printf ("code:   %d\n", si->si_code);
+      break;
+  }
+
+  fault_spin ();
+}
+#endif /* USE_SIGINFO */
+
+static void
+fault_spin (void)
+{
+  int spinning = TRUE;
+
+  glib_on_error_halt = FALSE;
+  g_on_error_stack_trace ("gst-launch");
+
+  wait (NULL);
+
+  /* FIXME how do we know if we were run by libtool? */
+  printf ("Spinning.  Please run 'gdb gst-launch %d' to continue debugging, "
+      "Ctrl-C to quit, or Ctrl-\\ to dump core.\n", (gint) getpid ());
+  while (spinning)
+    g_usleep (1000000);
+}
+
+static void
+fault_restore (void)
+{
+  struct sigaction action;
+
+  memset (&action, 0, sizeof (action));
+  action.sa_handler = SIG_DFL;
+
+  sigaction (SIGSEGV, &action, NULL);
+  sigaction (SIGQUIT, &action, NULL);
+}
+
+static void
+fault_setup (void)
+{
+  struct sigaction action;
+
+  memset (&action, 0, sizeof (action));
+#ifdef USE_SIGINFO
+  action.sa_sigaction = fault_handler_sigaction;
+  action.sa_flags = SA_SIGINFO;
+#else
+  action.sa_handler = fault_handler_sighandler;
+#endif
+
+  sigaction (SIGSEGV, &action, NULL);
+  sigaction (SIGQUIT, &action, NULL);
+}
+#endif /* DISABLE_FAULT_HANDLER */
+
+static void
+print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
+{
+  gint i, count;
+
+  count = gst_tag_list_get_tag_size (list, tag);
+
+  for (i = 0; i < count; i++) {
+    gchar *str;
+
+    if (gst_tag_get_type (tag) == G_TYPE_STRING) {
+      if (!gst_tag_list_get_string_index (list, tag, i, &str))
+        g_assert_not_reached ();
+    } else if (gst_tag_get_type (tag) == GST_TYPE_BUFFER) {
+      GstBuffer *img;
+
+      img = gst_value_get_buffer (gst_tag_list_get_value_index (list, tag, i));
+      if (img) {
+        gchar *caps_str;
+
+        caps_str = GST_BUFFER_CAPS (img) ?
+            gst_caps_to_string (GST_BUFFER_CAPS (img)) : g_strdup ("unknown");
+        str = g_strdup_printf ("buffer of %u bytes, type: %s",
+            GST_BUFFER_SIZE (img), caps_str);
+        g_free (caps_str);
+      } else {
+        str = g_strdup ("NULL buffer");
+      }
+    } else {
+      str =
+          g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i));
+    }
+
+    if (i == 0) {
+      g_print ("%16s: %s\n", gst_tag_get_nick (tag), str);
+    } else {
+      g_print ("%16s: %s\n", "", str);
+    }
+
+    g_free (str);
+  }
+}
+
+#ifndef DISABLE_FAULT_HANDLER
+/* we only use sighandler here because the registers are not important */
+static void
+sigint_handler_sighandler (int signum)
+{
+  g_print ("Caught interrupt -- ");
+
+  sigint_restore ();
+
+  /* we set a flag that is checked by the mainloop, we cannot do much in the
+   * interrupt handler (no mutex or other blocking stuff) */
+  caught_intr = TRUE;
+}
+
+/* is called every 50 milliseconds (20 times a second), the interrupt handler
+ * will set a flag for us. We react to this by posting a message. */
+static gboolean
+check_intr (GstElement * pipeline)
+{
+  if (!caught_intr) {
+    return TRUE;
+  } else {
+    caught_intr = FALSE;
+    g_print ("handling interrupt.\n");
+
+    /* post an application specific message */
+    gst_element_post_message (GST_ELEMENT (pipeline),
+        gst_message_new_application (GST_OBJECT (pipeline),
+            gst_structure_new ("GstLaunchInterrupt",
+                "message", G_TYPE_STRING, "Pipeline interrupted", NULL)));
+
+    /* remove timeout handler */
+    return FALSE;
+  }
+}
+
+static void
+sigint_setup (void)
+{
+  struct sigaction action;
+
+  memset (&action, 0, sizeof (action));
+  action.sa_handler = sigint_handler_sighandler;
+
+  sigaction (SIGINT, &action, NULL);
+}
+
+static void
+sigint_restore (void)
+{
+  struct sigaction action;
+
+  memset (&action, 0, sizeof (action));
+  action.sa_handler = SIG_DFL;
+
+  sigaction (SIGINT, &action, NULL);
+}
+
+static void
+play_handler (int signum)
+{
+  switch (signum) {
+    case SIGUSR1:
+      g_print ("Caught SIGUSR1 - Play request.\n");
+      gst_element_set_state (pipeline, GST_STATE_PLAYING);
+      break;
+    case SIGUSR2:
+      g_print ("Caught SIGUSR2 - Stop request.\n");
+      gst_element_set_state (pipeline, GST_STATE_NULL);
+      break;
+  }
+}
+
+static void
+play_signal_setup (void)
+{
+  struct sigaction action;
+
+  memset (&action, 0, sizeof (action));
+  action.sa_handler = play_handler;
+  sigaction (SIGUSR1, &action, NULL);
+  sigaction (SIGUSR2, &action, NULL);
+}
+#endif /* DISABLE_FAULT_HANDLER */
+
+/* returns TRUE if there was an error or we caught a keyboard interrupt. */
+static gboolean
+event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
+{
+  GstBus *bus;
+  GstMessage *message = NULL;
+  gboolean res = FALSE;
+  gboolean buffering = FALSE;
+
+  bus = gst_element_get_bus (GST_ELEMENT (pipeline));
+
+#ifndef DISABLE_FAULT_HANDLER
+  g_timeout_add (50, (GSourceFunc) check_intr, pipeline);
+#endif
+
+  while (TRUE) {
+    message = gst_bus_poll (bus, GST_MESSAGE_ANY, blocking ? -1 : 0);
+
+    /* if the poll timed out, only when !blocking */
+    if (message == NULL)
+      goto exit;
+
+    /* check if we need to dump messages to the console */
+    if (messages) {
+      const GstStructure *s;
+
+      s = gst_message_get_structure (message);
+
+      g_print (_("Got Message from element \"%s\" (%s): "),
+          GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))),
+          gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
+      if (s) {
+        gchar *sstr;
+
+        sstr = gst_structure_to_string (s);
+        g_print ("%s\n", sstr);
+        g_free (sstr);
+      } else {
+        g_print ("no message details\n");
+      }
+    }
+
+    switch (GST_MESSAGE_TYPE (message)) {
+      case GST_MESSAGE_NEW_CLOCK:
+      {
+        GstClock *clock;
+
+        gst_message_parse_new_clock (message, &clock);
+
+        g_print ("New clock: %s\n", (clock ? GST_OBJECT_NAME (clock) : "NULL"));
+        break;
+      }
+      case GST_MESSAGE_EOS:
+        g_print (_
+            ("Got EOS from element \"%s\".\n"),
+            GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
+        goto exit;
+      case GST_MESSAGE_TAG:
+        if (tags) {
+          GstTagList *tags;
+
+          gst_message_parse_tag (message, &tags);
+          g_print (_("FOUND TAG      : found by element \"%s\".\n"),
+              GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
+          gst_tag_list_foreach (tags, print_tag, NULL);
+          gst_tag_list_free (tags);
+        }
+        break;
+      case GST_MESSAGE_INFO:{
+        GError *gerror;
+        gchar *debug;
+        gchar *name = gst_object_get_path_string (GST_MESSAGE_SRC (message));
+
+        gst_message_parse_info (message, &gerror, &debug);
+        if (debug) {
+          g_print (_("INFO:\n%s\n"), debug);
+        }
+        g_error_free (gerror);
+        g_free (debug);
+        g_free (name);
+        break;
+      }
+      case GST_MESSAGE_WARNING:{
+        GError *gerror;
+        gchar *debug;
+        gchar *name = gst_object_get_path_string (GST_MESSAGE_SRC (message));
+
+        /* dump graph on warning */
+        GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
+            GST_DEBUG_GRAPH_SHOW_ALL, "gst-launch.warning");
+
+        gst_message_parse_warning (message, &gerror, &debug);
+        g_print (_("WARNING: from element %s: %s\n"), name, gerror->message);
+        if (debug) {
+          g_print (_("Additional debug info:\n%s\n"), debug);
+        }
+        g_error_free (gerror);
+        g_free (debug);
+        g_free (name);
+        break;
+      }
+      case GST_MESSAGE_ERROR:{
+        GError *gerror;
+        gchar *debug;
+
+        /* dump graph on error */
+        GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
+            GST_DEBUG_GRAPH_SHOW_ALL, "gst-launch.error");
+
+        gst_message_parse_error (message, &gerror, &debug);
+        gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+        g_error_free (gerror);
+        g_free (debug);
+        /* we have an error */
+        res = TRUE;
+        goto exit;
+      }
+      case GST_MESSAGE_STATE_CHANGED:{
+        GstState old, new, pending;
+
+        gst_message_parse_state_changed (message, &old, &new, &pending);
+
+        /* we only care about pipeline state change messages */
+        if (GST_MESSAGE_SRC (message) != GST_OBJECT_CAST (pipeline))
+          break;
+
+        /* dump graph for pipeline state changes */
+        {
+          gchar *dump_name = g_strdup_printf ("gst-launch.%s_%s",
+              gst_element_state_get_name (old),
+              gst_element_state_get_name (new));
+          GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
+              GST_DEBUG_GRAPH_SHOW_ALL, dump_name);
+          g_free (dump_name);
+        }
+
+        /* ignore when we are buffering since then we mess with the states
+         * ourselves. */
+        if (buffering) {
+          fprintf (stderr,
+              _("Prerolled, waiting for buffering to finish...\n"));
+          break;
+        }
+
+        /* if we reached the final target state, exit */
+        if (target_state == GST_STATE_PAUSED && new == target_state)
+          goto exit;
+
+        /* else not an interesting message */
+        break;
+      }
+      case GST_MESSAGE_BUFFERING:{
+        gint percent;
+
+        gst_message_parse_buffering (message, &percent);
+        fprintf (stderr, _("buffering... %d  \r"), percent);
+
+        /* no state management needed for live pipelines */
+        if (is_live)
+          break;
+
+        if (percent == 100) {
+          /* a 100% message means buffering is done */
+          buffering = FALSE;
+          /* if the desired state is playing, go back */
+          if (target_state == GST_STATE_PLAYING) {
+            fprintf (stderr,
+                _("Done buffering, setting pipeline to PLAYING ...\n"));
+            gst_element_set_state (pipeline, GST_STATE_PLAYING);
+          } else
+            goto exit;
+        } else {
+          /* buffering busy */
+          if (buffering == FALSE && target_state == GST_STATE_PLAYING) {
+            /* we were not buffering but PLAYING, PAUSE  the pipeline. */
+            fprintf (stderr, _("Buffering, setting pipeline to PAUSED ...\n"));
+            gst_element_set_state (pipeline, GST_STATE_PAUSED);
+          }
+          buffering = TRUE;
+        }
+        break;
+      }
+      case GST_MESSAGE_APPLICATION:{
+        const GstStructure *s;
+
+        s = gst_message_get_structure (message);
+
+        if (gst_structure_has_name (s, "GstLaunchInterrupt")) {
+          /* this application message is posted when we caught an interrupt and
+           * we need to stop the pipeline. */
+          fprintf (stderr, _("Interrupt: Stopping pipeline ...\n"));
+          /* return TRUE when we caught an interrupt */
+          res = TRUE;
+          goto exit;
+        }
+      }
+      default:
+        /* just be quiet by default */
+        break;
+    }
+    if (message)
+      gst_message_unref (message);
+  }
+  g_assert_not_reached ();
+
+exit:
+  {
+    if (message)
+      gst_message_unref (message);
+    gst_object_unref (bus);
+    return res;
+  }
+}
+
+int
+main (int argc, char *argv[])
+{
+  /* options */
+  static gboolean verbose = FALSE;
+  static gboolean no_fault = FALSE;
+  static gboolean trace = FALSE;
+  gchar *savefile = NULL;
+  static gchar *exclude_args = NULL;
+  GOptionEntry options[] = {
+    {"tags", 't', 0, G_OPTION_ARG_NONE, &tags,
+        N_("Output tags (also known as metadata)"), NULL},
+    {"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
+        N_("Output status information and property notifications"), NULL},
+    {"messages", 'm', 0, G_OPTION_ARG_NONE, &messages,
+        N_("Output messages"), NULL},
+    {"exclude", 'X', 0, G_OPTION_ARG_NONE, &exclude_args,
+        N_("Do not output status information of TYPE"), N_("TYPE1,TYPE2,...")},
+#ifndef GST_DISABLE_LOADSAVE
+    {"output", 'o', 0, G_OPTION_ARG_STRING, &savefile,
+        N_("Save xml representation of pipeline to FILE and exit"), N_("FILE")},
+#endif
+    {"no-fault", 'f', 0, G_OPTION_ARG_NONE, &no_fault,
+        N_("Do not install a fault handler"), NULL},
+    {"trace", 'T', 0, G_OPTION_ARG_NONE, &trace,
+        N_("Print alloc trace (if enabled at compile time)"), NULL},
+    GST_TOOLS_GOPTION_VERSION,
+    {NULL}
+  };
+  GOptionContext *ctx;
+  GError *err = NULL;
+  gchar **argvn;
+  GError *error = NULL;
+  gint res = 0;
+
+  free (malloc (8));            /* -lefence */
+
+#ifdef ENABLE_NLS
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  textdomain (GETTEXT_PACKAGE);
+#endif
+
+  if (!g_thread_supported ())
+    g_thread_init (NULL);
+
+  gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE);
+
+  ctx = g_option_context_new ("PIPELINE-DESCRIPTION");
+  g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
+  g_option_context_add_group (ctx, gst_init_get_option_group ());
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    if (err)
+      g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
+    else
+      g_print ("Error initializing: Unknown error!\n");
+    exit (1);
+  }
+  g_option_context_free (ctx);
+
+  gst_tools_print_version ("gst-launch");
+
+#ifndef DISABLE_FAULT_HANDLER
+  if (!no_fault)
+    fault_setup ();
+
+  sigint_setup ();
+  play_signal_setup ();
+#endif
+
+  if (trace) {
+    if (!gst_alloc_trace_available ()) {
+      g_warning ("Trace not available (recompile with trace enabled).");
+    }
+    gst_alloc_trace_print_live ();
+  }
+
+  /* make a null-terminated version of argv */
+  argvn = g_new0 (char *, argc);
+  memcpy (argvn, argv + 1, sizeof (char *) * (argc - 1));
+#ifndef GST_DISABLE_LOADSAVE
+  if (strstr (argv[0], "gst-xmllaunch")) {
+    pipeline = xmllaunch_parse_cmdline ((const gchar **) argvn);
+  } else
+#endif
+  {
+    pipeline =
+        (GstElement *) gst_parse_launchv ((const gchar **) argvn, &error);
+  }
+  g_free (argvn);
+
+  if (!pipeline) {
+    if (error) {
+      fprintf (stderr, _("ERROR: pipeline could not be constructed: %s.\n"),
+          GST_STR_NULL (error->message));
+      g_error_free (error);
+    } else {
+      fprintf (stderr, _("ERROR: pipeline could not be constructed.\n"));
+    }
+    return 1;
+  } else if (error) {
+    fprintf (stderr, _("WARNING: erroneous pipeline: %s\n"),
+        GST_STR_NULL (error->message));
+    g_error_free (error);
+    return 1;
+  }
+
+  if (verbose) {
+    gchar **exclude_list =
+        exclude_args ? g_strsplit (exclude_args, ",", 0) : NULL;
+    g_signal_connect (pipeline, "deep_notify",
+        G_CALLBACK (gst_object_default_deep_notify), exclude_list);
+  }
+#ifndef GST_DISABLE_LOADSAVE
+  if (savefile) {
+    gst_xml_write_file (GST_ELEMENT (pipeline), fopen (savefile, "w"));
+  }
+#endif
+
+  if (!savefile) {
+    GstState state, pending;
+    GstStateChangeReturn ret;
+
+    /* If the top-level object is not a pipeline, place it in a pipeline. */
+    if (!GST_IS_PIPELINE (pipeline)) {
+      GstElement *real_pipeline = gst_element_factory_make ("pipeline", NULL);
+
+      if (real_pipeline == NULL) {
+        fprintf (stderr, _("ERROR: the 'pipeline' element wasn't found.\n"));
+        return 1;
+      }
+      gst_bin_add (GST_BIN (real_pipeline), pipeline);
+      pipeline = real_pipeline;
+    }
+    fprintf (stderr, _("Setting pipeline to PAUSED ...\n"));
+    ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
+
+    switch (ret) {
+      case GST_STATE_CHANGE_FAILURE:
+        fprintf (stderr, _("ERROR: Pipeline doesn't want to pause.\n"));
+        res = -1;
+        event_loop (pipeline, FALSE, GST_STATE_VOID_PENDING);
+        goto end;
+      case GST_STATE_CHANGE_NO_PREROLL:
+        fprintf (stderr, _("Pipeline is live and does not need PREROLL ...\n"));
+        is_live = TRUE;
+        break;
+      case GST_STATE_CHANGE_ASYNC:
+        fprintf (stderr, _("Pipeline is PREROLLING ...\n"));
+        caught_error = event_loop (pipeline, TRUE, GST_STATE_PAUSED);
+        if (caught_error) {
+          fprintf (stderr, _("ERROR: pipeline doesn't want to preroll.\n"));
+          goto end;
+        }
+        state = GST_STATE_PAUSED;
+        /* fallthrough */
+      case GST_STATE_CHANGE_SUCCESS:
+        fprintf (stderr, _("Pipeline is PREROLLED ...\n"));
+        break;
+    }
+
+    caught_error = event_loop (pipeline, FALSE, GST_STATE_PLAYING);
+
+    if (caught_error) {
+      fprintf (stderr, _("ERROR: pipeline doesn't want to preroll.\n"));
+    } else {
+      GstClockTime tfthen, tfnow;
+      GstClockTimeDiff diff;
+
+      fprintf (stderr, _("Setting pipeline to PLAYING ...\n"));
+      if (gst_element_set_state (pipeline,
+              GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
+        GstMessage *err_msg;
+        GstBus *bus;
+
+        fprintf (stderr, _("ERROR: pipeline doesn't want to play.\n"));
+        bus = gst_element_get_bus (pipeline);
+        if ((err_msg = gst_bus_poll (bus, GST_MESSAGE_ERROR, 0))) {
+          GError *gerror;
+          gchar *debug;
+
+          gst_message_parse_error (err_msg, &gerror, &debug);
+          gst_object_default_error (GST_MESSAGE_SRC (err_msg), gerror, debug);
+          gst_message_unref (err_msg);
+          g_error_free (gerror);
+          g_free (debug);
+        }
+        gst_object_unref (bus);
+        res = -1;
+        goto end;
+      }
+
+      tfthen = gst_util_get_timestamp ();
+      caught_error = event_loop (pipeline, TRUE, GST_STATE_PLAYING);
+      tfnow = gst_util_get_timestamp ();
+
+      diff = GST_CLOCK_DIFF (tfthen, tfnow);
+
+      g_print (_("Execution ended after %" G_GUINT64_FORMAT " ns.\n"), diff);
+    }
+
+    /* iterate mainloop to process pending stuff */
+    while (g_main_context_iteration (NULL, FALSE));
+
+    fprintf (stderr, _("Setting pipeline to PAUSED ...\n"));
+    gst_element_set_state (pipeline, GST_STATE_PAUSED);
+    if (!caught_error)
+      gst_element_get_state (pipeline, &state, &pending, GST_CLOCK_TIME_NONE);
+    fprintf (stderr, _("Setting pipeline to READY ...\n"));
+    gst_element_set_state (pipeline, GST_STATE_READY);
+    gst_element_get_state (pipeline, &state, &pending, GST_CLOCK_TIME_NONE);
+
+  end:
+    fprintf (stderr, _("Setting pipeline to NULL ...\n"));
+    gst_element_set_state (pipeline, GST_STATE_NULL);
+    gst_element_get_state (pipeline, &state, &pending, GST_CLOCK_TIME_NONE);
+  }
+
+  fprintf (stderr, _("FREEING pipeline ...\n"));
+  gst_object_unref (pipeline);
+
+  gst_deinit ();
+  if (trace)
+    gst_alloc_trace_print_live ();
+
+  return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/gst-run.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,383 @@
+/* GStreamer
+ * Copyright (C) 2004 Thomas Vander Stichele <thomas@apestaart.org>
+ *
+ * gst-run.c: tool to launch GStreamer tools with correct major/minor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <glib.h>
+
+/* global statics for option parsing */
+static gboolean _print = FALSE;
+static gchar *_arg_mm = NULL;
+static gboolean _arg_list_mm = FALSE;
+
+/* popt options table for the wrapper */
+static GOptionEntry wrapper_options[] = {
+  {"print", 'p', 0, G_OPTION_ARG_NONE, &_print,
+      "print wrapped command line options", NULL},
+  {"gst-mm", 0, 0, G_OPTION_ARG_STRING, &_arg_mm,
+      "Force major/minor version", "VERSION"},
+  {"gst-list-mm", 0, 0, G_OPTION_ARG_NONE, &_arg_list_mm,
+      "List found major/minor versions", NULL},
+  {NULL}
+};
+
+/* print out the major/minor, which is the hash key */
+static void
+hash_print_key (gchar * key, gchar * value)
+{
+  g_print ("%s\n", (gchar *) key);
+}
+
+/* return value like strcmp, but compares major/minor numerically */
+static gint
+compare_major_minor (const gchar * first, const gchar * second)
+{
+  gchar **firsts, **seconds;
+  gint fmaj, fmin, smaj, smin;
+  gint ret = 0;
+
+  firsts = g_strsplit (first, ".", 0);
+  seconds = g_strsplit (second, ".", 0);
+
+  if (firsts[0] == NULL || firsts[1] == NULL) {
+    ret = -1;
+    goto beach;
+  }
+  if (seconds[0] == NULL || seconds[1] == NULL) {
+    ret = 1;
+    goto beach;
+  }
+
+  fmaj = atoi (firsts[0]);
+  fmin = atoi (firsts[1]);
+  smaj = atoi (seconds[0]);
+  smin = atoi (seconds[1]);
+
+  if (fmaj < smaj) {
+    ret = -1;
+    goto beach;
+  }
+  if (fmaj > smaj) {
+    ret = 1;
+    goto beach;
+  }
+
+  /* fmaj == smaj */
+  if (fmin < smin) {
+    ret = -1;
+    goto beach;
+  }
+  if (fmin > smin) {
+    ret = 1;
+    goto beach;
+  }
+  ret = 0;
+
+beach:
+  g_strfreev (firsts);
+  g_strfreev (seconds);
+  return ret;
+}
+
+static void
+find_highest_version (gchar * key, gchar * value, gchar ** highest)
+{
+  if (*highest == NULL) {
+    /* first value, so just set it */
+    *highest = key;
+  }
+  if (compare_major_minor (key, *highest) > 0)
+    *highest = key;
+}
+
+/* Libtool creates shell scripts named "base" that calls actual binaries as
+ * .libs/lt-base.  If we detect this is a libtool script, unmangle so we
+ * find the right binaries */
+static void
+unmangle_libtool (gchar ** dir, gchar ** base)
+{
+  gchar *new_dir, *new_base;
+
+  if (!*dir)
+    return;
+  if (!*base)
+    return;
+
+  /* we assume libtool when base starts with lt- and dir ends with .libs */
+  if (!g_str_has_prefix (*base, "lt-"))
+    return;
+  if (!g_str_has_suffix (*dir, ".libs"))
+    return;
+
+  new_base = g_strdup (&((*base)[3]));
+  new_dir = g_path_get_dirname (*dir);
+  g_free (*base);
+  g_free (*dir);
+  *base = new_base;
+  *dir = new_dir;
+}
+
+/* Returns a directory path that contains the binary given as an argument.
+ * If the binary given contains a path, it gets looked for in that path.
+ * If it doesn't contain a path, it gets looked for in the standard path.
+ *
+ * The returned string is newly allocated.
+ */
+static gchar *
+get_dir_of_binary (const gchar * binary)
+{
+  gchar *base, *dir;
+  gchar *full;
+
+  base = g_path_get_basename (binary);
+  dir = g_path_get_dirname (binary);
+
+  /* if putting these two together yields the same as binary,
+   * then we have the right breakup.  If not, it's because no path was
+   * specified which caused get_basename to return "." */
+  full = g_build_filename (dir, base, NULL);
+
+  if (strcmp (full, binary) != 0) {
+    if (strcmp (dir, ".") != 0) {
+      g_warning ("This should not happen, g_path_get_dirname () has changed.");
+      g_free (base);
+      g_free (dir);
+      g_free (full);
+      return NULL;
+    }
+
+    /* we know no path was specified, so search standard path for binary */
+    g_free (full);
+    full = g_find_program_in_path (base);
+    if (!full) {
+      g_warning ("This should not happen, %s not in standard path.", base);
+      g_free (base);
+      g_free (dir);
+      return NULL;
+    }
+  }
+
+  g_free (base);
+  g_free (dir);
+  dir = g_path_get_dirname (full);
+  g_free (full);
+
+  return dir;
+}
+
+/* Search the given directory for candidate binaries matching the base binary.
+ * Return a GHashTable of major/minor -> directory pairs
+ */
+static GHashTable *
+get_candidates (const gchar * dir, const gchar * base)
+{
+  GDir *gdir;
+  GError *error = NULL;
+  const gchar *entry;
+  gchar *path;
+  gchar *suffix, *copy;
+
+  gchar *pattern;
+  GPatternSpec *spec, *specexe;
+
+  gchar **dirs;
+  gchar **cur;
+
+  GHashTable *candidates = NULL;
+
+  candidates = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+
+  /* compile our pattern specs */
+  pattern = g_strdup_printf ("%s-*.*", base);
+  spec = g_pattern_spec_new (pattern);
+  g_free (pattern);
+  pattern = g_strdup_printf ("%s-*.*.exe", base);
+  specexe = g_pattern_spec_new (pattern);
+  g_free (pattern);
+
+  /* get all dirs from the path and prepend with given dir */
+  if (dir)
+    path = g_strdup_printf ("%s%c%s",
+        dir, G_SEARCHPATH_SEPARATOR, g_getenv ("PATH"));
+  else
+    path = (gchar *) g_getenv ("PATH");
+  dirs = g_strsplit (path, G_SEARCHPATH_SEPARATOR_S, 0);
+  if (dir)
+    g_free (path);
+
+  /* check all of these in reverse order by winding to bottom and going up  */
+  cur = &dirs[0];
+  while (*cur)
+    ++cur;
+
+  while (cur != &dirs[0]) {
+    --cur;
+    if (!g_file_test (*cur, G_FILE_TEST_EXISTS) ||
+        !g_file_test (*cur, G_FILE_TEST_IS_DIR)) {
+      continue;
+    }
+
+    gdir = g_dir_open (*cur, 0, &error);
+    if (!gdir) {
+      g_warning ("Could not open dir %s: %s", *cur, error->message);
+      g_error_free (error);
+      return NULL;
+    }
+    while ((entry = g_dir_read_name (gdir))) {
+      if (g_pattern_match_string (spec, entry)
+          || g_pattern_match_string (specexe, entry)) {
+        gchar *full;
+
+        /* is it executable ? */
+        full = g_build_filename (*cur, entry, NULL);
+        if (!g_file_test (full, G_FILE_TEST_IS_EXECUTABLE)) {
+          g_free (full);
+          continue;
+        }
+        g_free (full);
+
+        /* strip base and dash from it */
+        suffix = g_strdup (&(entry[strlen (base) + 1]));
+        copy = g_strdup (suffix);
+
+        /* strip possible .exe from copy */
+        if (g_strrstr (copy, ".exe"))
+          g_strrstr (copy, ".exe")[0] = '\0';
+
+        /* stricter pattern check: check if it only contains digits or dots */
+        g_strcanon (copy, "0123456789.", 'X');
+        if (strstr (copy, "X")) {
+          g_free (suffix);
+          g_free (copy);
+          continue;
+        }
+        g_free (copy);
+        g_hash_table_insert (candidates, suffix, g_strdup (*cur));
+      }
+    }
+  }
+
+  g_strfreev (dirs);
+  g_pattern_spec_free (spec);
+  return candidates;
+}
+
+int
+main (int argc, char **argv)
+{
+  GHashTable *candidates;
+  gchar *dir;
+  gchar *base;
+  gchar *highest = NULL;
+  gchar *binary;                /* actual binary we're going to run */
+  gchar *path = NULL;           /* and its path */
+  gchar *desc;
+  GOptionContext *ctx;
+  GError *err = NULL;
+
+  /* detect stuff */
+  dir = get_dir_of_binary (argv[0]);
+  base = g_path_get_basename (argv[0]);
+
+  /* parse command line options */
+  desc = g_strdup_printf ("wrapper to call versioned %s", base);
+  ctx = g_option_context_new (desc);
+  g_free (desc);
+  g_option_context_set_ignore_unknown_options (ctx, TRUE);
+  g_option_context_add_main_entries (ctx, wrapper_options, GETTEXT_PACKAGE);
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    g_print ("Error initializing: %s\n", err->message);
+    exit (1);
+  }
+  g_option_context_free (ctx);
+
+  /* unmangle libtool if necessary */
+  unmangle_libtool (&dir, &base);
+
+  /* get all candidate binaries */
+  candidates = get_candidates (dir, base);
+  g_free (dir);
+
+  if (_arg_mm) {
+    /* if a version was forced, look it up in the hash table */
+    dir = g_hash_table_lookup (candidates, _arg_mm);
+    if (!dir) {
+      g_print ("ERROR: Major/minor %s of tool %s not found.\n", _arg_mm, base);
+      return 1;
+    }
+    binary = g_strdup_printf ("%s-%s", base, _arg_mm);
+  } else {
+    highest = NULL;
+
+    /* otherwise, just look up the highest version */
+    if (candidates) {
+      g_hash_table_foreach (candidates, (GHFunc) find_highest_version,
+          &highest);
+    }
+
+    if (highest == NULL) {
+      g_print ("ERROR: No version of tool %s found.\n", base);
+      return 1;
+    }
+    dir = g_hash_table_lookup (candidates, highest);
+    binary = g_strdup_printf ("%s-%s", base, highest);
+  }
+
+  g_free (base);
+
+  path = g_build_filename (dir, binary, NULL);
+  g_free (binary);
+
+  /* print out list of major/minors we found if asked for */
+  /* FIXME: do them in order by creating a GList of keys and sort them */
+  if (_arg_list_mm) {
+    g_hash_table_foreach (candidates, (GHFunc) hash_print_key, NULL);
+    g_hash_table_destroy (candidates);
+    return 0;
+  }
+
+  /* print out command line if asked for */
+  argv[0] = path;
+  if (_print) {
+    int i;
+
+    for (i = 0; i < argc; ++i) {
+      g_print ("%s", argv[i]);
+      if (i < argc - 1)
+        g_print (" ");
+    }
+    g_print ("\n");
+  }
+
+  /* execute */
+  if (execv (path, argv) == -1) {
+    g_warning ("Error executing %s: %s (%d)", path, g_strerror (errno), errno);
+  }
+  g_free (path);
+
+  return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/gst-typefind.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,184 @@
+/* GStreamer
+ * Copyright (C) 2003 Thomas Vander Stichele <thomas@apestaart.org>
+ *               2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
+ *               2005 Andy Wingo <wingo@pobox.com>
+ *
+ * gst-typefind.c: Use GStreamer to find the type of a file
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include <string.h>
+#include <locale.h>
+
+#include "tools.h"
+
+static void
+have_type_handler (GstElement * typefind, guint probability,
+    const GstCaps * caps, GstCaps ** p_caps)
+{
+  if (p_caps) {
+    *p_caps = gst_caps_copy (caps);
+  }
+}
+
+static void
+typefind_file (const gchar * filename)
+{
+  GstStateChangeReturn sret;
+  GstElement *pipeline;
+  GstElement *source;
+  GstElement *typefind;
+  GstElement *fakesink;
+  GstState state;
+  GstCaps *caps = NULL;
+  GDir *dir;
+
+  if ((dir = g_dir_open (filename, 0, NULL))) {
+    const gchar *entry;
+
+    while ((entry = g_dir_read_name (dir))) {
+      gchar *path;
+
+      path = g_strconcat (filename, G_DIR_SEPARATOR_S, entry, NULL);
+      typefind_file (path);
+      g_free (path);
+    }
+
+    g_dir_close (dir);
+    return;
+  }
+
+  pipeline = gst_pipeline_new ("pipeline");
+
+  source = gst_element_factory_make ("filesrc", "source");
+  g_assert (GST_IS_ELEMENT (source));
+  typefind = gst_element_factory_make ("typefind", "typefind");
+  g_assert (GST_IS_ELEMENT (typefind));
+  fakesink = gst_element_factory_make ("fakesink", "fakesink");
+  g_assert (GST_IS_ELEMENT (typefind));
+
+  gst_bin_add_many (GST_BIN (pipeline), source, typefind, fakesink, NULL);
+  gst_element_link_many (source, typefind, fakesink, NULL);
+
+  g_signal_connect (G_OBJECT (typefind), "have-type",
+      G_CALLBACK (have_type_handler), &caps);
+
+  g_object_set (source, "location", filename, NULL);
+
+  GST_DEBUG ("Starting typefinding for %s", filename);
+
+  /* typefind will only commit to PAUSED if it actually finds a type;
+   * otherwise the state change fails */
+  gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PAUSED);
+
+  /* wait until state change either completes or fails */
+  sret = gst_element_get_state (GST_ELEMENT (pipeline), &state, NULL, -1);
+
+  switch (sret) {
+    case GST_STATE_CHANGE_FAILURE:{
+      GstMessage *msg;
+      GstBus *bus;
+      GError *err = NULL;
+
+      bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+      msg = gst_bus_poll (bus, GST_MESSAGE_ERROR, 0);
+      gst_object_unref (bus);
+
+      if (msg) {
+        gst_message_parse_error (msg, &err, NULL);
+        g_printerr ("%s - FAILED: %s\n", filename, err->message);
+        g_error_free (err);
+        gst_message_unref (msg);
+      } else {
+        g_printerr ("%s - FAILED: unknown error\n", filename);
+      }
+      break;
+    }
+    case GST_STATE_CHANGE_SUCCESS:{
+      if (caps) {
+        gchar *caps_str;
+
+        caps_str = gst_caps_to_string (caps);
+        g_print ("%s - %s\n", filename, caps_str);
+        g_free (caps_str);
+        gst_caps_unref (caps);
+      } else {
+        g_print ("%s - %s\n", filename, "No type found");
+      }
+      break;
+    }
+    default:
+      g_assert_not_reached ();
+  }
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+}
+
+int
+main (int argc, char *argv[])
+{
+  static gchar **filenames = NULL;
+  guint num, i;
+  GError *err = NULL;
+  GOptionContext *ctx;
+  GOptionEntry options[] = {
+    GST_TOOLS_GOPTION_VERSION,
+    {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, NULL},
+    {NULL}
+  };
+
+#ifdef ENABLE_NLS
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  textdomain (GETTEXT_PACKAGE);
+#endif
+
+  if (!g_thread_supported ())
+    g_thread_init (NULL);
+
+  ctx = g_option_context_new ("FILES");
+  g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
+  g_option_context_add_group (ctx, gst_init_get_option_group ());
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
+    exit (1);
+  }
+  g_option_context_free (ctx);
+
+  gst_tools_print_version ("gst-typefind");
+
+  if (filenames == NULL || *filenames == NULL) {
+    g_print ("Please give a filename to typefind\n\n");
+    return 1;
+  }
+
+  num = g_strv_length (filenames);
+
+  for (i = 0; i < num; ++i) {
+    typefind_file (filenames[i]);
+  }
+
+  g_strfreev (filenames);
+
+  return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/gst-xmlinspect.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,856 @@
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include <string.h>
+#include <locale.h>
+#include <glib/gprintf.h>
+
+#include "tools.h"
+
+#define PUT_START_TAG(pfx,tag)                                  \
+G_STMT_START{                                                   \
+  g_print ("%*.*s<%s>\n", pfx, pfx, "", tag);                   \
+}G_STMT_END
+
+#define PUT_END_TAG(pfx,tag)                                    \
+G_STMT_START{                                                   \
+  g_print ("%*.*s</%s>\n", pfx, pfx, "", tag);                  \
+}G_STMT_END
+
+#define PUT_ESCAPED(pfx,tag,value)                              \
+G_STMT_START{                                                   \
+  const gchar *toconv = value;                                  \
+  if (value) {                                                  \
+    gchar *v = g_markup_escape_text (toconv, strlen (toconv));  \
+    g_print ("%*.*s<%s>%s</%s>\n", pfx, pfx, "", tag, v, tag);  \
+    g_free (v);                                                 \
+  }                                                             \
+}G_STMT_END
+
+#ifdef G_HAVE_ISO_VARARGS
+
+#define PUT_STRING(pfx, ...)                                    \
+G_STMT_START{                                                   \
+  gchar *ps_val = g_strdup_printf(__VA_ARGS__);                 \
+  g_print ("%*.*s%s\n", pfx, pfx, "", ps_val);                  \
+  g_free(ps_val);                                               \
+}G_STMT_END
+
+#elif defined(G_HAVE_GNUC_VARARGS)
+
+#define PUT_STRING(pfx, str, a...)                              \
+G_STMT_START{                                                   \
+  g_print ("%*.*s"str"\n", pfx, pfx, "" , ##a);                 \
+}G_STMT_END
+
+#else
+
+static inline void
+PUT_STRING (int pfx, const char *format, ...)
+{
+  va_list varargs;
+
+  g_print ("%*.*s", pfx, pfx, "");
+  va_start (varargs, format);
+  g_vprintf (format, varargs);
+  va_end (varargs);
+  g_print ("\n");
+}
+
+#endif
+
+static void
+print_caps (const GstCaps * caps, gint pfx)
+{
+  char *s;
+
+  if (!caps)
+    return;
+
+  s = gst_caps_to_string (caps);
+  PUT_ESCAPED (pfx, "caps", s);
+  g_free (s);
+}
+
+#if 0
+static void
+print_formats (const GstFormat * formats, gint pfx)
+{
+  while (formats && *formats) {
+    const GstFormatDefinition *definition;
+
+    definition = gst_format_get_details (*formats);
+    if (definition)
+      PUT_STRING (pfx, "<format id=\"%d\" nick=\"%s\">%s</format>",
+          *formats, definition->nick, definition->description);
+    else
+      PUT_STRING (pfx, "<format id=\"%d\">unknown</format>", *formats);
+
+    formats++;
+  }
+}
+#endif
+
+static void
+print_query_types (const GstQueryType * types, gint pfx)
+{
+  while (types && *types) {
+    const GstQueryTypeDefinition *definition;
+
+    definition = gst_query_type_get_details (*types);
+    if (definition)
+      PUT_STRING (pfx, "<query-type id=\"%d\" nick=\"%s\">%s</query-type>",
+          *types, definition->nick, definition->description);
+    else
+      PUT_STRING (pfx, "<query-type id=\"%d\">unknown</query-type>", *types);
+
+    types++;
+  }
+}
+
+#if 0
+static void
+print_event_masks (const GstEventMask * masks, gint pfx)
+{
+#ifndef GST_DISABLE_ENUMTYPES
+  GType event_type;
+  GEnumClass *klass;
+  GType event_flags;
+  GFlagsClass *flags_class = NULL;
+
+  event_type = gst_event_type_get_type ();
+  klass = (GEnumClass *) g_type_class_ref (event_type);
+
+  while (masks && masks->type) {
+    GEnumValue *value;
+    gint flags = 0, index = 0;
+
+    switch (masks->type) {
+      case GST_EVENT_SEEK:
+        flags = masks->flags;
+        event_flags = gst_seek_type_get_type ();
+        flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
+        break;
+      default:
+        break;
+    }
+
+    value = g_enum_get_value (klass, masks->type);
+    PUT_STRING (pfx, "<event type=\"%s\">", value->value_nick);
+
+    while (flags) {
+      GFlagsValue *value;
+
+      if (flags & 1) {
+        value = g_flags_get_first_value (flags_class, 1 << index);
+
+        if (value)
+          PUT_ESCAPED (pfx + 1, "flag", value->value_nick);
+        else
+          PUT_ESCAPED (pfx + 1, "flag", "?");
+      }
+      flags >>= 1;
+      index++;
+    }
+    PUT_END_TAG (pfx, "event");
+
+    masks++;
+  }
+#endif
+}
+#endif
+
+static void
+output_hierarchy (GType type, gint level, gint * maxlevel)
+{
+  GType parent;
+
+  parent = g_type_parent (type);
+
+  *maxlevel = *maxlevel + 1;
+  level++;
+
+  PUT_STRING (level, "<object name=\"%s\">", g_type_name (type));
+
+  if (parent)
+    output_hierarchy (parent, level, maxlevel);
+
+  PUT_END_TAG (level, "object");
+}
+
+static void
+print_element_properties (GstElement * element, gint pfx)
+{
+  GParamSpec **property_specs;
+  guint num_properties;
+  gint i;
+  gboolean readable;
+
+  property_specs = g_object_class_list_properties
+      (G_OBJECT_GET_CLASS (element), &num_properties);
+
+  PUT_START_TAG (pfx, "element-properties");
+
+  for (i = 0; i < num_properties; i++) {
+    GValue value = { 0, };
+    GParamSpec *param = property_specs[i];
+
+    readable = FALSE;
+
+    g_value_init (&value, param->value_type);
+    if (param->flags & G_PARAM_READABLE) {
+      g_object_get_property (G_OBJECT (element), param->name, &value);
+      readable = TRUE;
+    }
+    PUT_START_TAG (pfx + 1, "element-property");
+    PUT_ESCAPED (pfx + 2, "name", g_param_spec_get_name (param));
+    PUT_ESCAPED (pfx + 2, "type", g_type_name (param->value_type));
+    PUT_ESCAPED (pfx + 2, "nick", g_param_spec_get_nick (param));
+    PUT_ESCAPED (pfx + 2, "blurb", g_param_spec_get_blurb (param));
+    if (readable) {
+      PUT_ESCAPED (pfx + 2, "flags", "RW");
+    } else {
+      PUT_ESCAPED (pfx + 2, "flags", "W");
+    }
+
+    switch (G_VALUE_TYPE (&value)) {
+      case G_TYPE_STRING:
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      case G_TYPE_BOOLEAN:
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      case G_TYPE_ULONG:
+      {
+        GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
+
+        PUT_STRING (pfx + 2, "<range min=\"%lu\" max=\"%lu\"/>",
+            pulong->minimum, pulong->maximum);
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      }
+      case G_TYPE_LONG:
+      {
+        GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
+
+        PUT_STRING (pfx + 2, "<range min=\"%ld\" max=\"%ld\"/>",
+            plong->minimum, plong->maximum);
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      }
+      case G_TYPE_UINT:
+      {
+        GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
+
+        PUT_STRING (pfx + 2, "<range min=\"%u\" max=\"%u\"/>",
+            puint->minimum, puint->maximum);
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      }
+      case G_TYPE_INT:
+      {
+        GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
+
+        PUT_STRING (pfx + 2, "<range min=\"%d\" max=\"%d\"/>",
+            pint->minimum, pint->maximum);
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      }
+      case G_TYPE_UINT64:
+      {
+        GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
+
+        PUT_STRING (pfx + 2,
+            "<range min=\"%" G_GUINT64_FORMAT "\" max=\"%" G_GUINT64_FORMAT
+            "\"/>", puint64->minimum, puint64->maximum);
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      }
+      case G_TYPE_INT64:
+      {
+        GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
+
+        PUT_STRING (pfx + 2,
+            "<range min=\"%" G_GINT64_FORMAT "\" max=\"%" G_GINT64_FORMAT
+            "\"/>", pint64->minimum, pint64->maximum);
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      }
+      case G_TYPE_FLOAT:
+      {
+        GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
+
+        PUT_STRING (pfx + 2, "<range min=\"%f\" max=\"%f\"/>",
+            pfloat->minimum, pfloat->maximum);
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      }
+      case G_TYPE_DOUBLE:
+      {
+        GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
+
+        PUT_STRING (pfx + 2, "<range min=\"%g\" max=\"%g\"/>",
+            pdouble->minimum, pdouble->maximum);
+        PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
+        break;
+      }
+      default:
+        if (param->value_type == GST_TYPE_CAPS) {
+          GstCaps *caps = g_value_peek_pointer (&value);
+
+          if (!caps)
+            PUT_ESCAPED (pfx + 2, "default", "NULL");
+          else {
+            print_caps (caps, 2);
+          }
+        } else if (G_IS_PARAM_SPEC_ENUM (param)) {
+          GEnumValue *values;
+          guint j = 0;
+          gint enum_value;
+
+          values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;
+          enum_value = g_value_get_enum (&value);
+
+          while (values[j].value_name) {
+            if (values[j].value == enum_value)
+              break;
+            j++;
+          }
+          PUT_STRING (pfx + 2, "<default>%d</default>", values[j].value);
+
+          PUT_START_TAG (pfx + 2, "enum-values");
+          j = 0;
+          while (values[j].value_name) {
+            PUT_STRING (pfx + 3, "<value value=\"%d\" nick=\"%s\"/>",
+                values[j].value, values[j].value_nick);
+            j++;
+          }
+          PUT_END_TAG (pfx + 2, "enum-values");
+        } else if (G_IS_PARAM_SPEC_FLAGS (param)) {
+          GFlagsValue *values;
+          guint j = 0;
+          gint flags_value;
+
+          values = G_FLAGS_CLASS (g_type_class_ref (param->value_type))->values;
+          flags_value = g_value_get_flags (&value);
+
+          PUT_STRING (pfx + 2, "<default>%d</default>", flags_value);
+
+          PUT_START_TAG (pfx + 2, "flags");
+          j = 0;
+          while (values[j].value_name) {
+            PUT_STRING (pfx + 3, "<flag value=\"%d\" nick=\"%s\"/>",
+                values[j].value, values[j].value_nick);
+            j++;
+          }
+          PUT_END_TAG (pfx + 2, "flags");
+        } else if (G_IS_PARAM_SPEC_OBJECT (param)) {
+          PUT_ESCAPED (pfx + 2, "object-type", g_type_name (param->value_type));
+        }
+        break;
+    }
+
+    PUT_END_TAG (pfx + 1, "element-property");
+  }
+  PUT_END_TAG (pfx, "element-properties");
+  g_free (property_specs);
+}
+
+static void
+print_element_signals (GstElement * element, gint pfx)
+{
+  guint *signals;
+  guint nsignals;
+  gint i, k;
+  GSignalQuery *query;
+
+  signals = g_signal_list_ids (G_OBJECT_TYPE (element), &nsignals);
+  for (k = 0; k < 2; k++) {
+    gint counted = 0;
+
+    if (k == 0)
+      PUT_START_TAG (pfx, "element-signals");
+    else
+      PUT_START_TAG (pfx, "element-actions");
+
+    for (i = 0; i < nsignals; i++) {
+      gint n_params;
+      GType return_type;
+      const GType *param_types;
+      gint j;
+
+      query = g_new0 (GSignalQuery, 1);
+      g_signal_query (signals[i], query);
+
+      if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
+          (k == 1 && (query->signal_flags & G_SIGNAL_ACTION))) {
+        n_params = query->n_params;
+        return_type = query->return_type;
+        param_types = query->param_types;
+
+        PUT_START_TAG (pfx + 1, "signal");
+        PUT_ESCAPED (pfx + 2, "name", query->signal_name);
+        PUT_ESCAPED (pfx + 2, "return-type", g_type_name (return_type));
+        PUT_ESCAPED (pfx + 2, "object-type",
+            g_type_name (G_OBJECT_TYPE (element)));
+
+        PUT_START_TAG (pfx + 2, "params");
+        for (j = 0; j < n_params; j++) {
+          PUT_ESCAPED (pfx + 3, "type", g_type_name (param_types[j]));
+        }
+
+        PUT_END_TAG (pfx + 2, "params");
+
+        PUT_END_TAG (pfx + 1, "signal");
+
+        counted++;
+      }
+
+      g_free (query);
+    }
+    if (k == 0)
+      PUT_END_TAG (pfx, "element-signals");
+    else
+      PUT_END_TAG (pfx, "element-actions");
+  }
+}
+
+static gint
+print_element_info (GstElementFactory * factory)
+{
+  GstElement *element;
+  GstObjectClass *gstobject_class;
+  GstElementClass *gstelement_class;
+  GList *pads;
+  GstPad *pad;
+  GstStaticPadTemplate *padtemplate;
+  gint maxlevel = 0;
+
+  element = gst_element_factory_create (factory, "element");
+  if (!element) {
+    g_print ("couldn't construct element for some reason\n");
+    return -1;
+  }
+  PUT_START_TAG (0, "element");
+  PUT_ESCAPED (1, "name", GST_PLUGIN_FEATURE_NAME (factory));
+
+  gstobject_class = GST_OBJECT_CLASS (G_OBJECT_GET_CLASS (element));
+  gstelement_class = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
+
+  PUT_START_TAG (1, "details");
+  PUT_ESCAPED (2, "long-name", factory->details.longname);
+  PUT_ESCAPED (2, "class", factory->details.klass);
+  PUT_ESCAPED (2, "description", factory->details.description);
+  PUT_ESCAPED (2, "authors", factory->details.author);
+  PUT_END_TAG (1, "details");
+
+  output_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel);
+
+  PUT_START_TAG (1, "pad-templates");
+  if (factory->numpadtemplates) {
+    pads = factory->staticpadtemplates;
+    while (pads) {
+      padtemplate = (GstStaticPadTemplate *) (pads->data);
+      pads = g_list_next (pads);
+
+      PUT_START_TAG (2, "pad-template");
+      PUT_ESCAPED (3, "name", padtemplate->name_template);
+
+      if (padtemplate->direction == GST_PAD_SRC)
+        PUT_ESCAPED (3, "direction", "src");
+      else if (padtemplate->direction == GST_PAD_SINK)
+        PUT_ESCAPED (3, "direction", "sink");
+      else
+        PUT_ESCAPED (3, "direction", "unknown");
+
+      if (padtemplate->presence == GST_PAD_ALWAYS)
+        PUT_ESCAPED (3, "presence", "always");
+      else if (padtemplate->presence == GST_PAD_SOMETIMES)
+        PUT_ESCAPED (3, "presence", "sometimes");
+      else if (padtemplate->presence == GST_PAD_REQUEST) {
+        PUT_ESCAPED (3, "presence", "request");
+        PUT_ESCAPED (3, "request-function",
+            GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
+      } else
+        PUT_ESCAPED (3, "presence", "unknown");
+
+      if (padtemplate->static_caps.string) {
+        print_caps (gst_static_caps_get (&padtemplate->static_caps), 3);
+      }
+      PUT_END_TAG (2, "pad-template");
+    }
+  }
+  PUT_END_TAG (1, "pad-templates");
+
+  PUT_START_TAG (1, "element-flags");
+  PUT_END_TAG (1, "element-flags");
+
+  if (GST_IS_BIN (element)) {
+    PUT_START_TAG (1, "bin-flags");
+
+    PUT_END_TAG (1, "bin-flags");
+  }
+
+
+  PUT_START_TAG (1, "element-implementation");
+
+  PUT_STRING (2, "<state-change function=\"%s\"/>",
+      GST_DEBUG_FUNCPTR_NAME (gstelement_class->change_state));
+
+#ifndef GST_DISABLE_LOADSAVE
+  PUT_STRING (2, "<save function=\"%s\"/>",
+      GST_DEBUG_FUNCPTR_NAME (gstobject_class->save_thyself));
+  PUT_STRING (2, "<load function=\"%s\"/>",
+      GST_DEBUG_FUNCPTR_NAME (gstobject_class->restore_thyself));
+#endif
+  PUT_END_TAG (1, "element-implementation");
+
+  PUT_START_TAG (1, "clocking-interaction");
+  if (gst_element_requires_clock (element)) {
+    PUT_STRING (2, "<requires-clock/>");
+  }
+  if (gst_element_provides_clock (element)) {
+    GstClock *clock;
+
+    clock = gst_element_get_clock (element);
+    if (clock)
+      PUT_STRING (2, "<provides-clock name=\"%s\"/>", GST_OBJECT_NAME (clock));
+  }
+  PUT_END_TAG (1, "clocking-interaction");
+
+#ifndef GST_DISABLE_INDEX
+  if (gst_element_is_indexable (element)) {
+    PUT_STRING (1, "<indexing-capabilities/>");
+  }
+#endif
+
+  PUT_START_TAG (1, "pads");
+  if (element->numpads) {
+    const GList *pads;
+
+    pads = element->pads;
+    while (pads) {
+      pad = GST_PAD (pads->data);
+      pads = g_list_next (pads);
+
+      PUT_START_TAG (2, "pad");
+      PUT_ESCAPED (3, "name", gst_pad_get_name (pad));
+
+      if (gst_pad_get_direction (pad) == GST_PAD_SRC)
+        PUT_ESCAPED (3, "direction", "src");
+      else if (gst_pad_get_direction (pad) == GST_PAD_SINK)
+        PUT_ESCAPED (3, "direction", "sink");
+      else
+        PUT_ESCAPED (3, "direction", "unknown");
+
+      if (pad->padtemplate)
+        PUT_ESCAPED (3, "template", pad->padtemplate->name_template);
+
+      PUT_START_TAG (3, "implementation");
+      if (pad->chainfunc)
+        PUT_STRING (4, "<chain-based function=\"%s\"/>",
+            GST_DEBUG_FUNCPTR_NAME (pad->chainfunc));
+      if (pad->getrangefunc)
+        PUT_STRING (4, "<get-range-based function=\"%s\"/>",
+            GST_DEBUG_FUNCPTR_NAME (pad->getrangefunc));
+      if (pad->eventfunc != gst_pad_event_default)
+        PUT_STRING (4, "<event-function function=\"%s\"/>",
+            GST_DEBUG_FUNCPTR_NAME (pad->eventfunc));
+      if (pad->queryfunc != gst_pad_query_default)
+        PUT_STRING (4, "<query-function function=\"%s\"/>",
+            GST_DEBUG_FUNCPTR_NAME (pad->queryfunc));
+      if (pad->querytypefunc != gst_pad_get_query_types_default) {
+        PUT_STRING (4, "<query-type-func function=\"%s\">",
+            GST_DEBUG_FUNCPTR_NAME (pad->querytypefunc));
+        print_query_types (gst_pad_get_query_types (pad), 5);
+        PUT_END_TAG (4, "query-type-func");
+      }
+
+      if (pad->intlinkfunc != gst_pad_get_internal_links_default)
+        PUT_STRING (4, "<intlink-function function=\"%s\"/>",
+            GST_DEBUG_FUNCPTR_NAME (pad->intlinkfunc));
+
+      if (pad->bufferallocfunc)
+        PUT_STRING (4, "<bufferalloc-function function=\"%s\"/>",
+            GST_DEBUG_FUNCPTR_NAME (pad->bufferallocfunc));
+      PUT_END_TAG (3, "implementation");
+
+      if (pad->caps) {
+        print_caps (pad->caps, 3);
+      }
+      PUT_END_TAG (2, "pad");
+    }
+  }
+  PUT_END_TAG (1, "pads");
+
+  print_element_properties (element, 1);
+  print_element_signals (element, 1);
+
+  /* for compound elements */
+  /* FIXME: gst_bin_get_list does not exist anymore
+     if (GST_IS_BIN (element)) {
+     GList *children;
+     GstElement *child;
+     PUT_START_TAG (1, "children");
+     children = (GList *) gst_bin_get_list (GST_BIN (element));
+     while (children) {
+     child = GST_ELEMENT (children->data);
+     children = g_list_next (children);
+
+     PUT_ESCAPED (2, "child", GST_ELEMENT_NAME (child));
+     }
+     PUT_END_TAG (1, "children");
+     }
+   */
+  PUT_END_TAG (0, "element");
+
+  return 0;
+}
+
+static void
+print_element_list (void)
+{
+  GList *plugins;
+
+  plugins = gst_default_registry_get_plugin_list ();
+  while (plugins) {
+    GList *features;
+    GstPlugin *plugin;
+
+    plugin = (GstPlugin *) (plugins->data);
+    plugins = g_list_next (plugins);
+
+    features =
+        gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
+        plugin->desc.name);
+    while (features) {
+      GstPluginFeature *feature;
+
+      feature = GST_PLUGIN_FEATURE (features->data);
+
+      if (GST_IS_ELEMENT_FACTORY (feature)) {
+        GstElementFactory *factory;
+
+        factory = GST_ELEMENT_FACTORY (feature);
+        g_print ("%s:  %s: %s\n", plugin->desc.name,
+            GST_PLUGIN_FEATURE_NAME (factory),
+            gst_element_factory_get_longname (factory));
+      }
+#ifndef GST_DISABLE_INDEX
+      else if (GST_IS_INDEX_FACTORY (feature)) {
+        GstIndexFactory *factory;
+
+        factory = GST_INDEX_FACTORY (feature);
+        g_print ("%s:  %s: %s\n", plugin->desc.name,
+            GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
+      }
+#endif
+      else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
+        GstTypeFindFactory *factory;
+
+        factory = GST_TYPE_FIND_FACTORY (feature);
+        if (factory->extensions) {
+          guint i = 0;
+
+          g_print ("%s type: ", plugin->desc.name);
+          while (factory->extensions[i]) {
+            g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
+            i++;
+          }
+        } else
+          g_print ("%s type: N/A\n", plugin->desc.name);
+      } else {
+        g_print ("%s:  %s (%s)\n", plugin->desc.name,
+            GST_PLUGIN_FEATURE_NAME (feature),
+            g_type_name (G_OBJECT_TYPE (feature)));
+      }
+
+      features = g_list_next (features);
+    }
+  }
+}
+
+static void
+print_plugin_info (GstPlugin * plugin)
+{
+  GList *features;
+  gint num_features = 0;
+  gint num_elements = 0;
+  gint num_autoplug = 0;
+  gint num_types = 0;
+  gint num_indexes = 0;
+  gint num_other = 0;
+
+  g_print ("Plugin Details:\n");
+  g_print ("  Name:\t\t%s\n", plugin->desc.name);
+  g_print ("  Description:\t%s\n", plugin->desc.description);
+  g_print ("  Filename:\t%s\n", plugin->filename);
+  g_print ("  Version:\t%s\n", plugin->desc.version);
+  g_print ("  License:\t%s\n", plugin->desc.license);
+  g_print ("  Package:\t%s\n", plugin->desc.package);
+  g_print ("  Origin URL:\t%s\n", plugin->desc.origin);
+  g_print ("\n");
+
+  features =
+      gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
+      plugin->desc.name);
+
+  while (features) {
+    GstPluginFeature *feature;
+
+    feature = GST_PLUGIN_FEATURE (features->data);
+
+    if (GST_IS_ELEMENT_FACTORY (feature)) {
+      GstElementFactory *factory;
+
+      factory = GST_ELEMENT_FACTORY (feature);
+      g_print ("  %s: %s\n", GST_OBJECT_NAME (factory),
+          gst_element_factory_get_longname (factory));
+      num_elements++;
+    }
+#ifndef GST_DISABLE_INDEX
+    else if (GST_IS_INDEX_FACTORY (feature)) {
+      GstIndexFactory *factory;
+
+      factory = GST_INDEX_FACTORY (feature);
+      g_print ("  %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
+      num_indexes++;
+    }
+#endif
+    else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
+      GstTypeFindFactory *factory;
+
+      factory = GST_TYPE_FIND_FACTORY (feature);
+      if (factory->extensions) {
+        guint i = 0;
+
+        g_print ("%s type: ", plugin->desc.name);
+        while (factory->extensions[i]) {
+          g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
+          i++;
+        }
+      } else
+        g_print ("%s type: N/A\n", plugin->desc.name);
+      num_types++;
+    } else {
+      g_print ("  %s (%s)\n", GST_OBJECT_NAME (feature),
+          g_type_name (G_OBJECT_TYPE (feature)));
+      num_other++;
+    }
+    num_features++;
+    features = g_list_next (features);
+  }
+  g_print ("\n  %d features:\n", num_features);
+  if (num_elements > 0)
+    g_print ("  +-- %d elements\n", num_elements);
+  if (num_autoplug > 0)
+    g_print ("  +-- %d autopluggers\n", num_autoplug);
+  if (num_types > 0)
+    g_print ("  +-- %d types\n", num_types);
+  if (num_indexes > 0)
+    g_print ("  +-- %d indexes\n", num_indexes);
+  if (num_other > 0)
+    g_print ("  +-- %d other objects\n", num_other);
+
+  g_print ("\n");
+}
+
+
+int
+main (int argc, char *argv[])
+{
+  GstElementFactory *factory;
+  GstPlugin *plugin;
+  gchar *so;
+  GOptionEntry options[] = {
+    {"gst-inspect-plugin", 'p', 0, G_OPTION_ARG_STRING,
+        "Show plugin details", NULL},
+    {"gst-inspect-scheduler", 's', 0, G_OPTION_ARG_STRING,
+        "Show scheduler details", NULL},
+    GST_TOOLS_GOPTION_VERSION,
+    {NULL}
+  };
+  GOptionContext *ctx;
+  GError *err = NULL;
+
+  setlocale (LC_ALL, "");
+
+  if (!g_thread_supported ())
+    g_thread_init (NULL);
+
+  ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]");
+  g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
+  g_option_context_add_group (ctx, gst_init_get_option_group ());
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    g_print ("Error initializing: %s\n", err->message);
+    exit (1);
+  }
+  g_option_context_free (ctx);
+
+  gst_tools_print_version ("gst-xmlinspect");
+
+  PUT_STRING (0, "<?xml version=\"1.0\"?>");
+
+  /* if no arguments, print out list of elements */
+  if (argc == 1) {
+    print_element_list ();
+
+    /* else we try to get a factory */
+  } else {
+    /* first check for help */
+    if (strstr (argv[1], "-help")) {
+      g_print ("Usage: %s\t\t\tList all registered elements\n", argv[0]);
+      g_print ("       %s element-name\tShow element details\n", argv[0]);
+      g_print ("       %s plugin-name[.so]\tShow information about plugin\n",
+          argv[0]);
+      return 0;
+    }
+
+    /* only search for a factory if there's not a '.so' */
+    if (!strstr (argv[1], ".so")) {
+      factory = gst_element_factory_find (argv[1]);
+
+      /* if there's a factory, print out the info */
+      if (factory)
+        return print_element_info (factory);
+      else {
+        GstPluginFeature *feature;
+
+        /* FIXME implement other pretty print function for these */
+#ifndef GST_DISABLE_INDEX
+        feature = gst_default_registry_find_feature (argv[1],
+            GST_TYPE_INDEX_FACTORY);
+        if (feature) {
+          g_print ("%s: an index\n", argv[1]);
+          return 0;
+        }
+#endif
+        feature = gst_default_registry_find_feature (argv[1],
+            GST_TYPE_TYPE_FIND_FACTORY);
+        if (feature) {
+          g_print ("%s: a type find function\n", argv[1]);
+          return 0;
+        }
+      }
+    } else {
+      /* strip the .so */
+      so = strstr (argv[1], ".so");
+      so[0] = '\0';
+    }
+
+    /* otherwise assume it's a plugin */
+    plugin = gst_default_registry_find_plugin (argv[1]);
+
+    /* if there is such a plugin, print out info */
+
+    if (plugin) {
+      print_plugin_info (plugin);
+    } else {
+      g_print ("no such element or plugin '%s'\n", argv[1]);
+      return -1;
+    }
+  }
+
+  return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/tools.bat	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,3 @@
+gst-launch filesrc location=c:\\data\\warning.wav ! wavparse ! audioconvert ! audioresample ! devsoundsink
+gst-launch filesrc location=c:\\data\\Crnival.mp3 !  devsoundsink
+gst-launch filesrc location=c:\\data\\test.raw !  devsoundsink
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tools/tools.h	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,66 @@
+/* GStreamer
+ * Copyright (C) 2005 Benjamin Otte <otte@gnome.org>
+ *
+ * tools.h: header for common stuff of all GStreamer tools
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef __GST_TOOLS_H__
+#define __GST_TOOLS_H__
+
+#include <stdlib.h>
+
+#include <gst/gst.h>
+#include "gst/gst-i18n-app.h"
+
+/*
+ * This is a kind of hacky way to make all the tools use the same version code.
+ * If anyone knows a less hacky way to get this done, feel free to implement it.
+ * 
+ * It also includes all the files that all the tools require.
+ */
+
+static gboolean __gst_tools_version = FALSE;
+
+#define GST_TOOLS_GOPTION_VERSION \
+    { "version", 0, 0, G_OPTION_ARG_NONE, &__gst_tools_version, \
+      N_("Print version information and exit"), NULL }
+
+static void
+gst_tools_print_version (const gchar * tool)
+{
+  gchar *s;
+
+  s = g_strdup_printf ("%s-%u.%u", tool, GST_VERSION_MAJOR, GST_VERSION_MINOR);
+  g_set_prgname (s);
+  g_free (s);
+
+  if (__gst_tools_version) {
+    gchar *version_str;
+
+    version_str = gst_version_string ();
+    g_print ("%s version %u.%u.%u\n", g_get_prgname (),
+        GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO);
+    g_print ("%s\n", version_str);
+    g_print ("%s\n", GST_PACKAGE_ORIGIN);
+    g_free (version_str);
+    exit (0);
+  }
+}
+
+#endif /* __GST_TOOLS_H__ */
--- a/gstreamer_core/tsrc/check/elements/createelementcore/group/createelementcore.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/createelementcore/group/createelementcore.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/elements/fakesink/group/fakesink.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/fakesink/group/fakesink.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/elements/fakesink/src/fakesink.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/fakesink/src/fakesink.c	Thu Jul 22 16:36:00 2010 +0100
@@ -25,6 +25,7 @@
 #include <gst/check/check.h>
 #include <gst/check/gstcheck.h>
 
+
 #define LOG_FILE "c:\\logs\\fakesink_log1.txt"
 #include "std_log_result.h"
 #define LOG_FILENAME_LINE __FILE__, __LINE__
--- a/gstreamer_core/tsrc/check/elements/fakesrc/group/fakesrc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/fakesrc/group/fakesrc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/elements/fdsrc/group/fdsrc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/fdsrc/group/fdsrc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/elements/filesink/group/filesink.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/filesink/group/filesink.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/elements/filesrc/group/filesrc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/filesrc/group/filesrc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/elements/gstqueue/group/gstqueue.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/gstqueue/group/gstqueue.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -35,12 +35,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/elements/identity/group/identity.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/identity/group/identity.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -35,12 +35,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/elements/multiqueue/group/multiqueue.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/multiqueue/group/multiqueue.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/elements/tee/group/tee.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/elements/tee/group/tee.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/generic/gststates/group/gststates.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/generic/gststates/group/gststates.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/generic/sinks/group/sinks.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/generic/sinks/group/sinks.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -34,12 +34,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gst/group/gst.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gst/group/gst.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstbin/group/gstbin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstbin/group/gstbin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/gst/gstbuffer/group/gstbuffer.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstbuffer/group/gstbuffer.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstbus/group/gstbus.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstbus/group/gstbus.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstcaps/group/gstcaps.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstcaps/group/gstcaps.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstelement/group/gstelement.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstelement/group/gstelement.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstevent/group/gstevent.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstevent/group/gstevent.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstghostpad/group/gstghostpad.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstghostpad/group/gstghostpad.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstindex/group/gstindex.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstindex/group/gstindex.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -35,12 +35,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstinterface/group/gstinterface.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstinterface/group/gstinterface.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstiterator/group/gstiterator.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstiterator/group/gstiterator.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -19,12 +19,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstmessage/group/gstmessage.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstmessage/group/gstmessage.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -35,12 +35,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstminiobject/group/gstminiobject.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstminiobject/group/gstminiobject.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -35,12 +35,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstobject/group/gstobject.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstobject/group/gstobject.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstpad/group/gstpad.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstpad/group/gstpad.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstparamspecs/group/gstparamspecs.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstparamspecs/group/gstparamspecs.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstpipeline/group/gstpipeline.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstpipeline/group/gstpipeline.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstplugin/group/gstplugin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstplugin/group/gstplugin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstpoll/group/gstpoll.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstpoll/group/gstpoll.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstquery/group/gstquery.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstquery/group/gstquery.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstregistry/group/gstregistry.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstregistry/group/gstregistry.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -35,12 +35,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstsegment/group/gstsegment.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstsegment/group/gstsegment.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/gst/gststructure/group/gststructure.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gststructure/group/gststructure.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gststructure/src/gststructure.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gststructure/src/gststructure.c	Thu Jul 22 16:36:00 2010 +0100
@@ -36,9 +36,6 @@
 #define xmlfile *(get_xmlfile())
 #endif
 
-
-
-
 #if EMULATOR
 static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
 #define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
--- a/gstreamer_core/tsrc/check/gst/gstsystemclock/group/gstsystemclock.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstsystemclock/group/gstsystemclock.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -39,12 +39,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 SYSTEMINCLUDE	../../../../../libs
--- a/gstreamer_core/tsrc/check/gst/gsttag/group/gsttag.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gsttag/group/gsttag.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -20,12 +20,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 USERINCLUDE		../../../../../libs/gst/check
 
--- a/gstreamer_core/tsrc/check/gst/gsttagsetter/group/gsttagsetter.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gsttagsetter/group/gsttagsetter.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,12 +37,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gsttask/group/gsttask.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gsttask/group/gsttask.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gsturi/group/gsturi.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gsturi/group/gsturi.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -21,12 +21,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstutils/group/gstutils.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstutils/group/gstutils.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -21,12 +21,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/gst/gstvalue/group/gstvalue.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/gst/gstvalue/group/gstvalue.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -38,12 +38,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 SYSTEMINCLUDE	../../../../../libs
--- a/gstreamer_core/tsrc/check/libs/adapter/group/adapter.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/adapter/group/adapter.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/libs/basesrc/group/basesrc.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/basesrc/group/basesrc.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/libs/collectpads/group/collectpads.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/collectpads/group/collectpads.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,12 +37,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/libs/controller/group/controller.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/controller/group/controller.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/libs/gdp/group/gdp.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/gdp/group/gdp.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/libs/gstnetclientclock/group/gstnetclientclock.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/gstnetclientclock/group/gstnetclientclock.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/libs/gstnettimeprovider/group/gstnettimeprovider.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/gstnettimeprovider/group/gstnettimeprovider.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/libs/libsabi/group/libsabi.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/libsabi/group/libsabi.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/libs/typefindhelper/group/typefindhelper.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/libs/typefindhelper/group/typefindhelper.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/pipelines/cleanup/group/cleanup.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/pipelines/cleanup/group/cleanup.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/pipelines/core-simple-launch-lines/group/core-simple-launch-lines.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/pipelines/core-simple-launch-lines/group/core-simple-launch-lines.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/check/pipelines/parse-disabled/group/parse-disabled.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/pipelines/parse-disabled/group/parse-disabled.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 USERINCLUDE	../../../../../libs/gst/check
 
--- a/gstreamer_core/tsrc/check/pipelines/parse-launch/group/parse-launch.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/pipelines/parse-launch/group/parse-launch.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE	../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/check/pipelines/stress/group/stress.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/check/pipelines/stress/group/stress.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE	../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/adapter/group/testgstadapter.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/adapter/group/testgstadapter.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -57,12 +57,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/examples/controller/group/testaudioexample.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/controller/group/testaudioexample.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -54,12 +54,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/examples/group/bld.inf	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/group/bld.inf	Thu Jul 22 16:36:00 2010 +0100
@@ -20,7 +20,7 @@
 *
 */
 
-
+#include "../gstseek/group/bld.inf"
 #include "../helloworld/group/bld.inf"
 #include "../controller/group/bld.inf"
 #include "../adapter/group/bld.inf"				
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tsrc/examples/gstseek/group/bld.inf	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+										
+PRJ_TESTMMPFILES							
+gstseek.mmp		
+
+
+
+					
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tsrc/examples/gstseek/group/gstseek.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+#include <platform_paths.hrh>                    
+
+TARGET          gstseek.exe
+TARGETTYPE      EXE
+UID             0 0x0AB229ED
+
+EPOCHEAPSIZE 0x10000 0x100000
+#ifdef EKA2
+LANG            SC
+CAPABILITY All -Tcb
+VENDORID        VID_DEFAULT
+
+#endif
+
+
+
+MACRO           HAVE_CONFIG_H
+
+
+USERINCLUDE				..
+USERINCLUDE             ../libs/gst/base
+USERINCLUDE             ../gst
+USERINCLUDE             ../libs/gst/base
+USERINCLUDE             ../gst
+USERINCLUDE             ../../../../..
+USERINCLUDE       ../../../../libs/gst/check
+USERINCLUDE      ../../../../gst
+USERINCLUDE      ../../../..
+USERINCLUDE					 ../../../../libs
+
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+
+OS_LAYER_GLIB_SYSTEMINCLUDE
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
+
+
+
+
+
+SOURCEPATH  ../src
+
+SOURCE      gstseek.c
+
+
+LIBRARY		 euser.lib libc.lib 
+LIBRARY         libpthread.lib
+LIBRARY         libdl.lib
+LIBRARY         libglib.lib
+LIBRARY         libgmodule.lib
+
+LIBRARY         libgobject.lib
+LIBRARY         libgthread.lib
+LIBRARY         libm.lib
+LIBRARY         libz.lib
+LIBRARY         libgstreamer.lib
+LIBRARY			libgstbase.lib
+LIBRARY			libgstcontroller.lib
+
+STATICLIBRARY	libcrt0.lib
+//VENDORID VID_DEFAULT 
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_core/tsrc/examples/gstseek/src/gstseek.c	Thu Jul 22 16:36:00 2010 +0100
@@ -0,0 +1,214 @@
+
+#include <gst/gst_global.h>
+#include <stdlib.h>
+#include <gst/gst.h>
+#include <gst/gstelement.h>
+
+#define LOG_FILE "c:\\logs\\launch_logs.txt" 
+#include "std_log_result.h" 
+#define LOG_FILENAME_LINE __FILE__, __LINE__
+
+
+void create_xml(int result)
+{
+
+    if(result)
+    {
+        assert_failed = 1;
+    } 
+
+    testResultXml(xmlfile);
+    close_log_file();
+
+    if(result)
+    {
+        exit (-1);
+    }    
+
+}
+
+GstElement *pipeline, *source, *wavparse,*sink,*conv,*resample,*decoder,*audioconvert,*audioresample ;
+GstBus *bus;
+GMainLoop *loop;
+
+static gboolean
+bus_call (GstBus     *bus,
+          GstMessage *msg,
+          gpointer    data)
+{
+  switch (GST_MESSAGE_TYPE (msg)) {
+    case GST_MESSAGE_EOS:
+        gst_element_set_state (pipeline, GST_STATE_NULL);
+        g_main_loop_quit(loop);
+        gst_object_unref (GST_OBJECT (pipeline));
+        std_log(LOG_FILENAME_LINE, "Test Successful");
+        create_xml(0); 
+      break;
+    case GST_MESSAGE_ERROR: {
+      gchar *debug;
+      GError *err;
+      gst_message_parse_error (msg, &err, &debug);
+      g_free (debug);
+      g_print ("Error: %s\n", err->message);
+      g_error_free (err);
+      std_log(LOG_FILENAME_LINE, "Test Failed");
+      create_xml(1); 
+      break;
+    }
+    default:
+      break;
+  }
+
+  return TRUE;
+}
+
+static void
+cb_newpad (GstElement *decodebin,
+       GstPad     *pad,
+       gboolean    last,
+       gpointer    data)
+{
+    GstCaps *caps;
+    GstStructure *str;
+    GstPadLinkReturn linkret= GST_PAD_LINK_OK ;
+   
+
+    GstPad* sinkpad = NULL;
+
+    
+    /* check media type */
+    caps = gst_pad_get_caps (pad);
+    str = gst_caps_get_structure (caps, 0);
+    if (!g_strrstr (gst_structure_get_name (str), "audio")) {
+    gst_caps_unref (caps);
+    return;
+    }
+    gst_caps_unref (caps);
+    
+//    if( link_with_devsoundsink )
+//        {
+        sinkpad = gst_element_get_pad( sink, "sink");
+        //gst_bin_add_many (GST_BIN (pipeline),source, decoder,sink, NULL);
+            
+//        }
+//    else
+//        {
+//        audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
+//        audioresample = gst_element_factory_make ("audioresample", "audioresample");        
+//        sinkpad = gst_element_get_pad( audioconvert, "sink");
+//        
+//        gst_bin_add_many (GST_BIN (pipeline),source, decoder,audioconvert,audioresample,sink, NULL);
+//        
+//        if (!gst_element_link (audioconvert,audioresample))
+//           g_error ("link(audioconvert,audioresample, sink) failed!\n");   
+//        if (!gst_element_link (audioresample, sink))
+//           g_error ("link(audioconvert,audioresample, sink) failed!\n");         
+//        }
+    
+    linkret = gst_pad_link (pad, sinkpad);
+}
+
+
+static gboolean
+cb_get_position (GstElement* temp /*pipeline*/)
+{
+    GstFormat fmt = GST_FORMAT_TIME;
+    gint64 pos = 0, len, time_nanoseconds, diff;
+    GstState state;
+    
+    gst_element_get_state(GST_ELEMENT(pipeline),&state,NULL,-1);
+    if (gst_element_query_position (pipeline, &fmt, &pos)
+    && gst_element_query_duration (pipeline, &fmt, &len)) {
+    g_print ("Time: %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT "\r",
+    GST_TIME_ARGS (pos), GST_TIME_ARGS (len));
+    }
+    time_nanoseconds = pos + 1000000000;
+    
+    if (!gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
+    GST_SEEK_TYPE_SET, time_nanoseconds,
+    GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)) {
+    g_print ("Seek failed!\n");
+    }
+    
+    gst_element_get_state(GST_ELEMENT(pipeline),&state,NULL,-1);
+    
+    if (gst_element_query_position (pipeline, &fmt, &pos)
+    && gst_element_query_duration (pipeline, &fmt, &len)) {
+    g_print ("Time: %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT "\r",
+    GST_TIME_ARGS (pos), GST_TIME_ARGS (len));
+    }
+    
+    diff = pos - time_nanoseconds;
+    
+    if( diff > 1000000 )
+        {
+        create_xml( 1 );
+        }
+
+    /* call me again */
+    return TRUE;
+}
+
+int main (int argc, char *argv[])
+{
+    
+    xmlfile = "launch_logs";
+    std_log(LOG_FILENAME_LINE, "Test Started launch");
+ 
+    if (argc != 2) {
+      g_print ("usage: %s <Test file>\n", argv[0]);
+      std_log(LOG_FILENAME_LINE, "Test Failed");
+      create_xml(1); 
+      exit (-1);
+    }
+    //link_with_devsoundsink = FALSE;
+    gst_init (&argc, &argv);
+    loop = g_main_loop_new (NULL, FALSE);
+    
+    /* create elements */
+    pipeline = gst_pipeline_new ("audio-player");
+    source = gst_element_factory_make ("filesrc", "file-source");
+    decoder = gst_element_factory_make ("decodebin2", "decodebin2-decoder");
+    sink = gst_element_factory_make ("devsoundsink", "sink");    
+//    audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
+//    audioresample = gst_element_factory_make ("audioresample", "audioresample");    
+//    sink = gst_element_factory_make ("devsoundsink", "sink");
+    
+    if (!pipeline || !source || !decoder || !sink) {
+        g_print ("One element could not be created\n");
+        return -1;
+        }
+    /* set filename property on the file source. Also add a message  handler. */
+    g_object_set (G_OBJECT (source), "location", argv[1], NULL);
+            /* put all elements in a bin */
+    gst_bin_add_many (GST_BIN (pipeline),source, decoder,sink, NULL);
+            /* link together - note that we cannot link the parser and  decoder yet, because the parser uses dynamic pads. For that, we set a pad-added signal handler. */
+    gst_element_link (source, decoder);
+   
+
+    
+    
+    gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE (pipeline)), bus_call, loop);
+    
+    g_signal_connect (decoder, "new-decoded-pad", G_CALLBACK (cb_newpad), NULL);
+    //g_signal_connect (decoder, "autoplug-continue", G_CALLBACK (cb_autoplug), NULL);
+    
+    g_timeout_add (1000/*in mili sec*/, (GSourceFunc) cb_get_position, NULL);
+    
+    //g_signal_connect (decoder, "pad-added", G_CALLBACK (new_pad_cb),pipeline);
+            /* Now set to playing and iterate. */
+    g_print ("Setting to PLAYING\n");
+    gst_element_set_state (pipeline, GST_STATE_PLAYING);
+    g_print ("Running\n");
+    g_main_loop_run (loop);
+            /* clean up nicely */
+    g_print ("Returned, stopping playback\n");
+    gst_element_set_state (pipeline, GST_STATE_NULL);
+    g_print ("Deleting pipeline\n");
+    gst_object_unref (GST_OBJECT (pipeline));
+    
+    g_print ("completed palying audio\n");
+    //std_log(LOG_FILENAME_LINE, "Test Successful");
+    //create_xml(0); 
+    return 0;
+}
--- a/gstreamer_core/tsrc/examples/helloworld/group/helloworld.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/helloworld/group/helloworld.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -54,12 +54,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/examples/launch/group/launch.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/launch/group/launch.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -54,12 +54,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/examples/launch/group/mp3launch.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/launch/group/mp3launch.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -54,12 +54,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/examples/launch/src/launch.c	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/launch/src/launch.c	Thu Jul 22 16:36:00 2010 +0100
@@ -3,12 +3,11 @@
 #include <stdlib.h>
 #include <gst/gst.h>
 #include <gst/gstelement.h>
-
+#include <string.h>
 #define LOG_FILE "c:\\logs\\launch_logs.txt" 
 #include "std_log_result.h" 
 #define LOG_FILENAME_LINE __FILE__, __LINE__
 
-
 void create_xml(int result)
 {
 
@@ -30,7 +29,7 @@
 GstElement *pipeline, *source, *wavparse,*sink,*conv,*resample,*decoder,*audioconvert,*audioresample ;
 GstBus *bus;
 GMainLoop *loop;
-
+//gboolean    link_with_devsoundsink;
 
 //audioconvert ! audioresample 
 static gboolean
@@ -43,7 +42,7 @@
         gst_element_set_state (pipeline, GST_STATE_NULL);
         g_main_loop_quit(loop);
         gst_object_unref (GST_OBJECT (pipeline));
-        std_log(LOG_FILENAME_LINE, "Test Successful");
+        //std_log(LOG_FILENAME_LINE, "Test Successful");
         create_xml(0); 
       break;
     case GST_MESSAGE_ERROR: {
@@ -53,7 +52,7 @@
       g_free (debug);
       g_print ("Error: %s\n", err->message);
       g_error_free (err);
-      std_log(LOG_FILENAME_LINE, "Test Failed");
+      //std_log(LOG_FILENAME_LINE, "Test Failed");
       create_xml(1); 
       break;
     }
@@ -64,61 +63,144 @@
   return TRUE;
 }
 
-static void 
-new_pad_cb (GstElement *wavparse, GstPad *new_pad, gpointer pipeline)
- {
+//static void 
+//new_pad_cb (GstElement *wavparse, GstPad *new_pad, gpointer pipeline)
+// {
+//   
+//   gst_element_set_state (pipeline, GST_STATE_PAUSED);
+//
+//   if (!gst_element_link (wavparse, audioconvert))
+//      g_error ("link(wavparse, audioconvert) failed!\n");
+//
+//   gst_element_set_state (pipeline, GST_STATE_PLAYING);
+// }
+
+
+static void
+cb_newpad (GstElement *decodebin,
+       GstPad     *pad,
+       gboolean    last,
+       gpointer    data)
+{
+    GstCaps *caps;
+    GstStructure *str;
+    GstPadLinkReturn linkret= GST_PAD_LINK_OK ;
    
-   gst_element_set_state (pipeline, GST_STATE_PAUSED);
+
+    GstPad* sinkpad = NULL;
 
-   if (!gst_element_link (wavparse, audioconvert))
-      g_error ("link(wavparse, audioconvert) failed!\n");
+    
+    /* check media type */
+    caps = gst_pad_get_caps (pad);
+    str = gst_caps_get_structure (caps, 0);
+    if (!g_strrstr (gst_structure_get_name (str), "audio")) {
+    gst_caps_unref (caps);
+    return;
+    }
+    gst_caps_unref (caps);
+    
+//    if( link_with_devsoundsink )
+//        {
+        sinkpad = gst_element_get_pad( sink, "sink");
+        //gst_bin_add_many (GST_BIN (pipeline),source, decoder,sink, NULL);
+            
+//        }
+//    else
+//        {
+//        audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
+//        audioresample = gst_element_factory_make ("audioresample", "audioresample");        
+//        sinkpad = gst_element_get_pad( audioconvert, "sink");
+//        
+//        gst_bin_add_many (GST_BIN (pipeline),source, decoder,audioconvert,audioresample,sink, NULL);
+//        
+//        if (!gst_element_link (audioconvert,audioresample))
+//           g_error ("link(audioconvert,audioresample, sink) failed!\n");   
+//        if (!gst_element_link (audioresample, sink))
+//           g_error ("link(audioconvert,audioresample, sink) failed!\n");         
+//        }
+    
+    linkret = gst_pad_link (pad, sinkpad);
+}
 
-   gst_element_set_state (pipeline, GST_STATE_PLAYING);
- }
+gboolean  cb_autoplug( GstBin * *bin,
+                        GstPad        *pad,
+                        GstCaps       *caps,
+                        gpointer       user_data)
+{
+    GstCaps* sinkcaps = NULL;    
+    gboolean supported = FALSE;
+    
+    GstPad* sinkpad = gst_element_get_pad( sink, "sink");
+    sinkcaps = gst_pad_get_caps( sinkpad );
+    supported = gst_caps_is_subset( caps, sinkcaps );
+    
+    if( supported )
+    {
+        //link_with_devsoundsink = TRUE;
+        return FALSE;
+    }
+    return TRUE;
+}
 
 int main (int argc, char *argv[])
 {
-    
-    
-    xmlfile = "launch_logs";
-    std_log(LOG_FILENAME_LINE, "Test Started launch");
+	int is_mp3_file = 0;
+  const char* ext = 0;  
+    //xmlfile = "launch_logs";
+    ////std_log(LOG_FILENAME_LINE, "Test Started launch");
  
     if (argc != 2) {
-      g_print ("usage: %s <mp3 file>\n", argv[0]);
-      std_log(LOG_FILENAME_LINE, "Test Failed");
+      g_print ("usage: %s <Test file>\n", argv[0]);
+      //std_log(LOG_FILENAME_LINE, "Test Failed");
       create_xml(1); 
       exit (-1);
     }
-    
+    ext = strrchr(argv[1],'.');
+    if ( ext && ( !strcmp(ext,".mp3") || !strcmp(ext,".Mp3") || !strcmp(ext,".MP3") || !strcmp(ext,".mP3") ) )
+    	is_mp3_file = 1;
+    //link_with_devsoundsink = FALSE;
     gst_init (&argc, &argv);
     loop = g_main_loop_new (NULL, FALSE);
     
     /* create elements */
     pipeline = gst_pipeline_new ("audio-player");
     source = gst_element_factory_make ("filesrc", "file-source");
-    decoder = gst_element_factory_make ("wavparse", "wavparse-decoder");
-    sink = gst_element_factory_make ("devsoundsink", "sink");
-    audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
-    audioresample = gst_element_factory_make ("audioresample", "audioresample");    
-        if (!pipeline || !source || !decoder || !audioconvert || !audioresample) {
+    if (is_mp3_file)
+		  decoder = gst_element_factory_make ("mp3parse", "mp3parse");
+    else
+  		decoder = gst_element_factory_make ("decodebin2", "decodebin2-decoder");
+
+  
+    sink = gst_element_factory_make ("devsoundsink", "sink");    
+//    audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
+//    audioresample = gst_element_factory_make ("audioresample", "audioresample");    
+//    sink = gst_element_factory_make ("devsoundsink", "sink");
+    
+    if (!pipeline || !source || !decoder || !sink) {
         g_print ("One element could not be created\n");
         return -1;
         }
     /* set filename property on the file source. Also add a message  handler. */
-    g_object_set (G_OBJECT (source), "location", "c:\\data\\khuda1.wav", NULL);
+    g_object_set (G_OBJECT (source), "location", argv[1], NULL);
             /* put all elements in a bin */
-    gst_bin_add_many (GST_BIN (pipeline),source, decoder,audioconvert,audioresample,sink, NULL);
-            /* link together - note that we cannot link the parser and  decoder yet, because the parser uses dynamic pads. For that, we set a pad-added signal handler. */
-    gst_element_link (source, decoder);
-   
-    if (!gst_element_link (audioconvert,audioresample))
-       g_error ("link(audioconvert,audioresample, sink) failed!\n");   
-    if (!gst_element_link (audioresample, sink))
-       g_error ("link(audioconvert,audioresample, sink) failed!\n"); 
+    gst_bin_add_many (GST_BIN (pipeline),source, decoder,sink, NULL);
+    if (is_mp3_file)
+  		gst_element_link_many (source, decoder, sink, NULL);
+		else
+		{
+      /* link together - note that we cannot link the parser and  decoder yet, because the parser uses dynamic pads. For that, we set a pad-added signal handler. */
+    	gst_element_link (source, decoder);
+    }
+
+
+    gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE (pipeline)), bus_call, loop);
+    if (!is_mp3_file)
+		{
+    	g_signal_connect (decoder, "new-decoded-pad", G_CALLBACK (cb_newpad), NULL);
+    	g_signal_connect (decoder, "autoplug-continue", G_CALLBACK (cb_autoplug), NULL);
+		}
     
-    
-    gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE (pipeline)), bus_call, loop);
-    g_signal_connect (decoder, "pad-added", G_CALLBACK (new_pad_cb),pipeline);
+    //g_signal_connect (decoder, "pad-added", G_CALLBACK (new_pad_cb),pipeline);
             /* Now set to playing and iterate. */
     g_print ("Setting to PLAYING\n");
     gst_element_set_state (pipeline, GST_STATE_PLAYING);
@@ -131,7 +213,7 @@
     gst_object_unref (GST_OBJECT (pipeline));
     
     g_print ("completed palying audio\n");
-    //std_log(LOG_FILENAME_LINE, "Test Successful");
+    ////std_log(LOG_FILENAME_LINE, "Test Successful");
     //create_xml(0); 
     return 0;
 }
--- a/gstreamer_core/tsrc/examples/manual/bin/group/bin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/bin/group/bin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/manual/createelements/group/gstelementcreate.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/createelements/group/gstelementcreate.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -41,12 +41,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
@@ -78,8 +73,4 @@
 
 
 STATICLIBRARY  libcrt0.lib
-
-
-
-
 SMPSAFE
--- a/gstreamer_core/tsrc/examples/manual/elementfactory/group/elementfactory.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/elementfactory/group/elementfactory.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/manual/getelements/group/gstelementget.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/getelements/group/gstelementget.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -41,12 +41,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 USERINCLUDE		../../../../../libs/gst/check
 
@@ -79,8 +74,4 @@
 
 STATICLIBRARY  libcrt0.lib
 
-
-
-
-
 SMPSAFE
--- a/gstreamer_core/tsrc/examples/manual/init/group/init.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/init/group/init.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/manual/linkelements/group/gstelementgetlink.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/linkelements/group/gstelementgetlink.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -41,12 +41,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
@@ -78,8 +73,4 @@
 
 STATICLIBRARY  libcrt0.lib
 
-
-
-
-
 SMPSAFE
--- a/gstreamer_core/tsrc/examples/manual/makeelements/group/gstelementmake.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/makeelements/group/gstelementmake.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -41,12 +41,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 USERINCLUDE		../../../../../libs/gst/check
 
@@ -76,8 +71,4 @@
 
 STATICLIBRARY  libcrt0.lib
 
-
-
-
-
 SMPSAFE
--- a/gstreamer_core/tsrc/examples/manual/manual_decodebin/group/manual_decodebin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/manual_decodebin/group/manual_decodebin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 USERINCLUDE		../../../../../libs/gst/check
 
--- a/gstreamer_core/tsrc/examples/manual/manual_dynamic/group/manual_dynamic.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/manual_dynamic/group/manual_dynamic.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -20,12 +20,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/manual/manual_ghostpad/group/manual_ghostpad.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/manual_ghostpad/group/manual_ghostpad.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -23,12 +23,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/manual/manual_helloworld/group/manual_helloworld.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/manual_helloworld/group/manual_helloworld.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -37,12 +37,7 @@
 OS_LAYER_GLIB_SYSTEMINCLUDE
 
 
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 USERINCLUDE		../../../../../libs/gst/check
 
--- a/gstreamer_core/tsrc/examples/manual/manual_playbin/group/manual_playbin.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/manual_playbin/group/manual_playbin.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 USERINCLUDE		../../../../../libs/gst/check
 
--- a/gstreamer_core/tsrc/examples/manual/manual_typefind/group/manual_typefind.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/manual_typefind/group/manual_typefind.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -20,12 +20,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/manual/pad/group/pad.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/pad/group/pad.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/manual/query/group/query.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/manual/query/group/query.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -36,12 +36,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../../include/gstreamer
-USERINCLUDE		../../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 USERINCLUDE		../../../../../libs/gst/check
--- a/gstreamer_core/tsrc/examples/metadata/group/metadata.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/metadata/group/metadata.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -55,12 +55,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/examples/queue/group/queue.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/queue/group/queue.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -52,12 +52,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/examples/typefind/group/typefind.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/examples/typefind/group/typefind.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -51,12 +51,7 @@
 OS_LAYER_LIBC_SYSTEMINCLUDE
 
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../../../include/gstreamer
-USERINCLUDE		../../../../../include/gstreamer/gst
-USERINCLUDE		../../../../../include/gstreamer/gst/base
-USERINCLUDE		../../../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE 
 
 
 
--- a/gstreamer_core/tsrc/gstreamertestcases_suite3/conf/gstreamertestcases_suite3.cfg	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite3/conf/gstreamertestcases_suite3.cfg	Thu Jul 22 16:36:00 2010 +0100
@@ -177,4 +177,484 @@
 create gstreamertestcases_suite3 foobar
 foobar Example parse-launch.exe delayed_link
 delete foobar
-[Endtest] 
\ No newline at end of file
+[Endtest] 
+
+/* playback testing */
+
+
+[Test]
+title launch.exe AAC_8k_64kbps_mono_Queen.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_8k_64kbps_mono_Queen.aac
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\AAC_8k_64kbps_mono_Test3.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_8k_64kbps_mono_Test3.aac
+delete foobar
+[Endtest] 
+
+[Test]
+title launch.exe f:\data\AAC_16k_64kbps_mono_Queen.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_16k_64kbps_mono_Queen.aac
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\AAC_16k_64kbps_mono_Test3.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_16k_64kbps_mono_Test3.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\AAC_32k_VBR_st_Frederik.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_32k_VBR_st_Frederik.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\AAC_32k_VBR_st_Test3.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_32k_VBR_st_Test3.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\AAC_44.1k_128kbps_st_music.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_44.1k_128kbps_st_music.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\AAC_44.1k_241kbps_st_instrumental.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_44.1k_241kbps_st_instrumental.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\AAC_44.1k_264kbps_st_Test3.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_44.1k_264kbps_st_Test3.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\AAC_44.1k_264kbps_st_Yo.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_44.1k_264kbps_st_Yo.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\AAC_44.1k_VBR_st_Test3.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_44.1k_VBR_st_Test3.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\AAC_44.1k_VBR_st_Yo.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_44.1k_VBR_st_Yo.aac
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\AAC_48k_288kbps_st_Test3.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_48k_288kbps_st_Test3.aac
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\AAC_48k_288kbps_st_Test7.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_48k_288kbps_st_Test7.aac
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\AAC_48k_288kbps_st_Yo.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\AAC_48k_288kbps_st_Yo.aac
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\eAAC_48k_24kbps_st_Frederik.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\eAAC_48k_24kbps_st_Frederik.aac
+delete foobar
+[Endtest] 
+
+[Test]
+title launch.exe f:\data\eAAC_48k_24kbps_st_Test8.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\eAAC_48k_24kbps_st_Test8.aac
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\eAAC_48k_32kbps_st_Test8.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\eAAC_48k_32kbps_st_Test8.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\eAAC_48k_40kbps_st_Test8.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\eAAC_48k_40kbps_st_Test8.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\eAAC_48k_48kbps_st_Frederik.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\eAAC_48k_48kbps_st_Frederik.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\eAAC_48k_48kbps_st_Test8.aac
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\eAAC_48k_48kbps_st_Test8.aac
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\Err_MP3_44.1k_64kbps_mono.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\Err_MP3_44.1k_64kbps_mono.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_11.025k_40kbps_mono_Queen.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_11.025k_40kbps_mono_Queen.mp3
+delete foobar
+[Endtest] 
+
+
+/*
+[Test]
+title launch.exe f:\data\MP3_11.025k_40kbps_mono_Test2.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_11.025k_40kbps_mono_Test2.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_16k_96-160kbps_mono_Queen.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_16k_96-160kbps_mono_Queen.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_16k_96-160kbps_mono_Test2.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_16k_96-160kbps_mono_Test2.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_22.05k_8kbps_mono_Test1.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_22.05k_8kbps_mono_Test1.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_22.05k_64kbps_joint_st_Kilpi.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_22.05k_64kbps_joint_st_Kilpi.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_24k_160kbps_st_Test2.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_24k_160kbps_st_Test2.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_32k_48-192kbps_st_Test1.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_32k_48-192kbps_st_Test1.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_44.1k_128kbps_mono_0.5k10k_sines.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_44.1k_128kbps_mono_0.5k10k_sines.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_44.1k_128kbps_st_Dire.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_44.1k_128kbps_st_Dire.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_44.1k_128kbps_st_Frederik.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_44.1k_128kbps_st_Frederik.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_44.1k_128kbps_st_Queen.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_44.1k_128kbps_st_Queen.mp3
+delete foobar
+[Endtest] 
+
+[Test]
+title launch.exe f:\data\MP3_44.1k_128kbps_st_speech3.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_44.1k_128kbps_st_speech3.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_44.1k_128kbps_st_Test2.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_44.1k_128kbps_st_Test2.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_44.1k_128kbps_st_Test3.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_44.1k_128kbps_st_Test3.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_44.1k_128kbps_st_Test4.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_44.1k_128kbps_st_Test4.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_128kbps_st_Rasmus.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_128kbps_st_Rasmus.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_160-256kbps_st_disco.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_160-256kbps_st_disco.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_160-256kbps_st_Test1.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_160-256kbps_st_Test1.mp3
+delete foobar
+[Endtest] 
+
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_256kbps_mono_1kHzsine.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_256kbps_mono_1kHzsine.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_256kbps_mono_1kHzsine.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_256kbps_mono_1kHzsine.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_256kbps_st_1kHzsine.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_256kbps_st_1kHzsine.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_256kbps_st_1kHzsine_st2mono.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_256kbps_st_1kHzsine_st2mono.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_256kbps_st_dinner_bell.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_256kbps_st_dinner_bell.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_256kbps_st_drums.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_256kbps_st_drums.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_256kbps_st_flute.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_256kbps_st_flute.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_256kbps_st_jingle_bells.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_256kbps_st_jingle_bells.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_320kbps_st_ascending.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_320kbps_st_ascending.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_320kbps_st_Queen.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_320kbps_st_Queen.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_320kbps_st_reverb.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_320kbps_st_reverb.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_320kbps_st_stw.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_320kbps_st_stw.mp3
+delete foobar
+[Endtest] 
+
+
+[Test]
+title launch.exe f:\data\MP3_48k_320kbps_st_Test3.mp3
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\MP3_48k_320kbps_st_Test3.mp3
+delete foobar
+[Endtest]
+
+[Test]
+title launch.exe mp3 Reliabity testcase
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\LivingFromMomentToMoment.mp3
+foobar SetTimeout 20
+delete foobar
+[Endtest]
+
+[Test]
+title launch.exe AAC Reliabity testcase
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\LivingFromMomentToMoment.aac
+foobar SetTimeout 20
+delete foobar
+[Endtest]
+
+[Test]
+title launch.exe EAAC Reliabity testcase
+create gstreamertestcases_suite3 foobar
+foobar Example launch.exe f:\data\LivingFromMomentToMoment.m4a
+foobar SetTimeout 20
+delete foobar
+[Endtest]
+
+*/
\ No newline at end of file
Binary file gstreamer_test_apps/GLib-Liboil-Sisx/liboil.sisx has changed
Binary file gstreamer_test_apps/GLib-Liboil-Sisx/openc_glib_sp.sisx has changed
--- a/gstreamer_test_apps/QtGSTPlayer/QtGSTPlayer.pro	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_test_apps/QtGSTPlayer/QtGSTPlayer.pro	Thu Jul 22 16:36:00 2010 +0100
@@ -7,7 +7,7 @@
 #  Name        : QtGSTPlayer.pro
 #  Part of     : LibHb / gstplayer
 #  Description : Project definition file for simple gstplayer
-#  Version     : %version: 1 %
+#  Version     : %version: 2 %
 #
 #  Copyright ? 2008 Nokia.  All rights reserved.
 #  This material, including documentation and any related computer
@@ -21,13 +21,35 @@
 #
 
 TEMPLATE = app
-TARGET = 
+TARGET = QtGSTPlayer
 DEPENDPATH += .
-INCLUDEPATH += .
-
-# Input
+HEADERS += folderview.h record_play.h views.h
+    
 SOURCES += main.cpp folderview.cpp views.cpp record_play.c
-HEADERS += folderview.h views.h
 
 RESOURCES += QtGSTPlayer.qrc
+DEFINES += HB_GESTURE_FW HB_EFFECTS
 
+INCLUDEPATH += /epoc32/include/mw/hb/hbcore \
+	/epoc32/include/mw/hb/hbfeedback \
+	/epoc32/include/mw/hb/hbinput \
+	/epoc32/include/mw/hb/hbutils \
+	/epoc32/include/mw/hb/hbwidgets \
+	MW_LAYER_SYSTEMINCLUDE \
+	OS_LAYER_LIBC_SYSTEMINCLUDE \
+	OS_LAYER_GLIB_SYSTEMINCLUDE \
+	MW_LAYER_GSTREAMER_SYSTEMINCLUDE
+
+#UNIX style Lib inclusion	
+LIBS += -lhbcore -lhbwidgets -llibglib -llibgobject -llibgthread \
+	-llibgstreamer -llibgstbase -llibgstcontroller		
+
+
+symbian {
+		TARGET.UID2 = 0x2002c391
+		TARGET.UID3 = 0x2002c392
+		TARGET.EPOCHEAPSIZE = 0x100000 0x10000000
+		TARGET.CAPABILITY += All -Tcb
+		}
+		
+
--- a/gstreamer_test_apps/QtGSTPlayer/folderview.cpp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_test_apps/QtGSTPlayer/folderview.cpp	Thu Jul 22 16:36:00 2010 +0100
@@ -118,11 +118,6 @@
     mainWindow()->setCurrentView(Views::folderView());
 }
 
-/*void FolderView::settingsViewTriggered()
-{
-    mainWindow()->setCurrentView(Views::settingsView());
-}*/
-
 void FolderView::showNote(const int err)
 {
     if(err)
--- a/gstreamer_test_apps/QtGSTPlayer/views.cpp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_test_apps/QtGSTPlayer/views.cpp	Thu Jul 22 16:36:00 2010 +0100
@@ -18,14 +18,5 @@
     	// 0 since folderView was added first to the main window
         return win->viewAt(0);
     }
-
-/*!
-  Returns the pointer to settings view.
-*/
-  /*  HbFormView *settingsView()
-    {
-	    // 1 since settingsView was the second view added
-        return static_cast<HbFormView *>(win->viewAt(1));
-    }
-    */
+    
 }
--- a/gstreamer_test_apps/gstplayer/group/gstplayer.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_test_apps/gstplayer/group/gstplayer.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -74,12 +74,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../../include/gstreamer
-USERINCLUDE		../../../include/gstreamer/gst
-USERINCLUDE		../../../include/gstreamer/gst/base
-USERINCLUDE		../../../include/gstreamer/gst/controller
-USERINCLUDE		../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../../include/gstreamer/gst/net
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 LIBRARY         euser.lib
 LIBRARY         apparc.lib
--- a/gstreamer_test_apps/miscfiles/GStreamer_udeb_STUB_SIS.bat	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_test_apps/miscfiles/GStreamer_udeb_STUB_SIS.bat	Thu Jul 22 16:36:00 2010 +0100
@@ -1,18 +1,24 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:  GStreamer SisStub
-rem
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
 
 @echo off
 echo ----------------------------
--- a/gstreamer_test_apps/miscfiles/GStreamer_urel_STUB_SIS.bat	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_test_apps/miscfiles/GStreamer_urel_STUB_SIS.bat	Thu Jul 22 16:36:00 2010 +0100
@@ -1,17 +1,24 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:  GStreamer Sis Stub for UREL
-rem 
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
 
 @echo off
 echo ----------------------------
--- a/gstreamer_test_apps/miscfiles/copyplugins.bat	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_test_apps/miscfiles/copyplugins.bat	Thu Jul 22 16:36:00 2010 +0100
@@ -1,3 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
 md \epoc32\release\winscw\udeb\z\sys\bin\plugins
 
 COPY \epoc32\release\winscw\udeb\libgstcoreelements.dll         \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstcoreelements.dll
--- a/gstreamer_test_apps/miscfiles/createsis.bat	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstreamer_test_apps/miscfiles/createsis.bat	Thu Jul 22 16:36:00 2010 +0100
@@ -1,3 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
 del ..\..\SIS\gstreamer*.sis*
 
 call GStreamer_udeb_STUB_SIS.bat
--- a/gstregistrygenerator/group/gstregistrygenerator.mmp	Fri Jun 11 16:24:58 2010 +0100
+++ b/gstregistrygenerator/group/gstregistrygenerator.mmp	Thu Jul 22 16:36:00 2010 +0100
@@ -50,13 +50,7 @@
 MW_LAYER_SYSTEMINCLUDE
 OS_LAYER_LIBC_SYSTEMINCLUDE
 OS_LAYER_GLIB_SYSTEMINCLUDE
-USERINCLUDE		../../include/gstreamer
-USERINCLUDE		../../include/gstreamer/gst
-USERINCLUDE		../../include/gstreamer/gst/base
-USERINCLUDE		../../include/gstreamer/gst/controller
-USERINCLUDE		../../include/gstreamer/gst/dataprotocol
-USERINCLUDE		../../include/gstreamer/gst/net
-
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 
 SOURCEPATH	  ../src
--- a/rom/gstreamer.iby	Fri Jun 11 16:24:58 2010 +0100
+++ b/rom/gstreamer.iby	Thu Jul 22 16:36:00 2010 +0100
@@ -29,6 +29,7 @@
 #define GSTREAMER_IBY
 
 #include <bldvariant.hrh>
+#include <liboil.iby>
 
 #ifdef FF_GSTREAMER
 
@@ -47,7 +48,6 @@
 file=ABI_DIR\BUILD_DIR\libgstriff.dll               SHARED_LIB_DIR\libgstriff.dll
 file=ABI_DIR\BUILD_DIR\libgsttag.dll                SHARED_LIB_DIR\libgsttag.dll
 file=ABI_DIR\BUILD_DIR\libgstvideo.dll              SHARED_LIB_DIR\libgstvideo.dll
-file=ABI_DIR\BUILD_DIR\libgstphotography.dll        SHARED_LIB_DIR\libgstphotography.dll
 //file=ABI_DIR\BUILD_DIR\libgstvideorate.dll        SHARED_LIB_DIR\libgstvideorate.dll
 //file=ABI_DIR\BUILD_DIR\libgstvideoscale.dll       SHARED_LIB_DIR\libgstvideoscale.dll
 //file=ABI_DIR\BUILD_DIR\libgstvideotestsrc.dll     SHARED_LIB_DIR\libgstvideotestsrc.dll
@@ -77,11 +77,13 @@
 file=ABI_DIR\BUILD_DIR\libgstrtp.dll                SHARED_LIB_DIR\libgstrtp.dll
 file=ABI_DIR\BUILD_DIR\libgstgdp.dll                SHARED_LIB_DIR\libgstgdp.dll
 file=ABI_DIR\BUILD_DIR\libgstvolume.dll             SHARED_LIB_DIR\libgstvolume.dll
+file=ABI_DIR\BUILD_DIR\libgstmpegaudioparse.dll     SHARED_LIB_DIR\libgstmpegaudioparse.dll
+file=ABI_DIR\BUILD_DIR\libgstnokiaaacdec.dll        SHARED_LIB_DIR\libgstnokiaaacdec.dll
+file=ABI_DIR\BUILD_DIR\libgstqtdemux.dll            SHARED_LIB_DIR\libgstqtdemux.dll
 file=ABI_DIR\BUILD_DIR\libgstamrmux.dll             SHARED_LIB_DIR\libgstamrmux.dll
-file=ABI_DIR\BUILD_DIR\libgstnokiaaacenc.dll        SHARED_LIB_DIR\libgstnokiaaacenc.dll
 file=ABI_DIR\BUILD_DIR\gstqtmux.dll                 SHARED_LIB_DIR\gstqtmux.dll
+file=ABI_DIR\BUILD_DIR\libgstnokiaaacenc.dll        SHARED_LIB_DIR\libgstnokiaaacenc.dll
 file=ABI_DIR\BUILD_DIR\GstAudioRecordBin.dll        SHARED_LIB_DIR\GstAudioRecordBin.dll
-//file=ABI_DIR\BUILD_DIR\liboil.dll                   SHARED_LIB_DIR\liboil.dll
 
 //GStreamer_Stub
 data=ZSYSTEM\install\gstreamer_stub.sis             System\Install\gstreamer_stub.sis
Binary file sis/gstreamer_framework.pkg has changed