Revision: 201019
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 May 2010 13:09:21 +0300
changeset 11 1373546e05c6
parent 10 6f340f756486
child 13 04c79585b4c7
Revision: 201019 Kit: 2010121
data/gst_dll_2001F41F.txt
gst_plugins_base/group/bld.inf
gst_plugins_base/group/ffmpegcolorspace.mmp
gst_plugins_base/group/gstadder.mmp
gst_plugins_base/group/gstapp.mmp
gst_plugins_base/group/gstaudio.mmp
gst_plugins_base/group/gstaudioconvert.mmp
gst_plugins_base/group/gstaudiorate.mmp
gst_plugins_base/group/gstaudioresample.mmp
gst_plugins_base/group/gstaudiotestsrc.mmp
gst_plugins_base/group/gstcdda.mmp
gst_plugins_base/group/gstdecodebin.mmp
gst_plugins_base/group/gstdecodebin2.mmp
gst_plugins_base/group/gstfft.mmp
gst_plugins_base/group/gstgdp.mmp
gst_plugins_base/group/gstinterfaces.mmp
gst_plugins_base/group/gstnetbuffer.mmp
gst_plugins_base/group/gstpbutils.mmp
gst_plugins_base/group/gstplayback.mmp
gst_plugins_base/group/gstplaybin.mmp
gst_plugins_base/group/gstqueue2.mmp
gst_plugins_base/group/gstriff.mmp
gst_plugins_base/group/gstrtp.mmp
gst_plugins_base/group/gstsubparse.mmp
gst_plugins_base/group/gsttag.mmp
gst_plugins_base/group/gsttcp.mmp
gst_plugins_base/group/gsttypefind.mmp
gst_plugins_base/group/gstvideo.mmp
gst_plugins_base/group/gstvideorate.mmp
gst_plugins_base/group/gstvideoscale.mmp
gst_plugins_base/group/gstvideotestsrc.mmp
gst_plugins_base/group/gstvolume.mmp
gst_plugins_base/gst-libs/gst/pbutils/install-plugins.c
gst_plugins_base/gst-libs/gst/riff/riff-media.h
gst_plugins_base/gst-libs/gst/riff/riff-read.h
gst_plugins_base/tsrc/check/elements/adder/group/adder.mmp
gst_plugins_base/tsrc/check/elements/audioconvert/group/audioconvert.mmp
gst_plugins_base/tsrc/check/elements/audiorate/group/audiorate.mmp
gst_plugins_base/tsrc/check/elements/audioresample/group/audioresample.mmp
gst_plugins_base/tsrc/check/elements/audiotestsrc/group/audiotestsrc.mmp
gst_plugins_base/tsrc/check/elements/createelementbase/group/createelementbase.mmp
gst_plugins_base/tsrc/check/elements/createelementbasevideo/group/createelementbasevideo.mmp
gst_plugins_base/tsrc/check/elements/decodebin/ffmpegcolorspace/group/ffmpegcolorspace.mmp
gst_plugins_base/tsrc/check/elements/decodebin/group/decodebin.mmp
gst_plugins_base/tsrc/check/elements/ffmpegcolorspace/group/ffmpegcolorspace.mmp
gst_plugins_base/tsrc/check/elements/gdpdepay/group/gdpdepay.mmp
gst_plugins_base/tsrc/check/elements/multifdsink/group/multifdsink.mmp
gst_plugins_base/tsrc/check/elements/playbin/group/playbin.mmp
gst_plugins_base/tsrc/check/elements/playbin/src/playbin.c
gst_plugins_base/tsrc/check/elements/subparse/group/subparse.mmp
gst_plugins_base/tsrc/check/elements/videorate/group/videorate.mmp
gst_plugins_base/tsrc/check/elements/volume/group/volume.mmp
gst_plugins_base/tsrc/check/generic/clock-selection/group/clock-selection.mmp
gst_plugins_base/tsrc/check/generic/states/group/states.mmp
gst_plugins_base/tsrc/check/gst/typefindfunctions/group/typefindfunctions.mmp
gst_plugins_base/tsrc/check/libs/fft/group/fft.mmp
gst_plugins_base/tsrc/check/libs/netbuffer/group/netbuffer.mmp
gst_plugins_base/tsrc/check/libs/pbutils/group/pbutils.mmp
gst_plugins_base/tsrc/check/libs/rtp/group/rtp.mmp
gst_plugins_base/tsrc/check/libs/tag/group/tag.mmp
gst_plugins_base/tsrc/check/libs/taudio/group/taudio.mmp
gst_plugins_base/tsrc/check/libs/video/group/video.mmp
gst_plugins_base/tsrc/check/pipelines/simple-launch-lines/group/simple-launch-lines.mmp
gst_plugins_base/tsrc/check/pipelines/streamheader/group/streamheader.mmp
gst_plugins_base/tsrc/examples/dynamic/addstream/group/addstream.mmp
gst_plugins_base/tsrc/icles/stress_playbin/group/stress_playbin.mmp
gst_plugins_good/bwins/libgstmpegaudioparseu.def
gst_plugins_good/eabi/libgstmpegaudioparseu.def
gst_plugins_good/group/bld.inf
gst_plugins_good/group/gstalaw.mmp
gst_plugins_good/group/gstalpha.mmp
gst_plugins_good/group/gstalphacolor.mmp
gst_plugins_good/group/gstaudiofx.mmp
gst_plugins_good/group/gstauparse.mmp
gst_plugins_good/group/gstautodetect.mmp
gst_plugins_good/group/gstavi.mmp
gst_plugins_good/group/gstcamerabin.mmp
gst_plugins_good/group/gstjpeg.mmp
gst_plugins_good/group/gstmpegaudioparse.mmp
gst_plugins_good/group/gstmulaw.mmp
gst_plugins_good/group/gstphotography.mmp
gst_plugins_good/group/gstpng.mmp
gst_plugins_good/group/gstqtdemux.mmp
gst_plugins_good/group/gstqtmux.mmp
gst_plugins_good/group/gstwavenc.mmp
gst_plugins_good/group/gstwavparse.mmp
gst_plugins_good/gst-libs/gst/interfaces/photography.h
gst_plugins_good/gst/mpegaudioparse/gstmpegaudioparse.c
gst_plugins_good/gst/mpegaudioparse/gstmpegaudioparse.h
gst_plugins_good/gst/mpegaudioparse/gstxingmux.c
gst_plugins_good/gst/mpegaudioparse/gstxingmux.h
gst_plugins_good/gst/mpegaudioparse/plugin.c
gst_plugins_good/gst/qtdemux/gstrtpxqtdepay.h
gst_plugins_good/gst/qtdemux/qtdemux.c
gst_plugins_good/gst/qtdemux/qtdemux.h
gst_plugins_symbian/group/gstamrmux.mmp
gst_plugins_symbian/group/gstdevsoundext.mmp
gst_plugins_symbian/group/gstdevsoundsink.mmp
gst_plugins_symbian/group/gstdevsoundsrc.mmp
gst_plugins_symbian/gst/AudioRecordBin/group/GstAudioRecordBin.mmp
gst_plugins_symbian/gst/AudioRecordBin/src/GstAudioRecordBin.cpp
gst_plugins_symbian/gst/amrmux/gstamrmux.c
gst_plugins_symbian/gst/devsound/devsoundsrcwrapper.cpp
gst_plugins_symbian/gst/devsound/gstdevsoundsink.c
gst_plugins_symbian/gst/devsound/gstdevsoundsrc.c
gst_plugins_symbian/gst/devsound/gstdevsoundsrc.h
gst_plugins_symbian/gst/devsound/gsterrorconcealment.c
gst_plugins_symbian/gst/devsound/gstg711decoderinterface.c
gst_plugins_symbian/gst/devsound/gstg711encoderinterface.c
gst_plugins_symbian/gst/devsound/gstg729decoderinterface.c
gst_plugins_symbian/gst/devsound/gstg729encoderinterface.c
gst_plugins_symbian/gst/devsound/gstilbcdecoderinterface.c
gst_plugins_symbian/gst/devsound/gstilbcencoderinterface.c
gst_plugins_symbian/gst/devsound/gstspeechencoderconfig.c
gst_plugins_symbian/tsrc/gstreamertestmodule/group/GStreamerTestClass.mmp
gst_plugins_symbian/tsrc/gstreamertestmodule/inc/GStreamerTestClass.h
gst_plugins_symbian/tsrc/gstreamertestmodule/src/GStreamerTestClassBlocks.cpp
gstreamer_core/group/bld.inf
gstreamer_core/group/gstbase.mmp
gstreamer_core/group/gstcontroller.mmp
gstreamer_core/group/gstdataprotocol.mmp
gstreamer_core/group/gstelements.mmp
gstreamer_core/group/gstindexers.mmp
gstreamer_core/group/gstnet.mmp
gstreamer_core/group/gstreamer.mmp
gstreamer_core/gst/gstregistry.c
gstreamer_core/gst/gstutils.h
gstreamer_core/gst/parse/lex._gst_parse_yy.c
gstreamer_core/libs/gst/check/gstcheck.h
gstreamer_core/libs/gst/controller/gstcontroller.h
gstreamer_core/libs/gst/controller/gstcontrolsource.c
gstreamer_core/libs/gst/controller/gstinterpolationcontrolsource.h
gstreamer_core/libs/gst/controller/gstlfocontrolsource.h
gstreamer_core/tools/grammar.y
gstreamer_core/tools/group/bld.inf
gstreamer_core/tools/group/gst-inspect.mmp
gstreamer_core/tools/group/gst-launch.mmp
gstreamer_core/tools/group/gst-typefind.mmp
gstreamer_core/tools/group/testgstreamer.pkg
gstreamer_core/tools/group/tools.pkg
gstreamer_core/tools/gst-inspect.c
gstreamer_core/tools/gst-launch.c
gstreamer_core/tools/gst-run.c
gstreamer_core/tools/gst-typefind.c
gstreamer_core/tools/gst-xmlinspect.c
gstreamer_core/tools/tools.bat
gstreamer_core/tools/tools.h
gstreamer_core/tsrc/check/elements/createelementcore/group/createelementcore.mmp
gstreamer_core/tsrc/check/elements/fakesink/group/fakesink.mmp
gstreamer_core/tsrc/check/elements/fakesink/src/fakesink.c
gstreamer_core/tsrc/check/elements/fakesrc/group/fakesrc.mmp
gstreamer_core/tsrc/check/elements/fdsrc/group/fdsrc.mmp
gstreamer_core/tsrc/check/elements/filesink/group/filesink.mmp
gstreamer_core/tsrc/check/elements/filesrc/group/filesrc.mmp
gstreamer_core/tsrc/check/elements/gstqueue/group/gstqueue.mmp
gstreamer_core/tsrc/check/elements/identity/group/identity.mmp
gstreamer_core/tsrc/check/elements/multiqueue/group/multiqueue.mmp
gstreamer_core/tsrc/check/elements/tee/group/tee.mmp
gstreamer_core/tsrc/check/generic/gststates/group/gststates.mmp
gstreamer_core/tsrc/check/generic/sinks/group/sinks.mmp
gstreamer_core/tsrc/check/gst/gst/group/gst.mmp
gstreamer_core/tsrc/check/gst/gstbin/group/gstbin.mmp
gstreamer_core/tsrc/check/gst/gstbuffer/group/gstbuffer.mmp
gstreamer_core/tsrc/check/gst/gstbus/group/gstbus.mmp
gstreamer_core/tsrc/check/gst/gstcaps/group/gstcaps.mmp
gstreamer_core/tsrc/check/gst/gstelement/group/gstelement.mmp
gstreamer_core/tsrc/check/gst/gstevent/group/gstevent.mmp
gstreamer_core/tsrc/check/gst/gstghostpad/group/gstghostpad.mmp
gstreamer_core/tsrc/check/gst/gstindex/group/gstindex.mmp
gstreamer_core/tsrc/check/gst/gstinterface/group/gstinterface.mmp
gstreamer_core/tsrc/check/gst/gstiterator/group/gstiterator.mmp
gstreamer_core/tsrc/check/gst/gstmessage/group/gstmessage.mmp
gstreamer_core/tsrc/check/gst/gstminiobject/group/gstminiobject.mmp
gstreamer_core/tsrc/check/gst/gstobject/group/gstobject.mmp
gstreamer_core/tsrc/check/gst/gstpad/group/gstpad.mmp
gstreamer_core/tsrc/check/gst/gstparamspecs/group/gstparamspecs.mmp
gstreamer_core/tsrc/check/gst/gstpipeline/group/gstpipeline.mmp
gstreamer_core/tsrc/check/gst/gstplugin/group/gstplugin.mmp
gstreamer_core/tsrc/check/gst/gstpoll/group/gstpoll.mmp
gstreamer_core/tsrc/check/gst/gstquery/group/gstquery.mmp
gstreamer_core/tsrc/check/gst/gstregistry/group/gstregistry.mmp
gstreamer_core/tsrc/check/gst/gstsegment/group/gstsegment.mmp
gstreamer_core/tsrc/check/gst/gststructure/group/gststructure.mmp
gstreamer_core/tsrc/check/gst/gststructure/src/gststructure.c
gstreamer_core/tsrc/check/gst/gstsystemclock/group/gstsystemclock.mmp
gstreamer_core/tsrc/check/gst/gsttag/group/gsttag.mmp
gstreamer_core/tsrc/check/gst/gsttagsetter/group/gsttagsetter.mmp
gstreamer_core/tsrc/check/gst/gsttask/group/gsttask.mmp
gstreamer_core/tsrc/check/gst/gsturi/group/gsturi.mmp
gstreamer_core/tsrc/check/gst/gstutils/group/gstutils.mmp
gstreamer_core/tsrc/check/gst/gstvalue/group/gstvalue.mmp
gstreamer_core/tsrc/check/libs/adapter/group/adapter.mmp
gstreamer_core/tsrc/check/libs/basesrc/group/basesrc.mmp
gstreamer_core/tsrc/check/libs/collectpads/group/collectpads.mmp
gstreamer_core/tsrc/check/libs/controller/group/controller.mmp
gstreamer_core/tsrc/check/libs/gdp/group/gdp.mmp
gstreamer_core/tsrc/check/libs/gstnetclientclock/group/gstnetclientclock.mmp
gstreamer_core/tsrc/check/libs/gstnettimeprovider/group/gstnettimeprovider.mmp
gstreamer_core/tsrc/check/libs/libsabi/group/libsabi.mmp
gstreamer_core/tsrc/check/libs/typefindhelper/group/typefindhelper.mmp
gstreamer_core/tsrc/check/pipelines/cleanup/group/cleanup.mmp
gstreamer_core/tsrc/check/pipelines/core-simple-launch-lines/group/core-simple-launch-lines.mmp
gstreamer_core/tsrc/check/pipelines/parse-disabled/group/parse-disabled.mmp
gstreamer_core/tsrc/check/pipelines/parse-launch/group/parse-launch.mmp
gstreamer_core/tsrc/check/pipelines/stress/group/stress.mmp
gstreamer_core/tsrc/examples/adapter/group/testgstadapter.mmp
gstreamer_core/tsrc/examples/controller/group/testaudioexample.mmp
gstreamer_core/tsrc/examples/group/bld.inf
gstreamer_core/tsrc/examples/gstseek/group/bld.inf
gstreamer_core/tsrc/examples/gstseek/group/gstseek.mmp
gstreamer_core/tsrc/examples/gstseek/src/gstseek.c
gstreamer_core/tsrc/examples/helloworld/group/helloworld.mmp
gstreamer_core/tsrc/examples/launch/group/launch.mmp
gstreamer_core/tsrc/examples/launch/group/mp3launch.mmp
gstreamer_core/tsrc/examples/launch/src/launch.c
gstreamer_core/tsrc/examples/manual/bin/group/bin.mmp
gstreamer_core/tsrc/examples/manual/createelements/group/gstelementcreate.mmp
gstreamer_core/tsrc/examples/manual/elementfactory/group/elementfactory.mmp
gstreamer_core/tsrc/examples/manual/getelements/group/gstelementget.mmp
gstreamer_core/tsrc/examples/manual/init/group/init.mmp
gstreamer_core/tsrc/examples/manual/linkelements/group/gstelementgetlink.mmp
gstreamer_core/tsrc/examples/manual/makeelements/group/gstelementmake.mmp
gstreamer_core/tsrc/examples/manual/manual_decodebin/group/manual_decodebin.mmp
gstreamer_core/tsrc/examples/manual/manual_dynamic/group/manual_dynamic.mmp
gstreamer_core/tsrc/examples/manual/manual_ghostpad/group/manual_ghostpad.mmp
gstreamer_core/tsrc/examples/manual/manual_helloworld/group/manual_helloworld.mmp
gstreamer_core/tsrc/examples/manual/manual_playbin/group/manual_playbin.mmp
gstreamer_core/tsrc/examples/manual/manual_typefind/group/manual_typefind.mmp
gstreamer_core/tsrc/examples/manual/pad/group/pad.mmp
gstreamer_core/tsrc/examples/manual/query/group/query.mmp
gstreamer_core/tsrc/examples/metadata/group/metadata.mmp
gstreamer_core/tsrc/examples/queue/group/queue.mmp
gstreamer_core/tsrc/examples/typefind/group/typefind.mmp
gstreamer_core/tsrc/gstreamertestcases_suite3/conf/gstreamertestcases_suite3.cfg
gstreamer_test_apps/GLib-Liboil-Sisx/liboil.sisx
gstreamer_test_apps/GLib-Liboil-Sisx/openc_glib_sp.sisx
gstreamer_test_apps/QtGSTPlayer/QtGSTPlayer.pro
gstreamer_test_apps/QtGSTPlayer/folderview.cpp
gstreamer_test_apps/QtGSTPlayer/views.cpp
gstreamer_test_apps/gstplayer/group/gstplayer.mmp
gstreamer_test_apps/miscfiles/GStreamer_udeb_STUB_SIS.bat
gstreamer_test_apps/miscfiles/GStreamer_urel_STUB_SIS.bat
gstreamer_test_apps/miscfiles/copyplugins.bat
gstreamer_test_apps/miscfiles/createsis.bat
gstregistrygenerator/group/gstregistrygenerator.mmp
rom/gstreamer.iby
sis/gstreamer_framework.pkg
--- a/data/gst_dll_2001F41F.txt	Fri May 14 16:08:32 2010 +0300
+++ b/data/gst_dll_2001F41F.txt	Thu May 27 13:09:21 2010 +0300
@@ -39,3 +39,5 @@
 libgstmulaw.dll
 libgstalaw.dll
 libgstamrmux.dll
+libgstmpegaudioparse.dll
+libgstnokiaaacdec.dll
--- a/gst_plugins_base/group/bld.inf	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/bld.inf	Thu May 27 13:09:21 2010 +0300
@@ -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			/epoc32/include/platform/mw/gstreamer/gst/interfaces/colorbalance.h
+../gst-libs/gst/interfaces/colorbalancechannel.h		/epoc32/include/platform/mw/gstreamer/gst/interfaces/colorbalancechannel.h
+../gst-libs/gst/interfaces/mixer.h				/epoc32/include/platform/mw/gstreamer/gst/interfaces/mixer.h
+../gst-libs/gst/interfaces/mixeroptions.h			/epoc32/include/platform/mw/gstreamer/gst/interfaces/mixeroptions.h
+../gst-libs/gst/interfaces/mixertrack.h				/epoc32/include/platform/mw/gstreamer/gst/interfaces/mixertrack.h
+../gst-libs/gst/interfaces/navigation.h				/epoc32/include/platform/mw/gstreamer/gst/interfaces/navigation.h
+../gst-libs/gst/interfaces/propertyprobe.h			/epoc32/include/platform/mw/gstreamer/gst/interfaces/propertyprobe.h
+../gst-libs/gst/interfaces/tuner.h				/epoc32/include/platform/mw/gstreamer/gst/interfaces/tuner.h
+../gst-libs/gst/interfaces/tunernorm.h				/epoc32/include/platform/mw/gstreamer/gst/interfaces/tunernorm.h
+../gst-libs/gst/interfaces/tunerchannel.h			/epoc32/include/platform/mw/gstreamer/gst/interfaces/tunerchannel.h
+../gst-libs/gst/interfaces/xoverlay.h				/epoc32/include/platform/mw/gstreamer/gst/interfaces/xoverlay.h
+../gst-libs/gst/interfaces/interfaces-enumtypes.h		/epoc32/include/platform/mw/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					/epoc32/include/platform/mw/gstreamer/gst/audio/audio.h
+../gst-libs/gst/audio/gstaudioclock.h				/epoc32/include/platform/mw/gstreamer/gst/audio/gstaudioclock.h
+../gst-libs/gst/audio/gstaudiofilter.h				/epoc32/include/platform/mw/gstreamer/gst/audio/gstaudiofilter.h
+../gst-libs/gst/audio/gstaudiosink.h				/epoc32/include/platform/mw/gstreamer/gst/audio/gstaudiosink.h
+../gst-libs/gst/audio/gstaudiosrc.h				/epoc32/include/platform/mw/gstreamer/gst/audio/gstaudiosrc.h
+../gst-libs/gst/audio/gstbaseaudiosink.h			/epoc32/include/platform/mw/gstreamer/gst/audio/gstbaseaudiosink.h
+../gst-libs/gst/audio/gstbaseaudiosrc.h				/epoc32/include/platform/mw/gstreamer/gst/audio/gstbaseaudiosrc.h
+../gst-libs/gst/audio/gstringbuffer.h				/epoc32/include/platform/mw/gstreamer/gst/audio/gstringbuffer.h
+../gst-libs/gst/audio/mixerutils.h				/epoc32/include/platform/mw/gstreamer/gst/audio/mixerutils.h
+../gst-libs/gst/audio/multichannel.h				/epoc32/include/platform/mw/gstreamer/gst/audio/multichannel.h
+../gst-libs/gst/audio/audio-enumtypes.h			/epoc32/include/platform/mw/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					/epoc32/include/platform/mw/gstreamer/gst/cdda/base64.h
+../gst-libs/gst/cdda/gstcddabasesrc.h				/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/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					/epoc32/include/platform/mw/gstreamer/gst/riff/riff-ids.h
+../gst-libs/gst/riff/riff-media.h				/epoc32/include/platform/mw/gstreamer/gst/riff/riff-media.h
+../gst-libs/gst/riff/riff-read.h				/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/app/gstappbuffer.h
+../gst-libs/gst/app/gstappsink.h				/epoc32/include/platform/mw/gstreamer/gst/app/gstappsink.h
+../gst-libs/gst/app/gstappsrc.h					/epoc32/include/platform/mw/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			/epoc32/include/platform/mw/gstreamer/gst/rtp/gstbasertpdepayload.h
+../gst-libs/gst/rtp/gstbasertppayload.h				/epoc32/include/platform/mw/gstreamer/gst/rtp/gstbasertppayload.h
+../gst-libs/gst/rtp/gstrtpbuffer.h				/epoc32/include/platform/mw/gstreamer/gst/rtp/gstrtpbuffer.h
+../gst-libs/gst/rtp/gstbasertpaudiopayload.h			/epoc32/include/platform/mw/gstreamer/gst/rtp/gstbasertpaudiopayload.h
+../gst-libs/gst/rtp/gstrtcpbuffer.h				/epoc32/include/platform/mw/gstreamer/gst/rtp/gstrtcpbuffer.h
+../gst-libs/gst/rtp/gstrtppayloads.h				/epoc32/include/platform/mw/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			/epoc32/include/platform/mw/gstreamer/gst/tag/gsttageditingprivate.h
+../gst-libs/gst/tag/tag.h					/epoc32/include/platform/mw/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			/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/video/gstvideofilter.h
+../gst-libs/gst/video/gstvideosink.h				/epoc32/include/platform/mw/gstreamer/gst/video/gstvideosink.h
+../gst-libs/gst/video/video.h					/epoc32/include/platform/mw/gstreamer/gst/video/video.h
+../gst-libs/gst/video/video-enumtypes.h					/epoc32/include/platform/mw/gstreamer/gst/video/video-enumtypes.h
 
 // adder
-../gst/adder/gstadder.h						/sf/mw/gstreamer/include/gstreamer/gst/adder/gstadder.h
+//../gst/adder/gstadder.h						/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/audioconvert/audioconvert.h
+//../gst/audioconvert/gstaudioconvert.h				/epoc32/include/platform/mw/gstreamer/gst/audioconvert/gstaudioconvert.h
+//../gst/audioconvert/gstchannelmix.h				/epoc32/include/platform/mw/gstreamer/gst/audioconvert/gstchannelmix.h
+//../gst/audioconvert/plugin.h					/epoc32/include/platform/mw/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					/epoc32/include/platform/mw/gstreamer/gst/audioresample/buffer.h
+//../gst/audioresample/debug.h					/epoc32/include/platform/mw/gstreamer/gst/audioresample/debug.h
+//../gst/audioresample/functable.h				/epoc32/include/platform/mw/gstreamer/gst/audioresample/functable.h
+//../gst/audioresample/gstaudioresample.h				/epoc32/include/platform/mw/gstreamer/gst/audioresample/gstaudioresample.h
+//../gst/audioresample/resample.h					/epoc32/include/platform/mw/gstreamer/gst/audioresample/resample.h
 
 // audiotestsrc
-../gst/audiotestsrc/gstaudiotestsrc.h				/sf/mw/gstreamer/include/gstreamer/gst/audiotestsrc/gstaudiotestsrc.h
+//../gst/audiotestsrc/gstaudiotestsrc.h				/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/ffmpegcolorspace/avcodec.h
+//../gst/ffmpegcolorspace/dsputil.h				/epoc32/include/platform/mw/gstreamer/gst/ffmpegcolorspace/dsputil.h
+//../gst/ffmpegcolorspace/gstffmpegcodecmap.h			/epoc32/include/platform/mw/gstreamer/gst/ffmpegcolorspace/gstffmpegcodecmap.h
+//../gst/ffmpegcolorspace/gstffmpegcolorspace.h			/epoc32/include/platform/mw/gstreamer/gst/ffmpegcolorspace/gstffmpegcolorspace.h
+//../gst/ffmpegcolorspace/imgconvert_template.h			/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/playback/gstplay-marshal.h
+//../gst/playback/gstplaybasebin.h				/epoc32/include/platform/mw/gstreamer/gst/playback/gstplaybasebin.h
+//../gst/playback/gststreaminfo.h					/epoc32/include/platform/mw/gstreamer/gst/playback/gststreaminfo.h
+//../gst/playback/gststreamselector.h				/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/pbutils/pbutils.h
+../gst-libs/gst/pbutils/descriptions.h				/epoc32/include/platform/mw/gstreamer/gst/pbutils/descriptions.h
+../gst-libs/gst/pbutils/install-plugins.h			/epoc32/include/platform/mw/gstreamer/gst/pbutils/install-plugins.h
+../gst-libs/gst/pbutils/missing-plugins.h			/epoc32/include/platform/mw/gstreamer/gst/pbutils/missing-plugins.h
+../gst-libs/gst/pbutils/pbutils-enumtypes.h			/epoc32/include/platform/mw/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					/epoc32/include/platform/mw/gstreamer/gst/subparse/gstssaparse.h
+//../gst/subparse/gstsubparse.h					/epoc32/include/platform/mw/gstreamer/gst/subparse/gstsubparse.h
+//../gst/subparse/samiparse.h					/epoc32/include/platform/mw/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					/epoc32/include/platform/mw/gstreamer/gst/tcp/gstmultifdsink.h
+//../gst/tcp/gsttcp-enumtypes.h					/epoc32/include/platform/mw/gstreamer/gst/tcp/gsttcp-enumtypes.h
+//../gst/tcp/gsttcp-marshal.h					/epoc32/include/platform/mw/gstreamer/gst/tcp/gsttcp-marshal.h
+//../gst/tcp/gsttcp.h						/epoc32/include/platform/mw/gstreamer/gst/tcp/gsttcp.h
+//../gst/tcp/gsttcpclientsink.h					/epoc32/include/platform/mw/gstreamer/gst/tcp/gsttcpclientsink.h
+//../gst/tcp/gsttcpclientsrc.h					/epoc32/include/platform/mw/gstreamer/gst/tcp/gsttcpclientsrc.h
+//../gst/tcp/gsttcpplugin.h					/epoc32/include/platform/mw/gstreamer/gst/tcp/gsttcpplugin.h
+//../gst/tcp/gsttcpserversink.h					/epoc32/include/platform/mw/gstreamer/gst/tcp/gsttcpserversink.h
+//../gst/tcp/gsttcpserversrc.h					/epoc32/include/platform/mw/gstreamer/gst/tcp/gsttcpserversrc.h
 
 // videorate
-../gst/videorate/gstvideorate.h					/sf/mw/gstreamer/include/gstreamer/gst/videorate/gstvideorate.h
+//../gst/videorate/gstvideorate.h					/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/videoscale/gstvideoscale.h
+//../gst/videoscale/vs_image.h					/epoc32/include/platform/mw/gstreamer/gst/videoscale/vs_image.h
+//../gst/videoscale/vs_scanline.h					/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/videotestsrc/gstvideotestsrc.h
+//../gst/videotestsrc/videotestsrc.h				/epoc32/include/platform/mw/gstreamer/gst/videotestsrc/videotestsrc.h
 
 // volume
-../gst/volume/gstvolume.h					/sf/mw/gstreamer/include/gstreamer/gst/volume/gstvolume.h
+//../gst/volume/gstvolume.h					/epoc32/include/platform/mw/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       															/epoc32/include/platform/mw/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			/epoc32/include/platform/mw/gstreamer/gst/fft/_kiss_fft_guts_f32.h
+//../gst-libs/gst/fft/_kiss_fft_guts_f64.h			/epoc32/include/platform/mw/gstreamer/gst/fft/_kiss_fft_guts_f64.h
+//../gst-libs/gst/fft/_kiss_fft_guts_s16.h			/epoc32/include/platform/mw/gstreamer/gst/fft/_kiss_fft_guts_s16.h
+//../gst-libs/gst/fft/_kiss_fft_guts_s32.h			/epoc32/include/platform/mw/gstreamer/gst/fft/_kiss_fft_guts_s32.h
+../gst-libs/gst/fft/gstfft.h					/epoc32/include/platform/mw/gstreamer/gst/fft/gstfft.h
+../gst-libs/gst/fft/gstfftf32.h					/epoc32/include/platform/mw/gstreamer/gst/fft/gstfftf32.h
+../gst-libs/gst/fft/gstfftf64.h					/epoc32/include/platform/mw/gstreamer/gst/fft/gstfftf64.h
+../gst-libs/gst/fft/gstffts16.h					/epoc32/include/platform/mw/gstreamer/gst/fft/gstffts16.h
+../gst-libs/gst/fft/gstffts32.h					/epoc32/include/platform/mw/gstreamer/gst/fft/gstffts32.h
+//../gst-libs/gst/fft/kiss_fft_f32.h				/epoc32/include/platform/mw/gstreamer/gst/fft/kiss_fft_f32.h
+//../gst-libs/gst/fft/kiss_fft_f64.h				/epoc32/include/platform/mw/gstreamer/gst/fft/kiss_fft_f64.h
+//../gst-libs/gst/fft/kiss_fft_s16.h				/epoc32/include/platform/mw/gstreamer/gst/fft/kiss_fft_s16.h
+//../gst-libs/gst/fft/kiss_fft_s32.h				/epoc32/include/platform/mw/gstreamer/gst/fft/kiss_fft_s32.h
+//../gst-libs/gst/fft/kiss_fftr_f32.h				/epoc32/include/platform/mw/gstreamer/gst/fft/kiss_fftr_f32.h
+//../gst-libs/gst/fft/kiss_fftr_f64.h				/epoc32/include/platform/mw/gstreamer/gst/fft/kiss_fftr_f64.h
+//../gst-libs/gst/fft/kiss_fftr_s16.h													/epoc32/include/platform/mw/gstreamer/gst/fft/kiss_fftr_s16.h
+//../gst-libs/gst/fft/kiss_fftr_s32.h				/epoc32/include/platform/mw/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  				/epoc32/include/platform/mw/gstreamer/gst/gst-i18n-plugin.h
 
 //avcodec
-../gst/ffmpegcolorspace/avcodec.h  				/sf/mw/gstreamer/include/gstreamer/gst/avcodec.h
+//../gst/ffmpegcolorspace/avcodec.h  				/epoc32/include/platform/mw/gstreamer/gst/avcodec.h
 
 
 PRJ_MMPFILES
--- a/gst_plugins_base/group/ffmpegcolorspace.mmp	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/ffmpegcolorspace.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstadder.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstapp.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstaudio.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstaudioconvert.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstaudiorate.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstaudioresample.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstaudiotestsrc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstcdda.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstdecodebin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstdecodebin2.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstfft.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstgdp.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstinterfaces.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstnetbuffer.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstpbutils.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstplayback.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstplaybin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstqueue2.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstriff.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstrtp.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstsubparse.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gsttag.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gsttcp.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gsttypefind.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstvideo.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstvideorate.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstvideoscale.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstvideotestsrc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/group/gstvolume.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/gst-libs/gst/pbutils/install-plugins.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/gst-libs/gst/riff/riff-media.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/gst-libs/gst/riff/riff-read.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/adder/group/adder.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/audioconvert/group/audioconvert.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/audiorate/group/audiorate.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/audioresample/group/audioresample.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/audiotestsrc/group/audiotestsrc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/createelementbase/group/createelementbase.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/createelementbasevideo/group/createelementbasevideo.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/decodebin/ffmpegcolorspace/group/ffmpegcolorspace.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/decodebin/group/decodebin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/ffmpegcolorspace/group/ffmpegcolorspace.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/gdpdepay/group/gdpdepay.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/multifdsink/group/multifdsink.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/playbin/group/playbin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/playbin/src/playbin.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/subparse/group/subparse.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/videorate/group/videorate.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/volume/group/volume.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/generic/clock-selection/group/clock-selection.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/generic/states/group/states.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/gst/typefindfunctions/group/typefindfunctions.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/fft/group/fft.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/netbuffer/group/netbuffer.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/pbutils/group/pbutils.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/rtp/group/rtp.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/tag/group/tag.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/taudio/group/taudio.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/video/group/video.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/pipelines/simple-launch-lines/group/simple-launch-lines.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/check/pipelines/streamheader/group/streamheader.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/examples/dynamic/addstream/group/addstream.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_base/tsrc/icles/stress_playbin/group/stress_playbin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/bwins/libgstmpegaudioparseu.def	Thu May 27 13:09:21 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+	_GST_PLUGIN_DESC @ 1 NONAME
+	gst_mp3parse_get_type @ 2 NONAME
+	gst_xing_mux_get_type @ 3 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/eabi/libgstmpegaudioparseu.def	Thu May 27 13:09:21 2010 +0300
@@ -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/group/bld.inf	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/bld.inf	Thu May 27 13:09:21 2010 +0300
@@ -2,8 +2,8 @@
 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
+../gst-libs/gst/interfaces/photography.h  /epoc32/include/platform/mw/gstreamer/gst/interfaces/photography.h
+../gst-libs/gst/interfaces/photography-enumtypes.h  /epoc32/include/platform/mw/gstreamer/gst/interfaces/photography-enumtypes.h
 
 PRJ_MMPFILES
 gstwavparse.mmp
@@ -13,4 +13,5 @@
 gstqtmux.mmp
 gstphotography.mmp
 gstcamerabin.mmp
-
+gstqtdemux.mmp
+gstmpegaudioparse.mmp
--- a/gst_plugins_good/group/gstalaw.mmp	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstalaw.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstalpha.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstalphacolor.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstaudiofx.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstauparse.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstautodetect.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstavi.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstcamerabin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -47,24 +47,9 @@
 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
 
 SYSTEMINCLUDE     ..
-SYSTEMINCLUDE   /sf/mw/gstreamer/include/gstreamer
 
 
 SOURCEPATH      ../gst/camerabin
--- a/gst_plugins_good/group/gstjpeg.mmp	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstjpeg.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstmulaw.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstphotography.mmp	Thu May 27 13:09:21 2010 +0300
@@ -45,11 +45,7 @@
 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
+MW_LAYER_GSTREAMER_SYSTEMINCLUDE
 
 SOURCEPATH      ../gst-libs/gst/interfaces
 SOURCE          photography.c
--- a/gst_plugins_good/group/gstpng.mmp	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstpng.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstqtdemux.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstqtmux.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstwavenc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/group/gstwavparse.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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.h	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/gst-libs/gst/interfaces/photography.h	Thu May 27 13:09:21 2010 +0300
@@ -25,7 +25,7 @@
 #define __GST_PHOTOGRAPHY_H__
 
 #include <gst/gst.h>
-#include "photography-enumtypes.h"
+#include <gst/interfaces/photography-enumtypes.h>
 
 G_BEGIN_DECLS
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_good/gst/mpegaudioparse/gstmpegaudioparse.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/gst/qtdemux/gstrtpxqtdepay.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/gst/qtdemux/qtdemux.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_good/gst/qtdemux/qtdemux.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/group/gstamrmux.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/group/gstdevsoundext.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/group/gstdevsoundsink.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/group/gstdevsoundsrc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/AudioRecordBin/group/GstAudioRecordBin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/AudioRecordBin/src/GstAudioRecordBin.cpp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/amrmux/gstamrmux.c	Thu May 27 13:09:21 2010 +0300
@@ -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/devsoundsrcwrapper.cpp	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/devsoundsrcwrapper.cpp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstdevsoundsink.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstdevsoundsrc.c	Thu May 27 13:09:21 2010 +0300
@@ -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->firstimecreatecalled = 0;
+//    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);
     }
 
@@ -495,6 +500,7 @@
                 pthread_mutex_unlock(&(create_mutex1));
                 // TODO obtain mutex here
                 consumer_thread_state = CONSUMER_THREAD_UNINITIALIZED;
+                devsoundsrc->firstimecreatecalled = 0;
                 pthread_exit(NULL);
                 }
                 break;
@@ -684,7 +690,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 +771,7 @@
     pthread_cond_destroy(&(create_condition1));
 
     g_free(src->device);
+    src->device = NULL;
     //gst_debug_log(devsound_debug, GST_LEVEL_LOG, "", "", 0, (GObject *) src, "gst_devsound_src_stop EXIT ");
     return TRUE;
     }
@@ -905,6 +914,11 @@
                 popBuffer = NULL;
                 }
             }
+            if( dsrc->firstimecreatecalled < 2 )
+            {/// nitin changes
+                ++dsrc->firstimecreatecalled;
+                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;
--- a/gst_plugins_symbian/gst/devsound/gstdevsoundsrc.h	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstdevsoundsrc.h	Thu May 27 13:09:21 2010 +0300
@@ -86,6 +86,7 @@
   gboolean g729vadmode;
   gint ilbcencodemode;
   gboolean ilbcvadmode;
+  gint firstimecreatecalled; 
 
   
 };
--- a/gst_plugins_symbian/gst/devsound/gsterrorconcealment.c	Fri May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gsterrorconcealment.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstg711decoderinterface.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstg711encoderinterface.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstg729decoderinterface.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstg729encoderinterface.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstilbcdecoderinterface.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstilbcencoderinterface.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/gstspeechencoderconfig.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/tsrc/gstreamertestmodule/group/GStreamerTestClass.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/tsrc/gstreamertestmodule/inc/GStreamerTestClass.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gst_plugins_symbian/tsrc/gstreamertestmodule/src/GStreamerTestClassBlocks.cpp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/group/bld.inf	Thu May 27 13:09:21 2010 +0300
@@ -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					/epoc32/include/platform/mw/gstreamer/gst/glib-compat.h
+../gst/gstbin.h						/epoc32/include/platform/mw/gstreamer/gst/gstbin.h
+../gst/gstbuffer.h					/epoc32/include/platform/mw/gstreamer/gst/gstbuffer.h
+../gst/gstbus.h						/epoc32/include/platform/mw/gstreamer/gst/gstbus.h
+../gst/gstcaps.h					/epoc32/include/platform/mw/gstreamer/gst/gstcaps.h
+../gst/gstchildproxy.h					/epoc32/include/platform/mw/gstreamer/gst/gstchildproxy.h
+../gst/gstclock.h					/epoc32/include/platform/mw/gstreamer/gst/gstclock.h
+../gst/gstcompat.h					/epoc32/include/platform/mw/gstreamer/gst/gstcompat.h
+../gst/gstconfig.h					/epoc32/include/platform/mw/gstreamer/gst/gstconfig.h
+../gst/gstelementfactory.h 				/epoc32/include/platform/mw/gstreamer/gst/gstelementfactory.h
+../gst/gstelement.h					/epoc32/include/platform/mw/gstreamer/gst/gstelement.h
+../gst/gstenumtypes.h					/epoc32/include/platform/mw/gstreamer/gst/gstenumtypes.h
+../gst/gsterror.h					/epoc32/include/platform/mw/gstreamer/gst/gsterror.h
+../gst/gstevent.h					/epoc32/include/platform/mw/gstreamer/gst/gstevent.h
+../gst/gstfilter.h					/epoc32/include/platform/mw/gstreamer/gst/gstfilter.h
+../gst/gstformat.h					/epoc32/include/platform/mw/gstreamer/gst/gstformat.h
+../gst/gstghostpad.h					/epoc32/include/platform/mw/gstreamer/gst/gstghostpad.h
+../gst/gst.h						/epoc32/include/platform/mw/gstreamer/gst/gst.h
+../gst/gstindexfactory.h   				/epoc32/include/platform/mw/gstreamer/gst/gstindexfactory.h
+../gst/gstindex.h					/epoc32/include/platform/mw/gstreamer/gst/gstindex.h
+//../gst/gst_private.h					/epoc32/include/platform/mw/gstreamer/gst/gst_private.h
+//../gst/gst-i18n-lib.h					/epoc32/include/platform/mw/gstreamer/gst/gst-i18n-lib.h
+../gst/gstinfo.h					/epoc32/include/platform/mw/gstreamer/gst/gstinfo.h
+../gst/gstinterface.h					/epoc32/include/platform/mw/gstreamer/gst/gstinterface.h
+../gst/gstiterator.h					/epoc32/include/platform/mw/gstreamer/gst/gstiterator.h
+../gst/gstmacros.h					/epoc32/include/platform/mw/gstreamer/gst/gstmacros.h
+../gst/gstmarshal.h					/epoc32/include/platform/mw/gstreamer/gst/gstmarshal.h
+../gst/gstmessage.h					/epoc32/include/platform/mw/gstreamer/gst/gstmessage.h
+../gst/gstminiobject.h					/epoc32/include/platform/mw/gstreamer/gst/gstminiobject.h
+../gst/gstobject.h					/epoc32/include/platform/mw/gstreamer/gst/gstobject.h
+../gst/gstpad.h						/epoc32/include/platform/mw/gstreamer/gst/gstpad.h
+../gst/gstpadtemplate.h					/epoc32/include/platform/mw/gstreamer/gst/gstpadtemplate.h
+../gst/gstparse.h					/epoc32/include/platform/mw/gstreamer/gst/gstparse.h
+../gst/gstpipeline.h					/epoc32/include/platform/mw/gstreamer/gst/gstpipeline.h
+../gst/gstpluginfeature.h  				/epoc32/include/platform/mw/gstreamer/gst/gstpluginfeature.h
+../gst/gstplugin.h					/epoc32/include/platform/mw/gstreamer/gst/gstplugin.h
+../gst/gstquery.h					/epoc32/include/platform/mw/gstreamer/gst/gstquery.h
+../gst/gstregistry.h					/epoc32/include/platform/mw/gstreamer/gst/gstregistry.h
+../gst/gstsegment.h					/epoc32/include/platform/mw/gstreamer/gst/gstsegment.h
+../gst/gststructure.h					/epoc32/include/platform/mw/gstreamer/gst/gststructure.h
+../gst/gstsystemclock.h					/epoc32/include/platform/mw/gstreamer/gst/gstsystemclock.h
+../gst/gsttaglist.h					/epoc32/include/platform/mw/gstreamer/gst/gsttaglist.h
+../gst/gsttagsetter.h					/epoc32/include/platform/mw/gstreamer/gst/gsttagsetter.h
+../gst/gsttask.h					/epoc32/include/platform/mw/gstreamer/gst/gsttask.h
+../gst/gsttrace.h					/epoc32/include/platform/mw/gstreamer/gst/gsttrace.h
+../gst/gsttypefindfactory.h 				/epoc32/include/platform/mw/gstreamer/gst/gsttypefindfactory.h
+../gst/gsttypefind.h					/epoc32/include/platform/mw/gstreamer/gst/gsttypefind.h
+../gst/gsturi.h						/epoc32/include/platform/mw/gstreamer/gst/gsturi.h
+../gst/gstutils.h					/epoc32/include/platform/mw/gstreamer/gst/gstutils.h
+../gst/gstvalue.h					/epoc32/include/platform/mw/gstreamer/gst/gstvalue.h
+../gst/gstversion.h					/epoc32/include/platform/mw/gstreamer/gst/gstversion.h
+../gst/gstxml.h						/epoc32/include/platform/mw/gstreamer/gst/gstxml.h
+../gst/gst_global.h					/epoc32/include/platform/mw/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 					/epoc32/include/platform/mw/gstreamer/gst/gstdebugutils.h
+../gst/gstparamspecs.h 					/epoc32/include/platform/mw/gstreamer/gst/gstparamspecs.h
+../gst/gstpoll.h 					/epoc32/include/platform/mw/gstreamer/gst/gstpoll.h
+../gst/gstregistrybinary.h 				/epoc32/include/platform/mw/gstreamer/gst/gstregistrybinary.h
+../gst/gstpreset.h 				/epoc32/include/platform/mw/gstreamer/gst/gstpreset.h
+../gst/gstbufferlist.h 				/epoc32/include/platform/mw/gstreamer/gst/gstbufferlist.h
+../gst/gsttaskpool.h 				/epoc32/include/platform/mw/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				/epoc32/include/platform/mw/gstreamer/gst/base/gstadapter.h					
+../libs/gst/base/gstbasesink.h				/epoc32/include/platform/mw/gstreamer/gst/base/gstbasesink.h
+../libs/gst/base/gstbasesrc.h				/epoc32/include/platform/mw/gstreamer/gst/base/gstbasesrc.h
+../libs/gst/base/gstbasetransform.h			/epoc32/include/platform/mw/gstreamer/gst/base/gstbasetransform.h
+../libs/gst/base/gstcollectpads.h			/epoc32/include/platform/mw/gstreamer/gst/base/gstcollectpads.h
+../libs/gst/base/gstpushsrc.h				/epoc32/include/platform/mw/gstreamer/gst/base/gstpushsrc.h
+../libs/gst/base/gsttypefindhelper.h  			/epoc32/include/platform/mw/gstreamer/gst/base/gsttypefindhelper.h
+../libs/gst/base/gstdataqueue.h       			/epoc32/include/platform/mw/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			/epoc32/include/platform/mw/gstreamer/gst/controller/gstcontroller.h
+../libs/gst/controller/gstcontrolsource.h		/epoc32/include/platform/mw/gstreamer/gst/controller/gstcontrolsource.h
+../libs/gst/controller/gstinterpolationcontrolsource.h	/epoc32/include/platform/mw/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	 		/epoc32/include/platform/mw/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			/epoc32/include/platform/mw/gstreamer/gst/net/gstnetclientclock.h
+../libs/gst/net/gstnet.h				/epoc32/include/platform/mw/gstreamer/gst/net/gstnet.h
+../libs/gst/net/gstnettimepacket.h  			/epoc32/include/platform/mw/gstreamer/gst/net/gstnettimepacket.h
+../libs/gst/net/gstnettimeprovider.h			/epoc32/include/platform/mw/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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/group/gstbase.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/group/gstcontroller.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/group/gstdataprotocol.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/group/gstelements.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/group/gstindexers.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/group/gstnet.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/group/gstreamer.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/gst/gstregistry.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/gst/gstutils.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/gst/parse/lex._gst_parse_yy.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/libs/gst/check/gstcheck.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/libs/gst/controller/gstcontroller.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/libs/gst/controller/gstcontrolsource.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/libs/gst/controller/gstinterpolationcontrolsource.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/libs/gst/controller/gstlfocontrolsource.h	Thu May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/createelementcore/group/createelementcore.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/fakesink/group/fakesink.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/fakesink/src/fakesink.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/fakesrc/group/fakesrc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/fdsrc/group/fdsrc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/filesink/group/filesink.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/filesrc/group/filesrc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/gstqueue/group/gstqueue.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/identity/group/identity.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/multiqueue/group/multiqueue.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/tee/group/tee.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/generic/gststates/group/gststates.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/generic/sinks/group/sinks.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gst/group/gst.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstbin/group/gstbin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstbuffer/group/gstbuffer.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstbus/group/gstbus.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstcaps/group/gstcaps.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstelement/group/gstelement.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstevent/group/gstevent.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstghostpad/group/gstghostpad.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstindex/group/gstindex.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstinterface/group/gstinterface.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstiterator/group/gstiterator.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstmessage/group/gstmessage.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstminiobject/group/gstminiobject.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstobject/group/gstobject.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstpad/group/gstpad.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstparamspecs/group/gstparamspecs.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstpipeline/group/gstpipeline.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstplugin/group/gstplugin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstpoll/group/gstpoll.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstquery/group/gstquery.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstregistry/group/gstregistry.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstsegment/group/gstsegment.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gststructure/group/gststructure.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gststructure/src/gststructure.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstsystemclock/group/gstsystemclock.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gsttag/group/gsttag.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gsttagsetter/group/gsttagsetter.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gsttask/group/gsttask.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gsturi/group/gsturi.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstutils/group/gstutils.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstvalue/group/gstvalue.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/adapter/group/adapter.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/basesrc/group/basesrc.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/collectpads/group/collectpads.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/controller/group/controller.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gdp/group/gdp.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gstnetclientclock/group/gstnetclientclock.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gstnettimeprovider/group/gstnettimeprovider.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/libsabi/group/libsabi.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/typefindhelper/group/typefindhelper.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/pipelines/cleanup/group/cleanup.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/pipelines/core-simple-launch-lines/group/core-simple-launch-lines.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/pipelines/parse-disabled/group/parse-disabled.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/pipelines/parse-launch/group/parse-launch.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/check/pipelines/stress/group/stress.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/adapter/group/testgstadapter.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/controller/group/testaudioexample.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/group/bld.inf	Thu May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/helloworld/group/helloworld.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/launch/group/launch.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/launch/group/mp3launch.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/launch/src/launch.c	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/bin/group/bin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/createelements/group/gstelementcreate.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/elementfactory/group/elementfactory.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/getelements/group/gstelementget.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/init/group/init.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/linkelements/group/gstelementgetlink.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/makeelements/group/gstelementmake.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_decodebin/group/manual_decodebin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_dynamic/group/manual_dynamic.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_ghostpad/group/manual_ghostpad.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_helloworld/group/manual_helloworld.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_playbin/group/manual_playbin.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_typefind/group/manual_typefind.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/pad/group/pad.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/query/group/query.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/metadata/group/metadata.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/queue/group/queue.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/examples/typefind/group/typefind.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite3/conf/gstreamertestcases_suite3.cfg	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_test_apps/QtGSTPlayer/QtGSTPlayer.pro	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_test_apps/QtGSTPlayer/folderview.cpp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_test_apps/QtGSTPlayer/views.cpp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_test_apps/gstplayer/group/gstplayer.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_test_apps/miscfiles/GStreamer_udeb_STUB_SIS.bat	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_test_apps/miscfiles/GStreamer_urel_STUB_SIS.bat	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_test_apps/miscfiles/copyplugins.bat	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstreamer_test_apps/miscfiles/createsis.bat	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/gstregistrygenerator/group/gstregistrygenerator.mmp	Thu May 27 13:09:21 2010 +0300
@@ -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 May 14 16:08:32 2010 +0300
+++ b/rom/gstreamer.iby	Thu May 27 13:09:21 2010 +0300
@@ -29,6 +29,7 @@
 #define GSTREAMER_IBY
 
 #include <bldvariant.hrh>
+#include <liboil.iby>
 
 #ifdef FF_GSTREAMER
 
@@ -77,11 +78,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