diff --git a/configure.ac b/configure.ac
index 5efaedf..cc6cde2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,8 +52,8 @@ AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 
 dnl *** required versions of GStreamer stuff ***
-GST_REQ=0.10.32.1
-GSTPB_REQ=0.10.32.1
+GST_REQ=0.10.32
+GSTPB_REQ=0.10.32
 
 dnl *** autotools stuff ****
 
@@ -108,6 +108,9 @@ AC_PROG_CC_STDC
 
 dnl determine c++ compiler
 AC_PROG_CXX
+AC_LANG_CPLUSPLUS
+OLD_CPPFLAGS=$CPPFLAGS
+CPPFLAGS=$OPENCV_CFLAGS
 dnl determine if c++ is available on this system
 AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
 
diff --git a/docs/plugins/gst-plugins-bad-plugins.args b/docs/plugins/gst-plugins-bad-plugins.args
index a446e82..f4b62ea 100644
--- a/docs/plugins/gst-plugins-bad-plugins.args
+++ b/docs/plugins/gst-plugins-bad-plugins.args
@@ -41,7 +41,7 @@
 <ARG>
 <NAME>GstXvidEnc::averaging-period</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,100]</RANGE>
+<RANGE>[-1,100]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Averaging Period</NICK>
 <BLURB>[CBR] Number of frames for which XviD averages bitrate.</BLURB>
@@ -91,7 +91,7 @@
 <ARG>
 <NAME>GstXvidEnc::buffer</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Buffer Size</NICK>
 <BLURB>[CBR] Size of the video buffers.</BLURB>
@@ -121,7 +121,7 @@
 <ARG>
 <NAME>GstXvidEnc::container-frame-overhead</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,100]</RANGE>
+<RANGE>[-1,100]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Container Frame Overhead</NICK>
 <BLURB>[PASS2] Average container overhead per frame.</BLURB>
@@ -151,7 +151,7 @@
 <ARG>
 <NAME>GstXvidEnc::flow-control-strength</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,100]</RANGE>
+<RANGE>[-1,100]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Flow Control Strength</NICK>
 <BLURB>[PASS2] Overflow control strength per frame.</BLURB>
@@ -211,7 +211,7 @@
 <ARG>
 <NAME>GstXvidEnc::keyframe-reduction</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,100]</RANGE>
+<RANGE>[-1,100]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Keyframe Reduction</NICK>
 <BLURB>[PASS2] Keyframe size reduction in % of those within threshold.</BLURB>
@@ -221,7 +221,7 @@
 <ARG>
 <NAME>GstXvidEnc::keyframe-threshold</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,100]</RANGE>
+<RANGE>[-1,100]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Keyframe Threshold</NICK>
 <BLURB>[PASS2] Distance between keyframes not to be subject to reduction.</BLURB>
@@ -281,7 +281,7 @@
 <ARG>
 <NAME>GstXvidEnc::max-overflow-degradation</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,100]</RANGE>
+<RANGE>[-1,100]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Max Overflow Degradation</NICK>
 <BLURB>[PASS2] Amount in % that flow control can decrease frame size compared to ideal curve.</BLURB>
@@ -291,7 +291,7 @@
 <ARG>
 <NAME>GstXvidEnc::max-overflow-improvement</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,100]</RANGE>
+<RANGE>[-1,100]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Max Overflow Improvement</NICK>
 <BLURB>[PASS2] Amount in % that flow control can increase frame size compared to ideal curve.</BLURB>
@@ -421,7 +421,7 @@
 <ARG>
 <NAME>GstXvidEnc::reaction-delay-factor</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,100]</RANGE>
+<RANGE>[-1,100]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Reaction Delay Factor</NICK>
 <BLURB>[CBR] Reaction delay factor.</BLURB>
@@ -1701,7 +1701,7 @@
 <ARG>
 <NAME>GstDvbSrc::diseqc-source</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,7]</RANGE>
+<RANGE>[-1,7]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>diseqc source</NICK>
 <BLURB>DISEqC selected source (-1 disabled) (DVB-S).</BLURB>
@@ -17145,7 +17145,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Path where to search for RealPlayer codecs</NICK>
 <BLURB>Path where to search for RealPlayer codecs.</BLURB>
-<DEFAULT>"/usr/lib64/win32:/usr/lib64/codecs:/usr/local/lib64/win32:/usr/local/lib64/codecs"</DEFAULT>
+<DEFAULT>"/usr/lib/win32:/usr/lib/codecs:/usr/local/RealPlayer/codecs:/usr/local/lib/win32:/usr/local/lib/codecs"</DEFAULT>
 </ARG>
 
 <ARG>
@@ -17185,7 +17185,7 @@
 <FLAGS>rw</FLAGS>
 <NICK>Path where to search for RealPlayer codecs</NICK>
 <BLURB>Path where to search for RealPlayer codecs.</BLURB>
-<DEFAULT>"/usr/lib64/win32:/usr/lib64/codecs:/usr/local/lib64/win32:/usr/local/lib64/codecs"</DEFAULT>
+<DEFAULT>"/usr/lib/win32:/usr/lib/codecs:/usr/local/RealPlayer/codecs:/usr/local/lib/win32:/usr/local/lib/codecs"</DEFAULT>
 </ARG>
 
 <ARG>
@@ -17841,7 +17841,7 @@
 <ARG>
 <NAME>DvbBaseBin::diseqc-source</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,7]</RANGE>
+<RANGE>[-1,7]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>diseqc source</NICK>
 <BLURB>DISEqC selected source (-1 disabled) (DVB-S).</BLURB>
@@ -21976,7 +21976,7 @@
 <ARG>
 <NAME>GstDCCPClientSrc::sockfd</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Socket fd</NICK>
 <BLURB>The socket file descriptor.</BLURB>
@@ -22016,7 +22016,7 @@
 <ARG>
 <NAME>GstDCCPServerSink::sockfd</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Socket fd</NICK>
 <BLURB>The client socket file descriptor.</BLURB>
@@ -22076,7 +22076,7 @@
 <ARG>
 <NAME>GstDCCPClientSink::sockfd</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Socket fd</NICK>
 <BLURB>The socket file descriptor.</BLURB>
@@ -22136,7 +22136,7 @@
 <ARG>
 <NAME>GstDCCPServerSrc::sockfd</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Socket fd</NICK>
 <BLURB>The client socket file descriptor.</BLURB>
@@ -22196,7 +22196,7 @@
 <ARG>
 <NAME>GstMpegTSDemux::program-number</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Program Number</NICK>
 <BLURB>Program number to demux for (-1 to ignore).</BLURB>
@@ -22256,7 +22256,7 @@
 <ARG>
 <NAME>GstPcapParse::dst-port</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,65535]</RANGE>
+<RANGE>[-1,65535]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Destination port</NICK>
 <BLURB>Destination port to restrict to.</BLURB>
@@ -22276,7 +22276,7 @@
 <ARG>
 <NAME>GstPcapParse::src-port</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,65535]</RANGE>
+<RANGE>[-1,65535]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Source port</NICK>
 <BLURB>Source port to restrict to.</BLURB>
@@ -23276,7 +23276,7 @@
 <ARG>
 <NAME>GstRTPDTMFSrc::seqnum-offset</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Sequence number Offset</NICK>
 <BLURB>Offset to add to all outgoing seqnum (-1 = random).</BLURB>
@@ -23306,7 +23306,7 @@
 <ARG>
 <NAME>GstRTPDTMFSrc::timestamp-offset</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Timestamp Offset</NICK>
 <BLURB>Offset to add to all outgoing timestamps (-1 = random).</BLURB>
@@ -23356,7 +23356,7 @@
 <ARG>
 <NAME>GstRTPMux::seqnum-offset</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Sequence number Offset</NICK>
 <BLURB>Offset to add to all outgoing seqnum (-1 = random).</BLURB>
@@ -23376,7 +23376,7 @@
 <ARG>
 <NAME>GstRTPMux::timestamp-offset</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Timestamp Offset</NICK>
 <BLURB>Offset to add to all outgoing timestamps (-1 = random).</BLURB>
@@ -45946,7 +45946,7 @@
 <ARG>
 <NAME>GstVideoMaxRate::average-period</NAME>
 <TYPE>guint64</TYPE>
-<RANGE>[1,G_MAXLONG]</RANGE>
+<RANGE>[1,G_MAXINT64]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Period over which to average</NICK>
 <BLURB>Period over which to average the framerate (in ns).</BLURB>
@@ -46706,7 +46706,7 @@
 <ARG>
 <NAME>GstCvSobel::x-order</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>x order</NICK>
 <BLURB>Order of the derivative x.</BLURB>
@@ -46716,7 +46716,7 @@
 <ARG>
 <NAME>GstCvSobel::y-order</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>y order</NICK>
 <BLURB>Order of the derivative y.</BLURB>
@@ -46796,7 +46796,7 @@
 <ARG>
 <NAME>GstJP2kDecimator::max-decomposition-levels</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[G_MAXULONG,32]</RANGE>
+<RANGE>[-1,32]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Maximum Number of Decomposition Levels</NICK>
 <BLURB>Maximum number of decomposition levels to keep (-1 == all).</BLURB>
@@ -47186,7 +47186,7 @@
 <ARG>
 <NAME>GstTSDemux::program-number</NAME>
 <TYPE>gint</TYPE>
-<RANGE>>= G_MAXULONG</RANGE>
+<RANGE>>= -1</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Program number</NICK>
 <BLURB>Program Number to demux for (-1 to ignore).</BLURB>
@@ -47323,3 +47323,283 @@
 <DEFAULT>NULL</DEFAULT>
 </ARG>
 
+<ARG>
+<NAME>GstFieldAnalysis::block-height</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Block height</NICK>
+<BLURB>Block height for windowed comb detection.</BLURB>
+<DEFAULT>16</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::block-threshold</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Block threshold</NICK>
+<BLURB>Block threshold for windowed comb detection.</BLURB>
+<DEFAULT>80</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::block-width</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Block width</NICK>
+<BLURB>Block width for windowed comb detection.</BLURB>
+<DEFAULT>16</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::comb-method</NAME>
+<TYPE>FieldAnalysisCombMethod</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Comb-detection Method</NICK>
+<BLURB>Metric to be used for identifying comb artifacts if using windowed comb detection.</BLURB>
+<DEFAULT>5-tap [1,-3,4,-3,1] vertical filter result is larger than spatial threshold*6</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::field-metric</NAME>
+<TYPE>GstFieldAnalysisFieldMetric</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Field Metric</NICK>
+<BLURB>Metric to be used for comparing same parity fields to decide if they are a repeated field for telecine.</BLURB>
+<DEFAULT>Sum of Squared Differences</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::field-threshold</NAME>
+<TYPE>gfloat</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Field Threshold</NICK>
+<BLURB>Threshold for field metric decisions.</BLURB>
+<DEFAULT>0.08</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::frame-metric</NAME>
+<TYPE>GstFieldAnalysisFrameMetric</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Frame Metric</NICK>
+<BLURB>Metric to be used for comparing opposite parity fields to decide if they are a progressive frame.</BLURB>
+<DEFAULT>5-tap [1,-3,4,-3,1] Vertical Filter</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::frame-threshold</NAME>
+<TYPE>gfloat</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Frame Threshold</NICK>
+<BLURB>Threshold for frame metric decisions.</BLURB>
+<DEFAULT>0.002</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::ignored-lines</NAME>
+<TYPE>guint64</TYPE>
+<RANGE>>= 2</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Ignored lines</NICK>
+<BLURB>Ignore this many lines from the top and bottom for windowed comb detection.</BLURB>
+<DEFAULT>2</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::noise-floor</NAME>
+<TYPE>guint</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Noise Floor</NICK>
+<BLURB>Noise floor for appropriate metrics (per-pixel metric values with a score less than this will be ignored).</BLURB>
+<DEFAULT>16</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstFieldAnalysis::spatial-threshold</NAME>
+<TYPE>gint64</TYPE>
+<RANGE>>= 0</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Spatial Combing Threshold</NICK>
+<BLURB>Threshold for combing metric decisions.</BLURB>
+<DEFAULT>9</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>GstZebraStripe::threshold</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[0,100]</RANGE>
+<FLAGS>rwx</FLAGS>
+<NICK>Threshold</NICK>
+<BLURB>Threshold above which the video is striped.</BLURB>
+<DEFAULT>90</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::calculatemotion</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Calculate Motion</NICK>
+<BLURB>If needs calculate motion on frame you need this property setting true otherwise false.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::cellscolor</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Color of Motion Cells</NICK>
+<BLURB>The color of motion cells separated with ",".</BLURB>
+<DEFAULT>""</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::datafile</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>DataFile</NICK>
+<BLURB>Location of motioncells data file (empty string means no saving).</BLURB>
+<DEFAULT>""</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::datafileextension</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>DataFile Extension</NICK>
+<BLURB>Extension of datafile.</BLURB>
+<DEFAULT>""</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::display</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Display</NICK>
+<BLURB>Motion Cells visible or not on Current Frame.</BLURB>
+<DEFAULT>TRUE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::gap</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[1,60]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GAP</NICK>
+<BLURB>GAP between clips.</BLURB>
+<DEFAULT>5</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::gridx</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[8,32]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GRID X</NICK>
+<BLURB>Motion Grid X.</BLURB>
+<DEFAULT>10</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::gridy</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[8,32]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>GRID X</NICK>
+<BLURB>Motion Grid Y.</BLURB>
+<DEFAULT>10</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::motioncellsidx</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Motion Cells Of Interest(MOCI)</NICK>
+<BLURB>The line and column idx separated with ":", describe a cell. Cells separated with ",".</BLURB>
+<DEFAULT>""</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::motioncellthickness</NAME>
+<TYPE>gint</TYPE>
+<RANGE>[-1,5]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Motion Cell Thickness</NICK>
+<BLURB>Motion Cell Border Thickness, if it's -1 then motion cell will be fill.</BLURB>
+<DEFAULT>1</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::motionmaskcellspos</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Motion Mask with Cells Position</NICK>
+<BLURB>The line and column idx separated with ":" what cells want we mask-out, describe a cell. Cells separated with ",".</BLURB>
+<DEFAULT>""</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::motionmaskcoords</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Motion Mask with Coordinates</NICK>
+<BLURB>The upper left x, y and lower right x, y coordinates separated with ":", describe a region. Regions separated with ",".</BLURB>
+<DEFAULT>""</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::postallmotion</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Post All Motion</NICK>
+<BLURB>Element post bus msg for every motion frame or just motion start and motion stop.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::sensitivity</NAME>
+<TYPE>gdouble</TYPE>
+<RANGE>[0,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>SENSITIVITY</NICK>
+<BLURB>Motion CELLS SENSITIVITY.</BLURB>
+<DEFAULT>0.5</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::threshold</NAME>
+<TYPE>gdouble</TYPE>
+<RANGE>[0,1]</RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>THRESHOLD</NICK>
+<BLURB>Threshold of Motion CELLS Number.</BLURB>
+<DEFAULT>0.01</DEFAULT>
+</ARG>
+
+<ARG>
+<NAME>Gstmotioncells::usealpha</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Use alpha</NICK>
+<BLURB>Use or not alpha blending because it cause flicking on frames, it has some bug.</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
diff --git a/docs/plugins/gst-plugins-bad-plugins.hierarchy b/docs/plugins/gst-plugins-bad-plugins.hierarchy
index 8c6f857..82c2991 100644
--- a/docs/plugins/gst-plugins-bad-plugins.hierarchy
+++ b/docs/plugins/gst-plugins-bad-plugins.hierarchy
@@ -10,10 +10,8 @@ GObject
       ADPCMEnc
       GstAiffMux
       GstAiffParse
-      GstAmrWbEnc
       GstAsfMux
       GstAsfParse
-      GstAssRender
       GstBaseParseBad
         GstAacParse
         GstAc3Parse
@@ -34,19 +32,11 @@ GObject
         GstBaseAudioSink
           GstAudioSink
             GstApExSink
-            GstNasSink
-            GstSDLAudioSink
         GstChecksumSink
-        GstCurlSink
         GstDCCPClientSink
         GstDCCPServerSink
         GstFBDEVSink
-        GstSFSink
         GstShmSink
-        GstVideoSink
-          GstDfbVideoSink
-          GstSDLVideoSink
-          VdpSink
       GstBaseSrc
         GstDTMFSrc
         GstDataURISrc
@@ -55,25 +45,12 @@ GObject
           GstDCCPServerSrc
           GstDc1394
           GstDvbSrc
-          GstMMS
-          GstMythtvSrc
-          GstNeonhttpSrc
-          GstRTMPSrc
           GstRfbSrc
           GstShmSrc
           GstVCDSrc
-          frei0r-src-ising0r
-          frei0r-src-lissajous0r
-          frei0r-src-nois0r
-          frei0r-src-onecol0r
-          frei0r-src-partik0l
-          frei0r-src-plasma
         GstRTPDTMFSrc
-        GstSFSrc
       GstBaseTransform
         GstAudioFilter
-          GstBPMDetect
-          GstOFA
           GstStereo
         GstBayer2RGB
         GstCogScale
@@ -123,104 +100,29 @@ GObject
             GstCvSmooth
             GstCvSobel
             Gstfacedetect
-          GstRsvgOverlay
           GstSolarize
           GstVideoAnalyse
           GstVideoDetect
           GstVideoMark
-          GstZBar
-          frei0r-filter-3-point-color-balance
-          frei0r-filter-3dflippo
-          frei0r-filter-b
-          frei0r-filter-baltan
-          frei0r-filter-bluescreen0r
-          frei0r-filter-brightness
-          frei0r-filter-bw0r
-          frei0r-filter-cartoon
-          frei0r-filter-color-distance
-          frei0r-filter-contrast0r
-          frei0r-filter-curves
-          frei0r-filter-dealygrab
-          frei0r-filter-delay0r
-          frei0r-filter-distort0r
-          frei0r-filter-edgeglow
-          frei0r-filter-equaliz0r
-          frei0r-filter-flippo
-          frei0r-filter-g
-          frei0r-filter-gamma
-          frei0r-filter-glow
-          frei0r-filter-hueshift0r
-          frei0r-filter-invert0r
-          frei0r-filter-k-means-clustering
-          frei0r-filter-lens-correction
-          frei0r-filter-letterb0xed
-          frei0r-filter-levels
-          frei0r-filter-luminance
-          frei0r-filter-mask0mate
-          frei0r-filter-nervous
-          frei0r-filter-nosync0r
-          frei0r-filter-perspective
-          frei0r-filter-pixeliz0r
-          frei0r-filter-primaries
-          frei0r-filter-r
-          frei0r-filter-rgb-parade
-          frei0r-filter-saturat0r
-          frei0r-filter-scale0tilt
-          frei0r-filter-scanline0r
-          frei0r-filter-sobel
-          frei0r-filter-squareblur
-          frei0r-filter-tehroxx0r
-          frei0r-filter-threelay0r
-          frei0r-filter-threshold0r
-          frei0r-filter-tint0r
-          frei0r-filter-transparency
-          frei0r-filter-twolay0r
-          frei0r-filter-vectorscope
-          frei0r-filter-vertigo
-          frei0r-filter-water
-          frei0r-filter-white-balance
         GstVideoMaxRate
-      GstBaseVideoCodec
-        GstBaseVideoDecoder
-          GstSchroDec
-          GstVP8Dec
-        GstBaseVideoEncoder
-          GstDiracEnc
-          GstSchroEnc
-          GstVP8Enc
+        GstZebraStripe
       GstBin
         DvbBaseBin
         GstAutoConvert
         GstAutoVideoConvert
         GstFPSDisplaySink
-        GstGSettingsSwitchSink
-          GstGSettingsAudioSink
-          GstGSettingsVideoSink
-        GstGSettingsSwitchSrc
-          GstGSettingsAudioSrc
-          GstGSettingsVideoSrc
         GstPipeline
           GstCameraBin
           GstQTMoovRecover
         GstSDPDemux
-        RsnDvdBin
-      GstBz2dec
-      GstBz2enc
-      GstCDAudio
       GstCDXAParse
-      GstCeltDec
-      GstCeltEnc
       GstChopMyData
       GstDVBSubOverlay
       GstDVDSpu
-      GstDtsDec
-      GstFaac
-      GstFaad
       GstFestival
+      GstFieldAnalysis
       GstFreeze
       GstGPPMux
-      GstGSMDec
-      GstGSMEnc
       GstISMLMux
       GstId3BaseMux
         GstId3Mux
@@ -230,11 +132,6 @@ GObject
       GstJP2kDecimator
       GstJifMux
       GstJpegParse
-      GstKateDec
-      GstKateEnc
-      GstKateParse
-        GstKateTag
-      GstKateTiger
       GstLegacyH264Parse
       GstLiveAdder
       GstMJ2Mux
@@ -242,21 +139,14 @@ GObject
       GstMSE
       GstMXFDemux
       GstMXFMux
-      GstMimDec
-      GstMimEnc
-      GstModPlug
-      GstMpeg2enc
       GstMpeg4VParse
       GstMpegPSDemux
       GstMpegTSDemux
-      GstMplex
-      GstMusepackDec
       GstMveDemux
       GstMveMux
       GstNsfDec
       GstNuvDemux
       GstPcapParse
-      GstPitch
       GstPnmdec
       GstPnmenc
       GstQTMux
@@ -267,177 +157,25 @@ GObject
         GstVideoParse
       GstRealAudioDec
       GstRealVideoDec
-      GstRsvgDec
       GstSSim
       GstSegmentClip
         GstAudioSegmentClip
         GstVideoSegmentClip
-      GstSignalProcessor
-        ladspa-Chorus1
-        ladspa-Chorus2
-        ladspa-G2reverb
-        ladspa-Mvchpf-1
-        ladspa-Mvclpf-1
-        ladspa-Mvclpf-2
-        ladspa-Mvclpf-3
-        ladspa-Mvclpf-4
-        ladspa-Phaser1
-        ladspa-Phaser1+LFO
-        ladspa-TripleChorus
-        ladspa-alias
-        ladspa-allpass-c
-        ladspa-allpass-l
-        ladspa-allpass-n
-        ladspa-amPitchshift
-        ladspa-amp
-        ladspa-amp-mono
-        ladspa-amp-stereo
-        ladspa-analogueOsc
-        ladspa-artificialLatency
-        ladspa-autoPhaser
-        ladspa-bandpass-a-iir
-        ladspa-bandpass-iir
-        ladspa-bodeShifter
-        ladspa-bodeShifterCV
-        ladspa-butthigh-iir
-        ladspa-buttlow-iir
-        ladspa-bwxover-iir
-        ladspa-chebstortion
-        ladspa-comb
-        ladspa-comb-c
-        ladspa-comb-l
-        ladspa-comb-n
-        ladspa-combSplitter
-        ladspa-const
-        ladspa-crossoverDist
-        ladspa-dcRemove
-        ladspa-decay
-        ladspa-decimator
-        ladspa-declip
-        ladspa-delay-5s
-        ladspa-delay-c
-        ladspa-delay-l
-        ladspa-delay-n
-        ladspa-delayorama
-        ladspa-diode
-        ladspa-divider
-        ladspa-dj-eq
-        ladspa-dj-eq-mono
-        ladspa-djFlanger
-        ladspa-dysonCompress
-        ladspa-fadDelay
-        ladspa-fastLookaheadLimiter
-        ladspa-flanger
-        ladspa-fmOsc
-        ladspa-foldover
-        ladspa-fourByFourPole
-        ladspa-foverdrive
-        ladspa-freqTracker
-        ladspa-gate
-        ladspa-giantFlange
-        ladspa-gong
-        ladspa-gongBeater
-        ladspa-gsm
-        ladspa-gverb
-        ladspa-hardLimiter
-        ladspa-harmonicGen
-        ladspa-hermesFilter
-        ladspa-highpass-iir
-        ladspa-hilbert
-        ladspa-hpf
-        ladspa-imp
-        ladspa-impulse-fc
-        ladspa-inv
-        ladspa-karaoke
-        ladspa-lcrDelay
-        ladspa-lfoPhaser
-        ladspa-lowpass-iir
-        ladspa-lpf
-        ladspa-lsFilter
-        ladspa-matrixMSSt
-        ladspa-matrixSpatialiser
-        ladspa-matrixStMS
-        ladspa-mbeq
-        ladspa-modDelay
-        ladspa-multivoiceChorus
-        ladspa-noise-white
-        ladspa-notch-iir
-        ladspa-pitchScale
-        ladspa-pitchScaleHQ
-        ladspa-plate
-        ladspa-pointerCastDistortion
-        ladspa-rateShifter
-        ladspa-retroFlange
-        ladspa-revdelay
-        ladspa-ringmod-1i1o1l
-        ladspa-ringmod-2i1o
-        ladspa-satanMaximiser
-        ladspa-sc1
-        ladspa-sc2
-        ladspa-sc3
-        ladspa-sc4
-        ladspa-sc4m
-        ladspa-se4
-        ladspa-shaper
-        ladspa-sifter
-        ladspa-sinCos
-        ladspa-sine-faaa
-        ladspa-sine-faac
-        ladspa-sine-fcaa
-        ladspa-sine-fcac
-        ladspa-singlePara
-        ladspa-sinusWavewrapper
-        ladspa-smoothDecimate
-        ladspa-split
-        ladspa-stepMuxer
-        ladspa-surroundEncoder
-        ladspa-svf
-        ladspa-tap-autopan
-        ladspa-tap-chorusflanger
-        ladspa-tap-deesser
-        ladspa-tap-doubler
-        ladspa-tap-dynamics-m
-        ladspa-tap-dynamics-st
-        ladspa-tap-equalizer
-        ladspa-tap-equalizer-bw
-        ladspa-tap-limiter
-        ladspa-tap-pinknoise
-        ladspa-tap-pitch
-        ladspa-tap-reflector
-        ladspa-tap-reverb
-        ladspa-tap-rotspeak
-        ladspa-tap-sigmoid
-        ladspa-tap-stereo-echo
-        ladspa-tap-tremolo
-        ladspa-tap-tubewarmth
-        ladspa-tap-vibrato
-        ladspa-tapeDelay
-        ladspa-transient
-        ladspa-triplePara
-        ladspa-valve
-        ladspa-valveRect
-        ladspa-vynil
-        ladspa-waveTerrain
-        ladspa-xfade
-        ladspa-xfade4
-        ladspa-zm1
       GstSirenDec
       GstSirenEnc
       GstSpeed
       GstSrtEnc
-      GstTRM
       GstTemplateMatch
       GstTtaDec
       GstTtaParse
       GstVMncDec
       GstVcdParse
-      GstVdpVideoPostProcess
-      GstWildmidi
       GstXvidDec
       GstXvidEnc
       GstY4mDec
       Gstedgedetect
       Gstfaceblur
+      Gstmotioncells
       Gstpyramidsegment
       Gsttextwrite
       MpegPsMux
@@ -447,46 +185,8 @@ GObject
       MpegTSParse
       MpegTsMux
       MpegVideoParse
-      SatBaseVideoDecoder
-        GstVdpDecoder
-          GstVdpH264Dec
-          GstVdpMpeg4Dec
-          GstVdpMpegDec
-      frei0r-mixer-addition
-      frei0r-mixer-alpha-injection
-      frei0r-mixer-alphaatop
-      frei0r-mixer-alphain
-      frei0r-mixer-alphaout
-      frei0r-mixer-alphaover
-      frei0r-mixer-alphaxor
-      frei0r-mixer-blend
-      frei0r-mixer-burn
-      frei0r-mixer-color-only
-      frei0r-mixer-composition
-      frei0r-mixer-darken
-      frei0r-mixer-difference
-      frei0r-mixer-divide
-      frei0r-mixer-dodge
-      frei0r-mixer-grain-extract
-      frei0r-mixer-grain-merge
-      frei0r-mixer-hardlight
-      frei0r-mixer-hue
-      frei0r-mixer-lighten
-      frei0r-mixer-multiply
-      frei0r-mixer-overlay
-      frei0r-mixer-rgb
-      frei0r-mixer-saturation
-      frei0r-mixer-screen
-      frei0r-mixer-softlight
-      frei0r-mixer-subtract
-      frei0r-mixer-uv-map
-      frei0r-mixer-value
-      frei0r-mixer-xfade0r
     GstPad
-      GstVdpOutputSrcPad
-      GstVdpVideoSrcPad
     GstPadTemplate
-      GstSignalProcessorPadTemplate
     GstPlugin
     GstPluginFeature
       GstElementFactory
@@ -498,7 +198,6 @@ GObject
     GstTask
     GstTaskPool
   GstSignalObject
-  GstVdpDevice
   MpegTsPatInfo
   MpegTsPmtInfo
 GInterface
@@ -507,10 +206,8 @@ GInterface
   GstColorBalance
   GstImplementsInterface
   GstMixer
-  GstNavigation
   GstPhotography
   GstPreset
   GstTagSetter
   GstURIHandler
-  GstXOverlay
   MXFDescriptiveMetadataFrameworkInterface
diff --git a/docs/plugins/gst-plugins-bad-plugins.interfaces b/docs/plugins/gst-plugins-bad-plugins.interfaces
index bec4fc6..e01a669 100644
--- a/docs/plugins/gst-plugins-bad-plugins.interfaces
+++ b/docs/plugins/gst-plugins-bad-plugins.interfaces
@@ -1,45 +1,22 @@
 GstBin GstChildProxy
 GstPipeline GstChildProxy
-GstCameraBin GstChildProxy GstImplementsInterface GstColorBalance GstTagSetter
 GstQTMoovRecover GstChildProxy
-GstGSettingsSwitchSink GstChildProxy
-GstGSettingsAudioSink GstChildProxy
-GstGSettingsVideoSink GstChildProxy
-GstGSettingsSwitchSrc GstChildProxy
-GstGSettingsAudioSrc GstChildProxy
-GstGSettingsVideoSrc GstChildProxy
-RsnDvdBin GstChildProxy GstURIHandler
-DvbBaseBin GstChildProxy GstURIHandler
-GstAutoConvert GstChildProxy
-GstAutoVideoConvert GstChildProxy
+GstCameraBin GstChildProxy GstImplementsInterface GstTagSetter GstColorBalance
+DvbBaseBin GstURIHandler GstChildProxy
 GstSDPDemux GstChildProxy
 GstFPSDisplaySink GstChildProxy
-GstSDLVideoSink GstImplementsInterface GstXOverlay GstNavigation
-GstDfbVideoSink GstImplementsInterface GstNavigation GstColorBalance
-VdpSink GstImplementsInterface GstNavigation GstXOverlay
-GstApExSink GstImplementsInterface GstMixer
-GstMpeg2enc GstPreset
-GstCeltEnc GstTagSetter GstPreset
-GstCDAudio GstURIHandler
-GstRTMPSrc GstURIHandler
-GstMythtvSrc GstURIHandler
-GstMMS GstURIHandler
-GstNeonhttpSrc GstURIHandler
+GstAutoConvert GstChildProxy
+GstAutoVideoConvert GstChildProxy
 GstVCDSrc GstURIHandler
 GstDataURISrc GstURIHandler
-GstAmrWbEnc GstPreset
-GstFaac GstPreset
 GstXvidEnc GstPreset
-GstDiracEnc GstPreset
-GstVP8Enc GstTagSetter GstPreset
-GstKateEnc GstTagSetter
-GstKateTag GstTagSetter
-GstJifMux GstTagSetter
+GstApExSink GstImplementsInterface GstMixer
 GstId3BaseMux GstTagSetter
 GstId3Mux GstTagSetter
+GstAsfMux GstTagSetter
 GstQTMux GstTagSetter
 GstMP4Mux GstTagSetter
 GstISMLMux GstTagSetter
 GstGPPMux GstTagSetter
 GstMJ2Mux GstTagSetter
-GstAsfMux GstTagSetter
+GstJifMux GstTagSetter
diff --git a/docs/plugins/gst-plugins-bad-plugins.prerequisites b/docs/plugins/gst-plugins-bad-plugins.prerequisites
index f550060..83a7bb8 100644
--- a/docs/plugins/gst-plugins-bad-plugins.prerequisites
+++ b/docs/plugins/gst-plugins-bad-plugins.prerequisites
@@ -1,8 +1,7 @@
 GstChildProxy GstObject
 GstImplementsInterface GstElement
-GstXOverlay GstImplementsInterface GstElement
+GstMixer GstImplementsInterface GstElement
+MXFDescriptiveMetadataFrameworkInterface MXFMetadataBase MXFDescriptiveMetadata
 GstTagSetter GstElement
 GstColorBalance GstImplementsInterface GstElement
-GstMixer GstImplementsInterface GstElement
-MXFDescriptiveMetadataFrameworkInterface MXFDescriptiveMetadata
 GstPhotography GstImplementsInterface GstElement
diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am
index 7ddbe05..093ccdf 100644
--- a/ext/opencv/Makefile.am
+++ b/ext/opencv/Makefile.am
@@ -16,7 +16,10 @@ libgstopencv_la_SOURCES = gstopencv.c \
 			gstfacedetect.c \
 			gstpyramidsegment.c \
 			gsttemplatematch.c \
-			gsttextwrite.c
+			gsttextwrite.c \
+			gstmotioncells.c \
+			motioncells_wrapper.cpp \
+			MotionCells.cpp
 
 # flags used to compile this facedetect
 # add other _CFLAGS and _LIBS as needed
@@ -27,6 +30,8 @@ libgstopencv_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(OPENCV_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) -DCV_INLINE="static inline" \
 	-DCV_NO_BACKWARD_COMPATIBILITY
 
+libgstopencv_la_CPPFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS)
+
 libgstopencv_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(OPENCV_LIBS) \
 			$(GSTPB_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR)
 
@@ -46,4 +51,8 @@ noinst_HEADERS = gstopencvvideofilter.h gstopencvutils.h \
 		gstfacedetect.h \
 		gstpyramidsegment.h \
 		gsttemplatematch.h \
-		gsttextwrite.h
+		gsttextwrite.h \
+		analitics.h \
+		gstmotioncells.h \
+		motioncells_wrapper.h \
+		MotionCells.h 
diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp
new file mode 100644
index 0000000..cbc0626
--- /dev/null
+++ b/ext/opencv/MotionCells.cpp
@@ -0,0 +1,528 @@
+/*
+ * MotionCells.cpp
+ *
+ *  Created on: Aug 11, 2010
+ *      Author: rjobbagy
+ */
+
+#include <cstdlib>
+#include <errno.h>
+#include <math.h>
+#include <gst/gst.h>
+
+#include "MotionCells.h"
+
+extern int instanceCounter;
+extern int datafileidx;
+
+int cntmotioncells = 0;
+int framecntmotioncells = 0;
+
+MotionCells::MotionCells()
+{
+    m_framecnt = 0;
+    m_motioncells_idx_count = 0;
+    m_motioncellsidxcstr = NULL;
+    m_saveInDatafile = false;
+
+}
+
+MotionCells::~MotionCells()
+{
+    if (f){    	
+    	fflush(f);
+    	fclose(f);
+    }
+}
+
+bool MotionCells::performDetectionMotionCells(IplImage *p_frame, double p_sensitivity,
+		double p_framerate,int p_gridheight, int p_gridwidth, unsigned long int timestamp_millisec,
+		bool p_isVisible,bool p_useAlpha,int motionmaskcoord_count,motionmaskcoordrect* motionmaskcoords,
+		int motionmaskcells_count,motioncellidx* motionmaskcellsidx,cellscolor* motioncellscolor,
+		int motioncells_count,motioncellidx* motioncellsidx,char* p_datafile,
+		bool p_changed_datafile,int p_thickness)
+
+{
+
+    int sumframecnt = 0;
+    p_framerate >= 1 ? p_framerate <= 5 ? sumframecnt = 1
+		     : p_framerate <= 10 ? sumframecnt = 2
+		     : p_framerate <= 15 ? sumframecnt = 3
+		     : p_framerate <= 20 ? sumframecnt = 4
+		     : p_framerate <= 25 ? sumframecnt = 5
+	             : sumframecnt = 0 : sumframecnt = 0;
+
+    m_framecnt++;
+    if (m_framecnt >= sumframecnt)
+    {
+		m_changed_datafile = p_changed_datafile;
+		m_useAlpha = p_useAlpha;
+		m_gridwidth = p_gridwidth;
+		m_gridheight = p_gridheight;
+		if(m_changed_datafile){
+			if(!initDataFile(p_datafile))
+				return false;
+		}
+
+		m_frameSize = cvGetSize(p_frame);
+		m_frameSize.width /= 2;
+		m_frameSize.height /= 2;
+		setMotionCells(m_frameSize.width, m_frameSize.height);
+		m_sensitivity = 1 - p_sensitivity;
+		m_isVisible = p_isVisible;
+		m_pcurFrame = cvCloneImage(p_frame);
+		IplImage* m_pmovingAvg = cvCreateImage(m_frameSize, IPL_DEPTH_32F, 1);
+		IplImage* m_pcurgreyImage = cvCreateImage(m_frameSize, IPL_DEPTH_8U, 1);
+		IplImage* m_pprevgreyImage = cvCreateImage(m_frameSize, IPL_DEPTH_8U, 1);
+		IplImage* m_pgreyImage = cvCreateImage(m_frameSize, IPL_DEPTH_8U, 1);
+		IplImage* m_pcurDown = cvCreateImage(m_frameSize, m_pcurFrame->depth, m_pcurFrame->nChannels);
+		IplImage* m_pprevDown = cvCreateImage(m_frameSize, m_pprevFrame->depth, m_pprevFrame->nChannels);
+		m_pbwImage = cvCreateImage(m_frameSize, IPL_DEPTH_8U, 1);
+		cvPyrDown(m_pprevFrame,m_pprevDown);
+		cvCvtColor(m_pprevDown, m_pprevgreyImage, CV_RGB2GRAY);
+		cvConvertScale(m_pprevgreyImage, m_pmovingAvg, 1.0, 0.0);//convert 8U to 32F
+		cvReleaseImage(&m_pprevFrame);
+		cvPyrDown(m_pcurFrame,m_pcurDown);
+		cvCvtColor(m_pcurDown, m_pcurgreyImage, CV_RGB2GRAY);
+		bool isNight = (calcHistogram(m_pcurgreyImage) <= 75)?true:false;
+		if(isNight)
+			m_sensitivity = ((m_sensitivity*1.25) > 1.0) ? 1.0 : (m_sensitivity *= 1.25);
+		m_pdifferenceImage = cvCloneImage(m_pcurgreyImage);
+		m_ptemp = cvCloneImage(m_pcurgreyImage);
+		//cvSmooth(m_pcurgreyImage, m_pcurgreyImage, CV_GAUSSIAN, 3, 0);//TODO camera noise reduce,something smoothing, and rethink runningavg weights
+		cvRunningAvg(m_pcurgreyImage, m_pmovingAvg, 0.020, NULL);
+
+		//Convert the scale of the moving average.
+		cvConvertScale(m_pmovingAvg, m_ptemp, 1.0, 0.0);//convert 32F to 8U
+
+		//Minus the current gray frame from the 8U moving average.
+		cvAbsDiff(m_pcurgreyImage, m_ptemp, m_pdifferenceImage);
+
+		//Convert the image to black and white.
+		cvAdaptiveThreshold(m_pdifferenceImage, m_pbwImage, 255,
+			   CV_ADAPTIVE_THRESH_GAUSSIAN_C, CV_THRESH_BINARY_INV, 7);
+
+		// Dilate and erode to get object blobs
+		cvDilate(m_pbwImage, m_pbwImage, NULL, 2);
+		cvErode(m_pbwImage, m_pbwImage, NULL, 2);
+
+		//mask-out the overlay on difference image
+		if(motionmaskcoord_count>0)
+			performMotionMaskCoords(motionmaskcoords,motionmaskcoord_count);
+		if(motionmaskcells_count>0)
+			performMotionMask(motionmaskcellsidx,motionmaskcells_count);
+		if (getIsNonZero(m_pbwImage))
+		{//detect Motion
+			GST_DEBUG("DETECT MOTION \n");
+			(motioncells_count>0)?
+					calculateMotionPercentInMotionCells(motioncellsidx,motioncells_count)
+					:calculateMotionPercentInMotionCells(motionmaskcellsidx,0);
+
+				IplImage *transparencyimg = cvCreateImage(m_frameSize, p_frame->depth, p_frame->nChannels);
+				if(m_motioncellsidxcstr)
+					delete m_motioncellsidxcstr;
+				m_motioncells_idx_count = m_MotionCells.size() * MSGLEN;//one motion cell idx: (lin idx : col idx,) it's 4 character except last motion cell idx
+				m_motioncellsidxcstr = new char[m_motioncells_idx_count];
+				char* tmpstr = new char[MSGLEN];
+				for(int i =0;i < MSGLEN;i++)
+					tmpstr[i]=' ';
+				for (unsigned int i = 0; i < m_MotionCells.size(); i++)//FIXME prev bugs fixed, but not perfect result frame
+				{
+					if(m_useAlpha && m_isVisible)
+					{
+						cvPyrDown(p_frame,transparencyimg);
+						cvRectangle(transparencyimg,
+								m_MotionCells.at(i).cell_pt1,
+								m_MotionCells.at(i).cell_pt2,
+								CV_RGB(motioncellscolor->B_channel_value,
+								motioncellscolor->G_channel_value,
+								motioncellscolor->R_channel_value),
+								CV_FILLED);
+					}else if (m_isVisible){
+						m_MotionCells.at(i).cell_pt1.x*=2;
+						m_MotionCells.at(i).cell_pt1.y*=2;
+						m_MotionCells.at(i).cell_pt2.x*=2;
+						m_MotionCells.at(i).cell_pt2.y*=2;
+						cvRectangle(p_frame,
+									m_MotionCells.at(i).cell_pt1,
+									m_MotionCells.at(i).cell_pt2,
+									CV_RGB(motioncellscolor->B_channel_value,
+									motioncellscolor->G_channel_value,
+									motioncellscolor->R_channel_value),
+									p_thickness);
+					}
+
+					if (i < m_MotionCells.size() - 1) {
+						snprintf(tmpstr,MSGLEN,"%d:%d,", m_MotionCells.at(i).lineidx,m_MotionCells.at(i).colidx);
+					} else {
+						snprintf(tmpstr,MSGLEN, "%d:%d", m_MotionCells.at(i).lineidx, m_MotionCells.at(i).colidx);
+					}
+					if (i == 0)
+						strncpy(m_motioncellsidxcstr,tmpstr,m_motioncells_idx_count);
+					else
+						strcat(m_motioncellsidxcstr,tmpstr);
+				}
+				if(m_MotionCells.size() == 0)
+					strncpy(m_motioncellsidxcstr," ",m_motioncells_idx_count);
+
+				if(m_useAlpha && m_isVisible){//alpha blending isnt perfect, needs fix it
+					//image split and prepare for transparency image, and finally merge channels
+					IplImage *redchannel = cvCreateImage(m_frameSize, IPL_DEPTH_8U, 1);
+					IplImage *greenchannel = cvCreateImage(m_frameSize, IPL_DEPTH_8U, 1);
+					IplImage *bluechannel = cvCreateImage(m_frameSize, IPL_DEPTH_8U, 1);
+					IplImage* tmpCurFrame = cvCreateImage(m_frameSize,m_pcurFrame->depth,m_pcurFrame->nChannels);
+					cvPyrDown(m_pcurFrame,tmpCurFrame);
+					transparentImage = cvCreateImage(cvGetSize(tmpCurFrame),tmpCurFrame->depth,tmpCurFrame->nChannels);
+					blendImages(tmpCurFrame,transparencyimg,0.5,0.5);
+					cvSplit(transparentImage,redchannel,greenchannel,bluechannel,0);
+					IplImage* sumrednormal = cvCreateImage(cvGetSize(p_frame),IPL_DEPTH_8U,1);
+					IplImage* sumgreennormal = cvCreateImage(cvGetSize(p_frame),IPL_DEPTH_8U,1);
+					IplImage* sumbluenormal = cvCreateImage(cvGetSize(p_frame),IPL_DEPTH_8U,1);
+					cvResize(redchannel,sumrednormal,CV_INTER_CUBIC);
+					cvResize(greenchannel,sumgreennormal,CV_INTER_CUBIC);
+					cvResize(bluechannel,sumbluenormal,CV_INTER_CUBIC);
+					cvMerge(sumrednormal,sumgreennormal,sumbluenormal,0,p_frame);
+					cvReleaseImage(&redchannel);
+					cvReleaseImage(&greenchannel);
+					cvReleaseImage(&bluechannel);
+					cvReleaseImage(&sumrednormal);
+					cvReleaseImage(&sumgreennormal);
+					cvReleaseImage(&sumbluenormal);
+					cvReleaseImage(&tmpCurFrame);
+					cvReleaseImage(&transparentImage);
+				}
+				cvReleaseImage(&transparencyimg);
+				delete[] tmpstr;
+
+			if (f && m_saveInDatafile)
+				if(saveMotionCells(timestamp_millisec)!=0)
+					cerr<<"Something wrong happend is saveMotionCells"<<endl;
+		}
+	
+		framecntmotioncells++;
+		m_pprevFrame = cvCloneImage(m_pcurFrame);
+		m_framecnt = 0;
+		cvReleaseImage(&m_pcurFrame);
+		cvReleaseImage(&m_pdifferenceImage);
+		cvReleaseImage(&m_pcurgreyImage);
+		cvReleaseImage(&m_pprevgreyImage);
+		cvReleaseImage(&m_ptemp);
+		cvReleaseImage(&m_pmovingAvg);
+		cvReleaseImage(&m_pgreyImage);
+		cvReleaseImage(&m_pbwImage);
+		cvReleaseImage(&m_pprevDown);
+		cvReleaseImage(&m_pcurDown);
+		for (int i = 0; i < m_gridheight; ++i)
+		{
+			delete[] m_pCells[i];
+		}
+		delete[] m_pCells;
+
+		m_MotionCells.clear();
+    }
+    return true;
+}
+
+bool MotionCells::initDataFile(char* p_datafile)
+{
+
+	MotionCellData mcd;
+	//cerr<<"init: "<<" changed: "<<m_changed_datafile<<endl;
+	if (strncmp(p_datafile, " ",1))
+	{
+		//cerr << "There is datafile:" << p_datafile << endl;
+		f = fopen(p_datafile, "w");
+		if (f == NULL)
+		{
+			fprintf(stderr, "%s %d:saveMotionCells:fopen:%d (%s)\n", __FILE__, __LINE__, errno,
+				strerror(errno));
+			return false;
+		}else{
+			//cerr<<" file opened"<<endl;
+			m_saveInDatafile = true;
+		}
+	}
+	else
+	f = NULL;
+	bzero(&m_header, sizeof(MotionCellHeader));
+	m_header.headersize = MC_HEADER;
+	m_header.type = MC_TYPE;
+	m_header.version = MC_VERSION;
+	//it needs this bytes
+	m_header.itemsize = (int) ceil(ceil(m_gridwidth * m_gridheight / 8.0) / 4.0) * 4
+		+ sizeof(mcd.timestamp);
+	m_header.gridx = m_gridwidth;
+	m_header.gridy = m_gridheight;
+	snprintf(m_header.name, sizeof(m_header.name), "%s %dx%d", MC_VERSIONTEXT, m_header.gridx,
+		m_header.gridy);
+	m_changed_datafile = false;
+	return true;
+}
+
+int MotionCells::saveMotionCells(unsigned long int timestamp_millisec)//TODO check and rethink everthing is good here and init function ?
+{
+	//cerr<<"Save"<<endl;
+    MotionCellData mc_data;
+    mc_data.timestamp = timestamp_millisec;
+    mc_data.data = NULL;
+
+    //There is no datafile
+    if (f == NULL)
+	return 0;
+    //cerr<<"in save MotionCells"<<endl;
+    if (ftello(f) == 0)
+    {
+	//cerr << "Writing out file header:" << sizeof(MotionCellHeader) << " itemsize:"
+	        //<< m_header.itemsize << endl;
+		if (fwrite(&m_header, sizeof(MotionCellHeader), 1, f) != 1)
+		{
+			fprintf(stderr, "%s %d:saveMotionCells:fwrite:%d (%s)\n", __FILE__, __LINE__, errno,
+				strerror(errno));
+			return -1;
+		}
+    }
+
+    mc_data.data = (char*) calloc(1, m_header.itemsize - sizeof(mc_data.timestamp));
+    if (mc_data.data == NULL)
+    {
+	fprintf(stderr, "%s %d:saveMotionCells:calloc:%d (%s)\n", __FILE__, __LINE__, errno,
+	        strerror(errno));
+	return -1;
+    }
+
+    //	cerr << "Frame timestamp " << mc_data.timestamp << endl;
+    for (unsigned int i = 0; i < m_MotionCells.size(); i++)
+    {
+		int bitnum = m_MotionCells.at(i).lineidx * m_header.gridx + m_MotionCells.at(i).colidx;
+		int bytenum = (int) floor(bitnum / 8.0);
+		int shift = bitnum - bytenum * 8;
+		mc_data.data[bytenum] = mc_data.data[bytenum] | (1 << shift);
+	//		cerr << "Motion Detected " <<  "line:" << m_MotionCells.at(i).lineidx << " col:" << m_MotionCells.at(i).colidx;
+	//		cerr << "    bitnum " << bitnum << " bytenum " << bytenum << " shift " << shift << " value " << (int)mc_data.data[bytenum] << endl;
+    }
+
+    if (fwrite(&mc_data.timestamp, sizeof(mc_data.timestamp), 1, f) != 1)
+    {
+	fprintf(stderr, "%s %d:saveMotionCells:fwrite:%d (%s)\n", __FILE__, __LINE__, errno,
+	        strerror(errno));
+	return -1;
+    }
+
+    if (fwrite(mc_data.data, m_header.itemsize - sizeof(mc_data.timestamp), 1, f) != 1)
+    {
+	fprintf(stderr, "%s %d:saveMotionCells:fwrite:%d (%s)\n", __FILE__, __LINE__, errno,
+	        strerror(errno));
+	return -1;
+    }
+
+    free(mc_data.data);
+    return 0;
+}
+
+double MotionCells::calculateMotionPercentInCell(int p_row, int p_col, double *p_cellarea,
+        double *p_motionarea, int *p_endx, int *p_endy)
+{
+    double cntpixelsnum = 0;
+    double cntmotionpixelnum = 0;
+    *p_cellarea = 0;
+
+    int ybegin = floor((double)p_row*m_cellheight);
+    int yend =floor((double)(p_row+1) * m_cellheight);
+    int xbegin = floor((double)(p_col) * m_cellwidth);
+    int xend = floor((double)(p_col+1) * m_cellwidth);
+    int cellw = xend - xbegin;
+    int cellh = yend - ybegin;
+    int cellarea = cellw*cellh;
+    int thresholdmotionpixelnum = floor(cellarea*m_sensitivity);
+    if(p_row>0)
+    	ybegin++;
+
+    if(p_col>0)
+    	xbegin++;
+
+	for (int i = ybegin; i < yend; i++)
+	{
+	    for (int j = xbegin; j < xend; j++)
+	    {
+			cntpixelsnum++;
+			if ((((uchar*) (m_pbwImage->imageData + m_pbwImage->widthStep * i))[j]) > 0)
+			{
+				cntmotionpixelnum++;
+				//cerr<<"threshold: "<<thresholdmotionpixelnum<<" motion pixelnum: "<<cntmotionpixelnum<<endl;
+				if(cntmotionpixelnum >= thresholdmotionpixelnum){//compare motion pixels number and threshold value
+					return cntmotionpixelnum;
+				}
+			}
+			int remainingpixelsnum = cellarea - cntpixelsnum;
+			//cerr<<"remaining: "<<remainingpixelsnum<<" sum: "<<(cntmotionpixelnum + remainingpixelsnum)<<endl;
+			if((cntmotionpixelnum + remainingpixelsnum) < thresholdmotionpixelnum){
+				return 0;
+			}
+	    }
+	}
+	*p_endx = xend;
+	*p_endy = yend;
+
+
+    *p_cellarea = cntpixelsnum;
+    *p_motionarea = cntmotionpixelnum;
+    return (cntmotionpixelnum / cntpixelsnum);
+}
+
+void MotionCells::calculateMotionPercentInMotionCells(motioncellidx* p_motioncellsidx,int p_motioncells_count)
+{
+	if(p_motioncells_count==0){
+		for (int i = 0; i <m_gridheight;++i)
+		{
+			for (int j = 0; j <m_gridwidth; ++j)
+			{
+				int endx = 0;
+				int endy = 0;
+				m_pCells[i][j].MotionPercent = calculateMotionPercentInCell(i, j,
+					&m_pCells[i][j].CellArea, &m_pCells[i][j].MotionArea, &endx, &endy);
+				m_pCells[i][j].hasMotion = m_pCells[i][j].MotionPercent > m_sensitivity ? true
+					: false;
+				if (m_pCells[i][j].hasMotion)
+				{
+					MotionCellsIdx mci;
+					mci.lineidx = i;
+					mci.colidx = j;
+					mci.cell_pt1.x = floor((double)j * m_cellwidth);
+					mci.cell_pt1.y = floor((double)i * m_cellheight);
+					mci.cell_pt2.x = floor((double)(j+1) * m_cellwidth);
+					mci.cell_pt2.y = floor((double)(i+1) * m_cellheight);
+					int w = mci.cell_pt2.x - mci.cell_pt1.x;
+					int h = mci.cell_pt2.y - mci.cell_pt1.y;
+					mci.motioncell = cvRect(mci.cell_pt1.x, mci.cell_pt1.y, w, h);
+					m_MotionCells.push_back(mci);
+				}
+			}
+		}
+	}else{
+		 for (int k = 0; k <p_motioncells_count; ++k)
+		  {
+
+			int endx = 0;
+			int endy = 0;
+			int i = p_motioncellsidx[k].lineidx;
+			int j = p_motioncellsidx[k].columnidx;
+			m_pCells[p_motioncellsidx[k].lineidx][p_motioncellsidx[k].columnidx].MotionPercent =
+				calculateMotionPercentInCell(i, j,
+					&m_pCells[p_motioncellsidx[k].lineidx][p_motioncellsidx[k].columnidx].CellArea,
+					&m_pCells[p_motioncellsidx[k].lineidx][p_motioncellsidx[k].columnidx].MotionArea,
+							&endx, &endy);
+			m_pCells[p_motioncellsidx[k].lineidx][p_motioncellsidx[k].columnidx].hasMotion =
+			m_pCells[p_motioncellsidx[k].lineidx][p_motioncellsidx[k].columnidx].MotionPercent
+				> m_sensitivity
+				? true
+				: false;
+			if (m_pCells[p_motioncellsidx[k].lineidx][p_motioncellsidx[k].columnidx].hasMotion)
+			{
+				MotionCellsIdx mci;
+				mci.lineidx = p_motioncellsidx[k].lineidx;
+				mci.colidx = p_motioncellsidx[k].columnidx;
+				mci.cell_pt1.x = floor((double)j * m_cellwidth);
+				mci.cell_pt1.y = floor((double)i * m_cellheight);
+				mci.cell_pt2.x = floor((double)(j+1) * m_cellwidth);
+				mci.cell_pt2.y = floor((double)(i+1) * m_cellheight);
+				int w = mci.cell_pt2.x - mci.cell_pt1.x;
+				int h = mci.cell_pt2.y - mci.cell_pt1.y;
+				mci.motioncell = cvRect(mci.cell_pt1.x, mci.cell_pt1.y, w, h);
+				m_MotionCells.push_back(mci);
+			}
+		}
+	}
+}
+
+void MotionCells::performMotionMaskCoords(motionmaskcoordrect* p_motionmaskcoords,int p_motionmaskcoords_count)
+{
+	CvPoint upperleft;
+	upperleft.x=0;
+	upperleft.y=0;
+	CvPoint lowerright;
+	lowerright.x=0;
+	lowerright.y=0;
+	for (int i = 0; i < p_motionmaskcoords_count; i++)
+	{
+		upperleft.x = p_motionmaskcoords[i].upper_left_x;
+		upperleft.y = p_motionmaskcoords[i].upper_left_y;
+		lowerright.x = p_motionmaskcoords[i].lower_right_x;
+		lowerright.y = p_motionmaskcoords[i].lower_right_y;
+		cvRectangle(m_pbwImage, upperleft, lowerright, CV_RGB(0,0,0), CV_FILLED);
+	}
+}
+
+void MotionCells::performMotionMask(motioncellidx* p_motionmaskcellsidx,int p_motionmaskcells_count)
+{
+	 for (int k = 0; k <p_motionmaskcells_count; k++)
+	  {
+	    int beginy = p_motionmaskcellsidx[k].lineidx * m_cellheight;
+	    int beginx = p_motionmaskcellsidx[k].columnidx * m_cellwidth;
+	    int endx = beginx + m_cellwidth;
+	    int endy = beginy + m_cellheight;
+	    for(int i=beginy;i<endy;i++)
+	    	for(int j=beginx;j<endx;j++){
+	    		((uchar*) (m_pbwImage->imageData + m_pbwImage->widthStep * i))[j]=0;
+	    	}
+	  }
+}
+
+void MotionCells::blendImages( IplImage* p_actFrame, IplImage* p_rectFrame,float p_alpha, float p_beta )
+{
+	CvSize actFrameSize = cvGetSize(p_actFrame);
+	CvSize rectFrameSize = cvGetSize(p_rectFrame);
+	if ( actFrameSize.height != rectFrameSize.height &&
+			actFrameSize.width != rectFrameSize.width )
+		throw "not the same size";
+
+	IplImage* greyImage = cvCreateImage(cvGetSize(p_actFrame),IPL_DEPTH_8U,1);
+
+	cvCvtColor(p_rectFrame, greyImage, CV_BGR2GRAY);
+
+	int height		= p_actFrame->height;
+	int width		= p_actFrame->width;
+	int step		= p_actFrame->widthStep;
+	int greyStep	= greyImage->widthStep;
+	int channels	= p_actFrame->nChannels;
+	uchar* curImageData		= (uchar *)p_actFrame->imageData;
+	uchar* recImageData		= (uchar *)p_rectFrame->imageData;
+	uchar* transImageData	= (uchar *)transparentImage->imageData;
+	uchar* greyImageData	= (uchar *)greyImage->imageData;
+
+
+	for(int i=0;i<height;i++)
+		for(int j=0;j<width;j++)
+			for(int k=0;k<channels;k++)
+			{
+				if ( greyImageData[i*greyStep+j] != 0 )
+				{
+					uchar curImgValue = curImageData[i*step+j*channels+k];
+					uchar recImgValue = recImageData[i*step+j*channels+k];
+					uchar transImgValue = (uchar)( curImgValue * p_alpha +
+							recImgValue * p_beta );					
+					transImageData[i*step+j*channels+k]=transImgValue;
+				}
+				else
+				{
+					transImageData[i*step+j*channels+k]=
+							curImageData[i*step+j*channels+k];
+				}
+			}
+	cvReleaseImage(&greyImage );
+}
+
+int MotionCells::calcHistogram(IplImage* p_image){
+
+	int numBins = 256;
+	float range[] = {0, 255};
+	float *ranges[] = { range };
+	float min,max;
+	int minidx,maxidx;
+	CvHistogram *hist = cvCreateHist(1, &numBins, CV_HIST_ARRAY, ranges, 1);
+	cvClearHist(hist);
+    cvCalcHist(&p_image, hist, 0, 0);
+    cvGetMinMaxHistValue(hist,&min,&max,&minidx,&maxidx);
+    //cerr<<"min: "<<min<<" max: "<<max<<" minidx: "<<minidx<<" maxidx: "<<maxidx<<endl;
+
+    return maxidx;
+}
diff --git a/ext/opencv/MotionCells.h b/ext/opencv/MotionCells.h
new file mode 100644
index 0000000..44eec6b
--- /dev/null
+++ b/ext/opencv/MotionCells.h
@@ -0,0 +1,142 @@
+/*
+ * MotionDetection.h
+ *
+ *  Created on: Aug 11, 2010
+ *      Author: rjobbagy
+ */
+
+#ifndef MOTIONCELLS_H_
+#define MOTIONCELLS_H_
+
+#include <cv.h> // includes OpenCV definitions
+#include <highgui.h> // includes highGUI definitions
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <cstdio>
+#include <cmath>
+
+#include "analitics.h"
+
+using namespace std;
+
+struct Cell{
+	double MotionArea;
+	double CellArea;
+	double MotionPercent;
+	bool hasMotion;
+};
+
+struct MotionCellsIdx{
+    CvRect motioncell;
+    //Points for the edges of the rectangle.
+    CvPoint cell_pt1;
+    CvPoint cell_pt2;
+	int lineidx;
+	int colidx;
+};
+
+class MotionCells
+{
+private:
+    IplImage* m_pcurFrame, *m_pprevFrame,* m_pdifferenceImage, *m_ptemp,* m_pbwImage,*transparentImage;
+    CvSize m_frameSize;
+    bool m_isVisible,m_changed_datafile,m_useAlpha,m_saveInDatafile;
+    Cell **m_pCells;
+    vector<MotionCellsIdx> m_MotionCells;
+    int m_gridwidth, m_gridheight;
+    double m_cellwidth, m_cellheight;
+    double m_thresholdBoundingboxArea, m_cellArea,m_sensitivity;
+    int m_framecnt;
+    char* m_motioncellsidxcstr;
+    int m_motioncells_idx_count;
+    FILE *f;
+    MotionCellHeader m_header;
+
+    void setData(IplImage *img, int lin, int col, uchar valor)
+    {
+	((uchar*) (img->imageData + img->widthStep * lin))[col] = valor;
+    }
+
+    uchar getData(IplImage *img, int lin, int col)
+    {
+	return ((uchar*) (img->imageData + img->widthStep * lin))[col];
+    }
+
+    bool getIsNonZero(IplImage *img)
+    {
+	for (int lin = 0; lin < img->height; lin++)
+	    for (int col = 0; col < img->width; col++)
+	    {
+	    	if ((((uchar*) (img->imageData + img->widthStep * lin))[col]) > 0)
+	    		return true;
+	    }
+	return false;
+    }
+
+    void setMotionCells(int p_frameWidth, int p_frameHeight)
+    {
+	m_cellwidth = (double)p_frameWidth / (double)m_gridwidth;
+	m_cellheight = (double)p_frameHeight / (double)m_gridheight;
+	m_pCells = new Cell*[m_gridheight];
+	for (int i = 0; i < m_gridheight; i++)
+	    m_pCells[i] = new Cell[m_gridwidth];
+
+	//init cells
+	for (int i = 0; i < m_gridheight; i++)
+	    for(int j =0; j< m_gridwidth;j++){
+			m_pCells[i][j].MotionArea = 0;
+			m_pCells[i][j].CellArea = 0;
+			m_pCells[i][j].MotionPercent = 0;
+			m_pCells[i][j].hasMotion = false;
+	    }
+    }
+
+    double calculateMotionPercentInCell(int p_row, int p_col,double* p_cellarea,
+    									double* p_motionarea,int *p_endx,int *p_endy);
+    void performMotionMaskCoords(motionmaskcoordrect* p_motionmaskcoords,int p_motionmaskcoords_count);
+    void performMotionMask(motioncellidx* p_motionmaskcellsidx,int p_motionmaskcells_count);
+    void calculateMotionPercentInMotionCells(motioncellidx* p_motionmaskcellsidx,int p_motionmaskcells_count=0);
+    int saveMotionCells(unsigned long int timestamp_millisec);
+    bool initDataFile(char* p_datafile);
+    void blendImages( IplImage* p_actFrame, IplImage* p_rectFrame,float p_alpha, float p_beta);
+    int calcHistogram(IplImage* p_image);
+
+public:
+
+    MotionCells();
+    virtual ~MotionCells();
+
+    bool performDetectionMotionCells(IplImage *p_frame,double p_sensitivity,double p_framerate,
+    		int p_gridheight, int p_gridwidth,unsigned long int timestamp_millisec,bool p_isVisble,
+    		bool p_useAlpha,int motionmaskcoord_count,motionmaskcoordrect* motionmaskcoords,
+    		int motionmaskcells_count,motioncellidx* motionmaskcellsidx,cellscolor* motioncellscolor,
+    		int motioncells_count,motioncellidx* motioncellsidx,char *datafile,
+    		bool p_changed_datafile,int p_thickness);
+
+    void setPrevFrame(IplImage* p_prevframe){
+    	m_pprevFrame = cvCloneImage(p_prevframe);
+    }
+    char* getMotionCellsIdx(){
+	return m_motioncellsidxcstr;
+    }
+
+    int getMotionCellsIdxCount(){
+    	return m_motioncells_idx_count;
+    }
+
+    bool getChangedDataFile(){
+    	return m_changed_datafile;
+    }
+
+    void freeDataFile(){
+    	if(f){    		
+			fflush(f);
+			fclose(f);
+			m_saveInDatafile = false;
+    	}
+    }
+};
+
+#endif /* MOTIONCELLS_H_ */
+
diff --git a/ext/opencv/analitics.h b/ext/opencv/analitics.h
new file mode 100644
index 0000000..651ae3c
--- /dev/null
+++ b/ext/opencv/analitics.h
@@ -0,0 +1,43 @@
+#ifndef ANALITICS_H_
+#define ANALITICS_H_
+
+//MotionCells defines
+#define MC_HEADER 64
+#define MC_TYPE 1
+#define MC_VERSION 1
+#define MC_VERSIONTEXT "MotionCells-1"
+#define MSGLEN 6
+
+struct MotionCellHeader{
+	int headersize;
+	int type;
+	int version;
+	int itemsize;
+	short gridx;
+	short gridy;
+	char name[MC_HEADER - 20];
+};
+
+struct MotionCellData{
+	unsigned int timestamp;
+	char *data;
+};
+
+typedef struct {
+	int upper_left_x;
+	int upper_left_y;
+	int lower_right_x;
+	int lower_right_y;
+} motionmaskcoordrect;
+
+typedef struct {
+	int R_channel_value;
+	int G_channel_value;
+	int B_channel_value;
+} cellscolor;
+
+typedef struct {
+	int lineidx;
+	int columnidx;
+} motioncellidx;
+#endif /* ANALITICS_H_ */
diff --git a/ext/opencv/gstmotioncells.c b/ext/opencv/gstmotioncells.c
new file mode 100644
index 0000000..7a472da
--- /dev/null
+++ b/ext/opencv/gstmotioncells.c
@@ -0,0 +1,844 @@
+/*
+ * GStreamer
+ * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
+ * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Alternatively, the contents of this file may be used under the
+ * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
+ * which case the following provisions apply instead of the ones
+ * mentioned above:
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:element-motioncells
+ *
+ * FIXME:Describe motioncells here.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-0.10 videotestsrc ! decodebin ! ffmpegcolorspace ! motioncells ! ffmpegcolorspace ! xvimagesink
+ * ]|
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <glib.h>
+#include "gstmotioncells.h"
+#include "motioncells_wrapper.h"
+
+GST_DEBUG_CATEGORY_STATIC( gst_motioncells_debug);
+#define GST_CAT_DEFAULT gst_motioncells_debug
+
+#define GRID_DEF 10
+#define GRID_MIN 8
+#define GRID_MAX 32
+#define SENSITIVITY_DEFAULT 0.5
+#define SENSITIVITY_MIN 0
+#define SENSITIVITY_MAX 1
+#define THRESHOLD_MIN 0
+#define THRESHOLD_DEFAULT 0.01
+#define THRESHOLD_MAX 1.0
+#define GAP_MIN 1
+#define GAP_DEF 5
+#define GAP_MAX 60
+#define THICKNESS_MIN -1
+#define THICKNESS_DEF 1
+#define THICKNESS_MAX 5
+
+int instanceCounter = 0;
+int datafileidx = 0;
+
+/* Filter signals and args */
+enum {
+	/* FILL ME */
+	LAST_SIGNAL
+};
+
+enum {
+	PROP_0,
+	PROP_GRID_X,
+	PROP_GRID_Y,
+	PROP_SENSITIVITY,
+	PROP_THRESHOLD,
+	PROP_DISPLAY,
+	PROP_DATAFILE,
+	PROP_DATAFILE_EXT,
+	PROP_MOTIONMASKCOORD,
+	PROP_MOTIONMASKCELLSPOS,
+	PROP_CELLSCOLOR,
+	PROP_MOTIONCELLSIDX,
+	PROP_GAP,
+	PROP_CALCULATEMOTION,
+	PROP_POSTALLMOTION,
+	PROP_USEALPHA,
+	PROP_MOTIONCELLTHICKNESS
+};
+
+/* the capabilities of the inputs and outputs.
+ */
+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE("sink",
+		GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS("video/x-raw-rgb"));
+
+static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE("src",
+		GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS("video/x-raw-rgb"));
+
+GST_BOILERPLATE(Gstmotioncells, gst_motioncells, GstElement, GST_TYPE_ELEMENT);
+
+static void gst_motioncells_set_property(GObject * object, guint prop_id,
+		const GValue * value, GParamSpec * pspec);
+static void gst_motioncells_get_property(GObject * object, guint prop_id,
+		GValue * value, GParamSpec * pspec);
+
+static gboolean gst_motioncells_set_caps(GstPad * pad, GstCaps * caps);
+static GstFlowReturn gst_motioncells_chain(GstPad * pad, GstBuffer * buf);
+
+/* Clean up */
+static void gst_motioncells_finalize(GObject * obj) {
+	Gstmotioncells *filter = GST_MOTIONCELLS (obj);
+
+	motion_cells_free(filter->id);
+
+	//freeing previously allocated overlay region array
+	if (filter->motionmaskcoord_count > 0) {
+	    g_free(filter->motionmaskcoords);
+	}
+
+	if(filter->motionmaskcells_count>0){
+	    g_free(filter->motionmaskcellsidx);
+	}
+	if (filter->motioncells_count > 0) {
+	    g_free(filter->motioncellsidx);
+	}
+
+	if (filter->cvImage) {
+		cvReleaseImage(&filter->cvImage);
+	}
+
+	if(filter->prev_datafile)
+		g_free(filter->prev_datafile);
+	if(filter->cur_datafile)
+		g_free(filter->cur_datafile);
+	if(filter->copy_datafile)
+		g_free(filter->copy_datafile);
+	if(filter->datafile_extension)
+		g_free(filter->datafile_extension);
+	g_free(filter->motioncellscolor);
+
+	G_OBJECT_CLASS(parent_class)->finalize(obj);
+}
+
+/* GObject vmethod implementations */
+static void gst_motioncells_base_init(gpointer gclass) {
+	GstElementClass *element_class = GST_ELEMENT_CLASS(gclass);
+
+	gst_element_class_set_details_simple(
+			element_class,
+			"motioncells",
+			"Filter/Effect/Video",
+			"Performs motion detection on videos and images, providing detected motion cells index via bus messages",
+			"Robert Jobbagy <jobbagy dot robert at gmail dot com>");
+
+	gst_element_class_add_pad_template(element_class,
+			gst_static_pad_template_get(&src_factory));
+	gst_element_class_add_pad_template(element_class,
+			gst_static_pad_template_get(&sink_factory));
+}
+
+/* initialize the motioncells's class */
+static void gst_motioncells_class_init(GstmotioncellsClass * 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->finalize = GST_DEBUG_FUNCPTR(gst_motioncells_finalize);
+	gobject_class->set_property = gst_motioncells_set_property;
+	gobject_class->get_property = gst_motioncells_get_property;
+
+	g_object_class_install_property(gobject_class, PROP_GRID_X,
+			g_param_spec_int("gridx", "GRID X", "Motion Grid X", GRID_MIN,
+					GRID_MAX, GRID_DEF, G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_GRID_Y,
+			g_param_spec_int("gridy", "GRID X", "Motion Grid Y", GRID_MIN,
+					GRID_MAX, GRID_DEF, G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_SENSITIVITY,
+			g_param_spec_double("sensitivity", "SENSITIVITY",
+					"Motion CELLS SENSITIVITY", SENSITIVITY_MIN,
+					SENSITIVITY_MAX, SENSITIVITY_DEFAULT, G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_THRESHOLD,
+			g_param_spec_double("threshold", "THRESHOLD",
+					"Threshold of Motion CELLS Number", THRESHOLD_MIN,
+					THRESHOLD_MAX, THRESHOLD_DEFAULT, G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_GAP,
+				g_param_spec_int("gap", "GAP", "GAP between clips", GAP_MIN,
+						GAP_MAX, GAP_DEF, G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_DISPLAY,
+			g_param_spec_boolean("display", "Display",
+					"Motion Cells visible or not on Current Frame", TRUE,
+					G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_POSTALLMOTION,
+			g_param_spec_boolean("postallmotion", "Post All Motion",
+					"Element post bus msg for every motion frame or just motion start and motion stop", FALSE,
+					G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_USEALPHA,
+			g_param_spec_boolean("usealpha", "Use alpha",
+					"Use or not alpha blending because it cause flicking on frames, it has some bug", FALSE,
+					G_PARAM_READWRITE));
+	g_object_class_install_property (gobject_class, PROP_DATAFILE,
+			g_param_spec_string ("datafile", "DataFile",
+					"Location of motioncells data file (empty string means no saving)",
+					"", G_PARAM_READWRITE));
+	g_object_class_install_property (gobject_class, PROP_DATAFILE_EXT,
+				g_param_spec_string ("datafileextension", "DataFile Extension",
+						"Extension of datafile","", G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_MOTIONMASKCOORD,
+			g_param_spec_string ("motionmaskcoords", "Motion Mask with Coordinates",
+					"The upper left x, y and lower right x, y coordinates separated with \":\", "
+					"describe a region. Regions separated with \",\"",
+					"", G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_MOTIONMASKCELLSPOS,
+			g_param_spec_string ("motionmaskcellspos", "Motion Mask with Cells Position",
+					"The line and column idx separated with \":\" what cells want we mask-out, "
+					"describe a cell. Cells separated with \",\"",
+					"", G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_CELLSCOLOR,
+			g_param_spec_string ("cellscolor", "Color of Motion Cells",
+					"The color of motion cells separated with \",\"",
+					"", G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_MOTIONCELLSIDX,
+			g_param_spec_string ("motioncellsidx", "Motion Cells Of Interest(MOCI)",
+					"The line and column idx separated with \":\", "
+					"describe a cell. Cells separated with \",\"",
+					"", G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_CALCULATEMOTION,
+				g_param_spec_boolean("calculatemotion", "Calculate Motion",
+						"If needs calculate motion on frame you need this property setting true otherwise false", TRUE,
+						G_PARAM_READWRITE));
+	g_object_class_install_property(gobject_class, PROP_MOTIONCELLTHICKNESS,
+			g_param_spec_int("motioncellthickness", "Motion Cell Thickness", "Motion Cell Border Thickness, if it's -1 then motion cell will be fill", THICKNESS_MIN,
+					THICKNESS_MAX, THICKNESS_DEF, G_PARAM_READWRITE));
+}
+
+/* initialize the new element
+ * instantiate pads and add them to element
+ * set pad callback functions
+ * initialize instance structure
+ */
+static void gst_motioncells_init(Gstmotioncells * filter,
+		GstmotioncellsClass * gclass) {
+	filter->sinkpad = gst_pad_new_from_static_template(&sink_factory, "sink");
+	gst_pad_set_setcaps_function(filter->sinkpad, GST_DEBUG_FUNCPTR(
+			gst_motioncells_set_caps));
+	gst_pad_set_getcaps_function(filter->sinkpad, GST_DEBUG_FUNCPTR(
+			gst_pad_proxy_getcaps));
+	gst_pad_set_chain_function(filter->sinkpad, GST_DEBUG_FUNCPTR(
+			gst_motioncells_chain));
+
+	filter->srcpad = gst_pad_new_from_static_template(&src_factory, "src");
+	gst_pad_set_getcaps_function(filter->srcpad, GST_DEBUG_FUNCPTR(
+			gst_pad_proxy_getcaps));
+
+	gst_element_add_pad(GST_ELEMENT(filter), filter->sinkpad);
+	gst_element_add_pad(GST_ELEMENT(filter), filter->srcpad);
+	filter->display = TRUE;
+	filter->calculate_motion = TRUE;
+
+	filter->prevgridx = 0;
+	filter->prevgridy = 0;
+	filter->gridx = GRID_DEF;
+	filter->gridy = GRID_DEF;
+	filter->gap = GAP_DEF;
+
+	filter->prev_datafile = g_strdup(" ");
+	filter->cur_datafile = g_strdup(" ");
+	filter->datafile_extension = g_strdup("vamc");
+	filter->sensitivity = SENSITIVITY_DEFAULT;
+	filter->threshold = THRESHOLD_DEFAULT;
+
+	filter->motionmaskcoord_count = 0;
+	filter->motionmaskcoords = NULL;
+	filter->motionmaskcells_count = 0;
+	filter->motionmaskcellsidx = NULL;
+	filter->motioncellscolor = (cellscolor*) g_malloc(sizeof(cellscolor));
+	filter->motioncellscolor->R_channel_value = 255;
+	filter->motioncellscolor->G_channel_value = 255;
+	filter->motioncellscolor->B_channel_value = 0;
+	filter->motioncellsidx = NULL;
+	filter->motioncells_count = 0;
+	filter->motion_begin_timestamp = 0;
+	filter->last_motion_timestamp = 0;
+	filter->motion_timestamp = 0;
+	filter->previous_motion = false;
+	filter->changed_datafile = false;
+	filter->postallmotion = false;
+	filter->usealpha = false;
+	filter->firstdatafile = false;
+	filter->firstgridx = true;
+	filter->firstgridy = true;
+	filter->changed_gridx = false;
+	filter->changed_gridy = false;
+	filter->firstframe = true;
+	filter->thickness = THICKNESS_DEF;
+
+	filter->id = instanceCounter;
+	motion_cells_init();
+
+}
+
+static void gst_motioncells_set_property(GObject * object, guint prop_id,
+		const GValue * value, GParamSpec * pspec) {
+	Gstmotioncells *filter = GST_MOTIONCELLS (object);
+	//variables for overlay regions setup
+	gchar **strs,**colorstr,**motioncellsstr,**motionmaskcellsstr;
+	int i,ux, uy, lx, ly;
+	int r,g,b;
+	int linidx,colidx,masklinidx,maskcolidx;
+	int tmpux = -1;
+	int tmpuy = -1;
+	int tmplx = -1;
+	int tmply = -1;
+	int sizecur = 0;
+	int sizeprev = 0;
+	int lesssize = 0;
+	int sizedatafileext = 0;
+	char* tmp_datfileext;
+
+	switch (prop_id) {
+	case PROP_GRID_X:
+		filter->gridx = g_value_get_int(value);
+		if(filter->prevgridx != filter->gridx){
+			filter->changed_gridx = true;
+			filter->prevgridx = filter->gridx;
+		}
+		break;
+	case PROP_GRID_Y:
+		filter->gridy = g_value_get_int(value);
+		if(filter->prevgridy != filter->gridy){
+			filter->changed_gridy = true;
+			filter->prevgridy = filter->gridy;
+		}
+		break;
+	case PROP_GAP:
+		filter->gap = g_value_get_int(value);
+		break;
+	case PROP_SENSITIVITY:
+		filter->sensitivity = g_value_get_double(value);
+		break;
+	case PROP_THRESHOLD:
+		filter->threshold = g_value_get_double(value);
+		break;
+	case PROP_DISPLAY:
+		filter->display = g_value_get_boolean(value);
+		break;
+	case PROP_POSTALLMOTION:
+		filter->postallmotion = g_value_get_boolean(value);
+		break;
+	case PROP_USEALPHA:
+		filter->usealpha = g_value_get_boolean(value);
+		break;
+	case PROP_CALCULATEMOTION:
+		filter->calculate_motion = g_value_get_boolean(value);
+		break;
+	case PROP_DATAFILE:
+		if(filter->cur_datafile && strncmp(filter->cur_datafile," ",1)!=0){
+			g_free(filter->cur_datafile);
+		}
+		filter->cur_datafile = g_value_dup_string(value);
+		sizecur = strlen(filter->cur_datafile);
+		if(sizecur == 0)
+			break;
+		if(filter->copy_datafile && strncmp(filter->copy_datafile," ",1)!=0){
+			g_free(filter->copy_datafile);
+			filter->copy_datafile = (char*)g_malloc((sizecur+1) * sizeof(char));
+		}else if(filter->copy_datafile == NULL){
+			filter->copy_datafile = (char*)g_malloc((sizecur+1) * sizeof(char));
+		}
+
+		strncpy(filter->copy_datafile,filter->cur_datafile,sizecur+1);
+		g_free(filter->cur_datafile);
+		sizedatafileext = strlen(filter->datafile_extension);
+		filter->cur_datafile = (char*)g_malloc((sizecur+4+sizedatafileext) * sizeof(char));//strlen(cur_datafile)+1+strlen("-0.")+strlen("vamc or other extension length")
+		strncpy(filter->cur_datafile,filter->copy_datafile,sizecur+1);
+		strcat(filter->cur_datafile,"-0.");
+		strcat(filter->cur_datafile,filter->datafile_extension);
+
+		sizeprev = strlen(filter->prev_datafile);
+		(sizecur > sizeprev)?(lesssize = sizeprev):(lesssize = sizecur);
+		if(strncmp(filter->prev_datafile,filter->cur_datafile,lesssize)!=0)
+		{
+			filter->changed_datafile = TRUE;
+			datafileidx = 0;
+			filter->datafilelen = strlen(filter->cur_datafile);
+			filter->datafilelen +=3;//it's necessary if datafile idx grow 4 digit length ( 0 - 9999 )
+			motion_cells_free_resources(filter->id);
+		}else
+		{
+			filter->changed_datafile = FALSE;
+		}
+		g_free(filter->prev_datafile);
+		filter->prev_datafile = (char*)g_malloc((sizecur+1) * sizeof(char));
+		strncpy(filter->prev_datafile,filter->cur_datafile,sizecur+1);
+		break;
+	case PROP_DATAFILE_EXT:
+		tmp_datfileext = g_value_dup_string(value);
+		if(strncmp(tmp_datfileext," ",1)!=0){
+			g_free(filter->datafile_extension);
+			sizedatafileext = strlen(tmp_datfileext);
+			filter->datafile_extension = (char*)g_malloc((sizedatafileext+1) * sizeof(char));
+			strncpy(filter->datafile_extension,tmp_datfileext,(sizedatafileext+1));
+		}else{
+			sizedatafileext = strlen(filter->datafile_extension);
+		}
+		break;
+	case PROP_MOTIONMASKCOORD:
+		strs = g_strsplit(g_value_get_string(value), ",", 255);
+
+		//setting number of regions
+		for (filter->motionmaskcoord_count = 0; strs[filter->motionmaskcoord_count] != NULL; ++filter->motionmaskcoord_count)
+		 ;
+		sscanf(strs[0], "%d:%d:%d:%d", &tmpux, &tmpuy, &tmplx, &tmply);
+		if(tmpux>-1 && tmpuy>-1 && tmplx>-1 && tmply>-1){
+			filter->motionmaskcoords =
+					(motionmaskcoordrect*) g_malloc(filter->motionmaskcoord_count * sizeof(motionmaskcoordrect));
+
+			for (i = 0; i < filter->motionmaskcoord_count; ++i) {
+				sscanf(strs[i], "%d:%d:%d:%d", &ux, &uy, &lx, &ly);
+				filter->motionmaskcoords[i].upper_left_x = ux;
+				filter->motionmaskcoords[i].upper_left_y = uy;
+				filter->motionmaskcoords[i].lower_right_x = lx;
+				filter->motionmaskcoords[i].lower_right_y = ly;
+			}
+		}else{
+			filter->motionmaskcoord_count = 0;
+		}
+		if (strs) g_strfreev(strs);
+		tmpux = -1;
+		tmpuy = -1;
+		tmplx = -1;
+		tmply = -1;
+		break;
+	case PROP_MOTIONMASKCELLSPOS:
+		motionmaskcellsstr = g_strsplit(g_value_get_string(value), ",", 255);
+
+		//setting number of regions
+		for (filter->motionmaskcells_count = 0; motionmaskcellsstr[filter->motionmaskcells_count] != NULL; ++filter->motionmaskcells_count)
+		 ;
+		sscanf(motionmaskcellsstr[0], "%d:%d", &tmpux, &tmpuy);
+		if(tmpux>-1 && tmpuy>-1){
+			filter->motionmaskcellsidx =
+					(motioncellidx*) g_malloc(filter->motionmaskcells_count * sizeof(motioncellidx));
+			for (i = 0; i < filter->motionmaskcells_count; ++i) {
+				sscanf(motionmaskcellsstr[i], "%d:%d", &masklinidx,&maskcolidx);
+				filter->motionmaskcellsidx[i].lineidx=masklinidx;
+				filter->motionmaskcellsidx[i].columnidx=maskcolidx;
+			}
+		}else{
+			filter->motionmaskcells_count = 0;
+		}
+		if (motionmaskcellsstr) g_strfreev(motionmaskcellsstr);
+		tmpux = -1;
+		tmpuy = -1;
+		tmplx = -1;
+		tmply = -1;
+		break;
+	case PROP_CELLSCOLOR:
+
+		colorstr = g_strsplit(g_value_get_string(value), ",", 255);
+		sscanf(colorstr[0], "%d", &r);
+		sscanf(colorstr[1], "%d", &g);
+		sscanf(colorstr[2], "%d", &b);
+		//check right RGB color format
+		(r < 0) ? r = 0 : (r > 255) ? r = 255 : 0 ;
+		(g < 0) ? g = 0 : (g > 255) ? g = 255 : 0 ;
+		(b < 0) ? b = 0 : (b > 255) ? b = 255 : 0 ;
+		filter->motioncellscolor->R_channel_value = r;
+		filter->motioncellscolor->G_channel_value = g;
+		filter->motioncellscolor->B_channel_value = b;
+		if (colorstr) g_strfreev(colorstr);
+		break;
+	case PROP_MOTIONCELLSIDX:
+		motioncellsstr = g_strsplit(g_value_get_string(value), ",", 255);
+
+		//setting number of regions
+		for (filter->motioncells_count = 0; motioncellsstr[filter->motioncells_count] != NULL; ++filter->motioncells_count)
+		 ;
+
+		sscanf(motioncellsstr[0], "%d:%d", &tmpux, &tmpuy);
+		if(tmpux>-1 && tmpuy>-1){
+			if(filter->motioncellsidx)
+			    g_free(filter->motioncellsidx);
+
+			filter->motioncellsidx =
+					(motioncellidx*) g_malloc(filter->motioncells_count * sizeof(motioncellidx));
+			
+			for (i = 0; i < filter->motioncells_count; ++i) {
+				sscanf(motioncellsstr[i], "%d:%d", &linidx,&colidx);
+				filter->motioncellsidx[i].lineidx=linidx;
+				filter->motioncellsidx[i].columnidx=colidx;
+			}
+		}else{
+			filter->motioncells_count = 0;
+		}
+		if (motioncellsstr) g_strfreev(motioncellsstr);
+		tmpux = -1;
+		tmpuy = -1;
+		tmplx = -1;
+		tmply = -1;
+		break;
+	case PROP_MOTIONCELLTHICKNESS:
+		filter->thickness = g_value_get_int(value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+		break;
+	}
+}
+
+static void gst_motioncells_get_property(GObject * object, guint prop_id,
+		GValue * value, GParamSpec * pspec) {
+	Gstmotioncells *filter = GST_MOTIONCELLS (object);
+	GString *str, *substr;
+	gboolean first;
+	int i;
+
+	switch (prop_id) {
+	case PROP_GRID_X:
+		g_value_set_int(value, filter->gridx);
+		break;
+	case PROP_GRID_Y:
+		g_value_set_int(value, filter->gridy);
+		break;
+	case PROP_GAP:
+		g_value_set_int(value,filter->gap);
+		break;
+	case PROP_SENSITIVITY:
+		g_value_set_double(value, filter->sensitivity);
+		break;
+	case PROP_THRESHOLD:
+		g_value_set_double(value,filter->threshold);
+		break;
+	case PROP_DISPLAY:
+		g_value_set_boolean(value, filter->display);
+		break;
+	case PROP_POSTALLMOTION:
+		g_value_set_boolean(value, filter->postallmotion);
+		break;
+	case PROP_USEALPHA:
+		g_value_set_boolean(value, filter->usealpha);
+		break;
+	case PROP_CALCULATEMOTION:
+		g_value_set_boolean(value, filter->calculate_motion);
+		break;
+	case PROP_DATAFILE:
+		g_value_set_string (value, filter->cur_datafile);
+		break;
+	case PROP_DATAFILE_EXT:
+		g_value_set_string (value, filter->datafile_extension);
+		break;
+	case PROP_MOTIONMASKCOORD:
+		str = g_string_new("");
+		first = TRUE;
+		for (i=0; i < filter->motionmaskcoord_count; ++i) {
+		    substr = g_string_new(NULL);
+		    g_string_printf(substr, "%d:%d:%d:%d",
+				    filter->motionmaskcoords[i].upper_left_x,
+				    filter->motionmaskcoords[i].upper_left_y,
+				    filter->motionmaskcoords[i].lower_right_x,
+				    filter->motionmaskcoords[i].lower_right_y);
+		    if (first)
+			    first = FALSE;
+		    else
+			    g_string_append_c(str, ',');
+		    g_string_append(str, substr->str);
+		    g_string_free(substr, TRUE);
+		}
+		g_value_set_string(value, str->str);
+		g_string_free(str, TRUE);
+		break;
+	case PROP_MOTIONMASKCELLSPOS:
+		str = g_string_new("");
+		first = TRUE;
+		for (i=0; i < filter->motionmaskcells_count; ++i) {
+		    substr = g_string_new(NULL);
+		    g_string_printf(substr, "%d:%d",
+				    filter->motionmaskcellsidx[i].lineidx,
+				    filter->motionmaskcellsidx[i].columnidx);
+		    if (first)
+			    first = FALSE;
+		    else
+			    g_string_append_c(str, ',');
+		    g_string_append(str, substr->str);
+		    g_string_free(substr, TRUE);
+		}
+		g_value_set_string(value, str->str);
+		g_string_free(str, TRUE);
+		break;
+	case PROP_CELLSCOLOR:
+		str = g_string_new("");
+
+		g_string_printf(str, "%d,%d,%d",
+		filter->motioncellscolor->R_channel_value,
+		filter->motioncellscolor->G_channel_value,
+		filter->motioncellscolor->B_channel_value);
+
+		g_value_set_string(value, str->str);
+		g_string_free(str, TRUE);
+		break;
+	case PROP_MOTIONCELLSIDX:
+		str = g_string_new("");
+		first = TRUE;
+		for (i=0; i < filter->motioncells_count; ++i) {
+			substr = g_string_new(NULL);
+			g_string_printf(substr, "%d:%d",
+					filter->motioncellsidx[i].lineidx,
+					filter->motioncellsidx[i].columnidx);
+			if (first)
+				first = FALSE;
+			else
+				g_string_append_c(str, ',');
+			g_string_append(str, substr->str);
+			g_string_free(substr, TRUE);
+		}
+		g_value_set_string(value, str->str);
+		g_string_free(str, TRUE);
+		break;
+	case PROP_MOTIONCELLTHICKNESS:
+		g_value_set_int(value, filter->thickness);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+		break;
+	}
+}
+
+/* GstElement vmethod implementations */
+
+/* this function handles the link with other elements */
+static gboolean gst_motioncells_set_caps(GstPad * pad, GstCaps * caps) {
+	Gstmotioncells *filter;
+	GstPad *otherpad;
+	gint width, height;
+	GstStructure *structure;
+	int numerator,denominator;
+
+	filter = GST_MOTIONCELLS (gst_pad_get_parent (pad));
+	structure = gst_caps_get_structure(caps, 0);
+	gst_structure_get_int(structure, "width", &width);
+	gst_structure_get_int(structure, "height", &height);
+	gst_structure_get_fraction(structure,"framerate",&numerator,&denominator);
+	filter->framerate=(double)numerator/(double)denominator;
+	filter->cvImage = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 3);
+
+	otherpad = (pad == filter->srcpad) ? filter->sinkpad : filter->srcpad;
+	gst_object_unref(filter);
+
+	return gst_pad_set_caps(otherpad, caps);
+}
+
+/* chain function
+ * this function does the actual processing
+ */
+static GstFlowReturn gst_motioncells_chain(GstPad * pad, GstBuffer * buf) {
+
+	Gstmotioncells *filter;
+
+	filter = GST_MOTIONCELLS (GST_OBJECT_PARENT (pad));
+	if(filter->calculate_motion){
+		double sensitivity;
+		int framerate,gridx,gridy,motionmaskcoord_count,motionmaskcells_count,motioncells_count;
+		int sizedatafile,thickness,i,sizedatfilext,tmpstrsize,motioncellsidxcnt,numberOfCells;
+		int motioncellsnumber,cellsOfInterestNumber,mincellsOfInterestNumber,motiondetect;
+		bool display,changed_datafile,useAlpha,success;
+		char* datafile,*tmpstr;
+		motionmaskcoordrect *motionmaskcoords;
+		motioncellidx* motionmaskcellsidx,* motioncellsidx;
+		cellscolor* motioncellscolor;
+		buf = gst_buffer_make_writable(buf);
+		filter->cvImage->imageData = (char *) GST_BUFFER_DATA(buf);
+		if(filter->firstframe){
+			setPrevFrame(filter->cvImage,filter->id);			
+			filter->firstframe = FALSE;
+		}
+
+		sensitivity = filter->sensitivity;
+		framerate = filter->framerate;
+		gridx = filter->gridx;
+		gridy = filter->gridy;
+		display = filter->display;
+		motionmaskcoord_count = filter->motionmaskcoord_count;
+		motionmaskcoords =(motionmaskcoordrect*)g_malloc(filter->motionmaskcoord_count * sizeof(motionmaskcoordrect));
+		for(i=0;i<filter->motionmaskcoord_count;i++){
+			motionmaskcoords[i].upper_left_x = filter->motionmaskcoords[i].upper_left_x;
+			motionmaskcoords[i].upper_left_y = filter->motionmaskcoords[i].upper_left_y;
+			motionmaskcoords[i].lower_right_x = filter->motionmaskcoords[i].lower_right_x;
+			motionmaskcoords[i].lower_right_y = filter->motionmaskcoords[i].lower_right_y;
+		}
+		motionmaskcells_count = filter->motionmaskcells_count;
+		motionmaskcellsidx = (motioncellidx*)g_malloc(filter->motionmaskcells_count * sizeof(motioncellidx));
+		for(i=0;i<filter->motionmaskcells_count;i++){
+			motionmaskcellsidx[i].lineidx = filter->motionmaskcellsidx[i].lineidx;
+			motionmaskcellsidx[i].columnidx = filter->motionmaskcellsidx[i].columnidx;
+		}
+		motioncellscolor =(cellscolor*)g_malloc(sizeof(cellscolor));
+		motioncellscolor->R_channel_value = filter->motioncellscolor->R_channel_value;
+		motioncellscolor->G_channel_value = filter->motioncellscolor->G_channel_value;
+		motioncellscolor->B_channel_value = filter->motioncellscolor->B_channel_value;
+		motioncells_count = filter->motioncells_count;
+		motioncellsidx =(motioncellidx*)g_malloc(filter->motioncells_count*sizeof(motioncellidx));
+		for(i=0;i<filter->motioncells_count;i++){
+			motioncellsidx[i].lineidx = filter->motioncellsidx[i].lineidx;
+			motioncellsidx[i].columnidx = filter->motioncellsidx[i].columnidx;
+		}
+
+		if((filter->changed_gridx || filter->changed_gridy) && (strncmp(filter->cur_datafile," ",1) != 0)){
+			g_free(filter->cur_datafile);
+			filter->cur_datafile = (char*) g_malloc((filter->datafilelen+1) * sizeof(char));
+			strncpy(filter->cur_datafile,filter->copy_datafile,filter->datafilelen+1);
+			datafileidx++;
+			sizedatfilext = strlen(filter->datafile_extension);
+			tmpstrsize = 5 + sizedatfilext + 1;
+			tmpstr = (char*)malloc(tmpstrsize * sizeof(char));//xxxx.+strlen(data file extension size)
+			snprintf(tmpstr,tmpstrsize,"-%d.%s",datafileidx,filter->datafile_extension);
+			strcat(filter->cur_datafile,tmpstr);
+			filter->changed_datafile = TRUE;
+			filter->changed_gridx = FALSE;
+			filter->changed_gridy = FALSE;
+		}else{
+			filter->changed_gridx = FALSE;
+			filter->changed_gridy = FALSE;
+		}
+		sizedatafile = strlen(filter->cur_datafile);
+		datafile = (char*) g_malloc((sizedatafile+1) * sizeof(char));
+		strncpy(datafile,filter->cur_datafile,sizedatafile+1);
+		changed_datafile = filter->changed_datafile;
+		useAlpha = filter->usealpha;
+		thickness = filter->thickness;
+		success = perform_detection_motion_cells(filter->cvImage,sensitivity,framerate,
+				gridx, gridy,(unsigned long int) (GST_BUFFER_TIMESTAMP(buf)/GST_MSECOND),
+				display,useAlpha,motionmaskcoord_count, motionmaskcoords,
+				motionmaskcells_count,motionmaskcellsidx,motioncellscolor,
+				motioncells_count,motioncellsidx,datafile,changed_datafile,thickness,filter->id );
+		if(!success){
+			GstStructure *s = gst_structure_new ("motion", "motion_cells_datafile_init_failed",NULL);
+			GstMessage *m = gst_message_new_element (GST_OBJECT (filter), s);
+			gst_element_post_message (GST_ELEMENT (filter), m);
+		}
+		filter->changed_datafile = getChangedDataFile(filter->id);
+		motioncellsidxcnt = getMotionCellsIdxCnt(filter->id);
+		numberOfCells = filter->gridx * filter->gridy;
+		motioncellsnumber = motioncellsidxcnt / MSGLEN;
+		cellsOfInterestNumber = (filter->motioncells_count > 0)?//how many cells interest for us
+									(filter->motioncells_count):
+									(numberOfCells);
+		mincellsOfInterestNumber = floor((double)cellsOfInterestNumber * filter->threshold);
+		motiondetect = (motioncellsnumber>=mincellsOfInterestNumber) ? 1 : 0;
+		if(motioncellsidxcnt > 0 && filter->postallmotion){
+			char motion_timestamp_str[10];//timestamp never will be longer then 9 digits
+			GstStructure *s;
+			GstMessage *m;
+			char* detectedmotioncells = (char*) g_malloc(motioncellsidxcnt * sizeof(char));
+			detectedmotioncells = getMotionCellsIdx(filter->id);
+			filter->motion_timestamp = (unsigned long int)(GST_BUFFER_TIMESTAMP(buf) / 1000000000l);
+			snprintf(motion_timestamp_str,9,"%lu",filter->motion_timestamp);
+			s = gst_structure_new ("motion", "motion_cells_indices", G_TYPE_STRING, detectedmotioncells,
+															"motion",G_TYPE_STRING,motion_timestamp_str,NULL);
+			m = gst_message_new_element (GST_OBJECT (filter), s);
+			gst_element_post_message (GST_ELEMENT (filter), m);
+
+		}
+		if (motioncellsidxcnt > 0 && motiondetect == 1) {
+			char* detectedmotioncells;
+			filter->last_motion_timestamp = (unsigned long int)(GST_BUFFER_TIMESTAMP(buf) / 1000000000l);
+			detectedmotioncells = (char*) g_malloc(motioncellsidxcnt * sizeof(char));
+			detectedmotioncells = getMotionCellsIdx(filter->id);
+			GST_DEBUG("POST MOTION MSG\n");
+			if(filter->previous_motion == false){
+				char motion_begin_timestamp_str[10];
+				GstStructure *s;
+				GstMessage *m;
+				filter->previous_motion = true;
+				filter->motion_begin_timestamp = (unsigned long int)(GST_BUFFER_TIMESTAMP(buf) / 1000000000l);
+				snprintf(motion_begin_timestamp_str,9,"%lu",filter->motion_begin_timestamp);
+				s = gst_structure_new ("motion", "motion_cells_indices", G_TYPE_STRING, detectedmotioncells,
+																"motion_begin",G_TYPE_STRING,motion_begin_timestamp_str,NULL);
+				m = gst_message_new_element (GST_OBJECT (filter), s);
+				gst_element_post_message (GST_ELEMENT (filter), m);
+			}
+		}else{//not detect motion
+			if((((unsigned long int)(GST_BUFFER_TIMESTAMP(buf) / 1000000000l) - filter->last_motion_timestamp) >= filter->gap)
+					&& (filter->last_motion_timestamp>0)){
+				char last_motion_timestamp_str[10];
+				GST_DEBUG("POST MOTION FINISHED MSG\n");
+				snprintf(last_motion_timestamp_str,9,"%ld",filter->last_motion_timestamp);
+				if(filter->previous_motion){
+					GstStructure *s;
+					GstMessage *m;
+					filter->previous_motion = false;
+					s = gst_structure_new ("motion", "motion_finished", G_TYPE_STRING,last_motion_timestamp_str , NULL);
+					m = gst_message_new_element (GST_OBJECT (filter), s);
+					gst_element_post_message (GST_ELEMENT (filter), m);
+				}
+			}
+		}
+	}
+
+	return gst_pad_push(filter->srcpad, buf);
+}
+
+/* entry point to initialize the plug-in
+ * initialize the plug-in itself
+ * register the element factories and other features
+ */
+gboolean gst_motioncells_plugin_init(GstPlugin * plugin) {
+	/* debug category for fltering log messages */
+	GST_DEBUG_CATEGORY_INIT(
+			gst_motioncells_debug,
+			"motioncells",
+			0,
+			"Performs motion detection on videos, providing detected positions via bus messages");
+
+	return gst_element_register(plugin, "motioncells", GST_RANK_NONE,
+			GST_TYPE_MOTIONCELLS);
+}
diff --git a/ext/opencv/gstmotioncells.h b/ext/opencv/gstmotioncells.h
new file mode 100644
index 0000000..224646b
--- /dev/null
+++ b/ext/opencv/gstmotioncells.h
@@ -0,0 +1,110 @@
+/*
+ * GStreamer
+ * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
+ * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Alternatively, the contents of this file may be used under the
+ * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
+ * which case the following provisions apply instead of the ones
+ * mentioned above:
+ *
+ * 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.
+ */
+
+/*
+ *
+ * Motion cells error codes:
+ *
+ * Error CODE 1 : Wrong motion mask coords format
+ * Error CODE 2 : Wrong motion mask cells format
+ * Error CODE 3 : Wrong motion cells idices format
+ * TODO: set property-ben nem kuldte el a bus msg-t ( azt irta,hogy no bus)
+ */
+
+#ifndef __GST_MOTIONCELLS_H__
+#define __GST_MOTIONCELLS_H__
+
+#include <gst/gst.h>
+#include <cv.h>
+#include "analitics.h"
+
+G_BEGIN_DECLS
+/* #defines don't like whitespacey bits */
+#define GST_TYPE_MOTIONCELLS \
+  (gst_motioncells_get_type())
+#define GST_MOTIONCELLS(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MOTIONCELLS,Gstmotioncells))
+#define GST_MOTIONCELLS_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MOTIONCELLS,GstmotioncellsClass))
+#define GST_IS_MOTIONCELLS(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MOTIONCELLS))
+#define GST_IS_MOTIONCELLS_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MOTIONCELLS))
+typedef struct _Gstmotioncells Gstmotioncells;
+typedef struct _GstmotioncellsClass GstmotioncellsClass;
+
+struct _Gstmotioncells
+{
+  GstElement element;
+  GstPad *sinkpad, *srcpad;
+  gboolean display,calculate_motion,firstgridx,firstgridy,changed_gridx,changed_gridy;
+  gchar *prev_datafile,*cur_datafile,*copy_datafile,*datafile_extension;
+  gint prevgridx,gridx,datafilelen;
+  gint prevgridy,gridy;
+  gint id;
+  gdouble sensitivity;
+  gdouble threshold;
+  IplImage *cvImage;
+  motionmaskcoordrect *motionmaskcoords;
+  cellscolor *motioncellscolor;
+  motioncellidx* motioncellsidx,*motionmaskcellsidx;
+  int motionmaskcoord_count,motioncells_count,motionmaskcells_count;
+  int gap,thickness;
+  unsigned long int motion_begin_timestamp,last_motion_timestamp,motion_timestamp;
+  gboolean previous_motion,changed_datafile,postallmotion,usealpha,firstdatafile,firstframe;
+  double framerate;
+};
+
+struct _GstmotioncellsClass
+{
+  GstElementClass parent_class;
+};
+
+GType gst_motioncells_get_type (void);
+
+gboolean gst_motioncells_plugin_init (GstPlugin * plugin);
+
+G_END_DECLS
+#endif /* __GST_MOTIONCELLS_H__ */
diff --git a/ext/opencv/gstopencv.c b/ext/opencv/gstopencv.c
index 5b25e30..667fa5d 100644
--- a/ext/opencv/gstopencv.c
+++ b/ext/opencv/gstopencv.c
@@ -35,6 +35,7 @@
 #include "gstpyramidsegment.h"
 #include "gsttemplatematch.h"
 #include "gsttextwrite.h"
+#include "gstmotioncells.h"
 
 static gboolean
 plugin_init (GstPlugin * plugin)
@@ -75,6 +76,9 @@ plugin_init (GstPlugin * plugin)
   if (!gst_textwrite_plugin_init (plugin))
     return FALSE;
 
+  if (!gst_motioncells_plugin_init (plugin))
+      return FALSE;
+
   return TRUE;
 }
 
diff --git a/ext/opencv/motioncells_wrapper.cpp b/ext/opencv/motioncells_wrapper.cpp
new file mode 100644
index 0000000..3bf61f0
--- /dev/null
+++ b/ext/opencv/motioncells_wrapper.cpp
@@ -0,0 +1,81 @@
+
+
+#include <stdio.h>
+#include "motioncells_wrapper.h"
+
+extern int instanceCounter;
+MotionCells *mc;
+
+void motion_cells_init ()
+{
+	mc = new MotionCells();
+	instanceOfMC tmpmc;
+	tmpmc.id = instanceCounter;
+	tmpmc.mc = mc;
+	motioncellsvector.push_back(tmpmc);
+	instanceCounter++;
+}
+
+bool perform_detection_motion_cells(IplImage *p_image,double p_sensitivity,double p_framerate,
+		int p_gridheight, int p_gridwidth,unsigned long int p_timestamp_millisec,bool p_isVisible,
+		bool p_useAlpha,int motionmaskcoord_count,motionmaskcoordrect* motionmaskcoords,
+		int motionmaskcells_count,motioncellidx* motionmaskcellsidx,cellscolor* motioncellscolor,
+		int motioncells_count,motioncellidx* motioncellsidx,char *p_datafile,bool p_changed_datafile,
+		int p_thickness,int p_id)
+{
+	int idx = searchIdx(p_id);
+	return motioncellsvector.at(idx).mc->performDetectionMotionCells(p_image,p_sensitivity,p_framerate,p_gridheight,p_gridwidth,
+									p_timestamp_millisec,p_isVisible,p_useAlpha,motionmaskcoord_count,
+									motionmaskcoords,motionmaskcells_count,motionmaskcellsidx,
+									motioncellscolor,motioncells_count,motioncellsidx,p_datafile,
+									p_changed_datafile,p_thickness);
+}
+
+
+void setPrevFrame(IplImage* p_prevFrame,int p_id)
+{
+	int idx = searchIdx(p_id);
+	motioncellsvector.at(idx).mc->setPrevFrame(p_prevFrame);
+}
+char* getMotionCellsIdx(int p_id)
+{
+	int idx = searchIdx(p_id);
+	return motioncellsvector.at(idx).mc->getMotionCellsIdx();
+}
+
+int getMotionCellsIdxCnt(int p_id)
+{
+	int idx = searchIdx(p_id);
+	return motioncellsvector.at(idx).mc->getMotionCellsIdxCount();
+}
+
+bool getChangedDataFile(int p_id)
+{
+	int idx = searchIdx(p_id);
+	return motioncellsvector.at(idx).mc->getChangedDataFile();
+}
+
+int searchIdx(int p_id){
+	for(unsigned int i=0;i<motioncellsvector.size();i++){
+		instanceOfMC tmpmc;
+		tmpmc = motioncellsvector.at(i);
+		if(tmpmc.id==p_id){
+				return i;
+		}
+	}
+	return -1;
+}
+
+void motion_cells_free (int p_id)
+{
+	int idx = searchIdx(p_id);
+	motioncellsvector.at(idx).mc->~MotionCells();
+	motioncellsvector.erase(motioncellsvector.begin()+idx);
+
+}
+
+void motion_cells_free_resources(int p_id)
+{
+	int idx = searchIdx(p_id);
+	motioncellsvector.at(idx).mc->freeDataFile();
+}
diff --git a/ext/opencv/motioncells_wrapper.h b/ext/opencv/motioncells_wrapper.h
new file mode 100644
index 0000000..7e93331
--- /dev/null
+++ b/ext/opencv/motioncells_wrapper.h
@@ -0,0 +1,42 @@
+
+/*
+ * This wrapper class needed to call the c++ motioncells functions.
+ */
+
+#ifndef motioncells_WRAPPER_H
+#define motioncells_WRAPPER_H
+
+#include <stdbool.h>
+#include "analitics.h"
+
+#ifdef __cplusplus
+#include "MotionCells.h"
+struct instanceOfMC{
+	int id;
+	MotionCells* mc;
+};
+vector<instanceOfMC> motioncellsvector;
+
+int searchIdx(int p_id);
+extern "C" {
+#endif
+
+void motion_cells_init ();
+bool perform_detection_motion_cells(IplImage *p_image,double p_sensitivity,double p_framerate,
+		int p_gridheight, int p_gridwidth,unsigned long int p_timestamp_millisec,bool p_isVisible,
+		bool p_useAlpha,int motionmaskcoord_count,motionmaskcoordrect* motionmaskcoords,
+		int motionmaskcells_count,motioncellidx* motionmaskcellsidx,cellscolor* motioncellscolor,
+		int motioncells_count,motioncellidx* motioncellsidx, char *datafile,bool p_changed_datafile,
+		int p_thickness,int p_id);
+void setPrevFrame(IplImage* p_prevFrame,int p_id);
+void motion_cells_free (int p_id);
+void motion_cells_free_resources(int p_id);
+char* getMotionCellsIdx(int p_id);
+int getMotionCellsIdxCnt(int p_id);
+bool getChangedDataFile(int p_id);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BGDETECT_WRAPPER_H */
diff --git a/po/af.po b/po/af.po
index a97dae7..a77f57a 100644
--- a/po/af.po
+++ b/po/af.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins 0.7.6\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2004-03-18 14:16+0200\n"
 "Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n"
 "Language-Team: Afrikaans <i18n@af.org.za>\n"
-"Language: af\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: af\n"
 
 #, fuzzy
 msgid "Could not read title information for DVD."
diff --git a/po/az.po b/po/az.po
index da5222a..841757a 100644
--- a/po/az.po
+++ b/po/az.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-0.8.0\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2004-03-19 18:29+0200\n"
 "Last-Translator: Metin Amiroff <metin@karegen.com>\n"
 "Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n"
-"Language: az\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: az\n"
 "X-Generator: KBabel 1.0.2\n"
 
 #, fuzzy
diff --git a/po/bg.po b/po/bg.po
index 3f3b07b..dc6025c 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2011-01-07 20:26+0000\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-11-04 14:25+0200\n"
 "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
 "Language-Team: Bulgarian <dict@fsa-bg.org>\n"
-"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: \n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
 msgid "Could not read title information for DVD."
diff --git a/po/ca.po b/po/ca.po
index f47593f..c598547 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2011-01-07 20:26+0000\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-11-04 21:02+0100\n"
 "Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
 "Language-Team: Catalan <ca@dodds.net>\n"
-"Language: ca\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: ca\n"
 "Plural-Forms: nplurals=2; plural=n!=1;\n"
 
 msgid "Could not read title information for DVD."
diff --git a/po/cs.po b/po/cs.po
index 289fb12..5b9dc43 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-29 01:48+0200\n"
 "Last-Translator: Petr Kovar <pknbe@volny.cz>\n"
 "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
-"Language: cs\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
 "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
 
 msgid "Could not read title information for DVD."
diff --git a/po/da.po b/po/da.po
index 6b223d5..6060a90 100644
--- a/po/da.po
+++ b/po/da.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-12 11:28+0200\n"
 "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
 "Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
-"Language: da\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: da\n"
 
 msgid "Could not read title information for DVD."
 msgstr "Kunne ikke læse titelinformation for dvd."
@@ -153,8 +153,8 @@ msgstr "Kunne ikke åbne filen »%s« for læsning."
 #~ "The requested bitrate %d kbit/s for property '%s' is not allowed. The "
 #~ "bitrate was changed to %d kbit/s."
 #~ msgstr ""
-#~ "Den anmodede bitrate %d kbit/s for egenskab »%s« er ikke tilladt. "
-#~ "Bitraten blev ændret til %d kbit/s."
+#~ "Den anmodede bitrate %d kbit/s for egenskab »%s« er ikke tilladt. Bitraten "
+#~ "blev ændret til %d kbit/s."
 
 #~ msgid "This file is corrupt and cannot be played."
 #~ msgstr "Denne fil er korrupt og kan ikke afspilles."
diff --git a/po/de.po b/po/de.po
index 3088f1d..3f5f7b3 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-22 16:58+0200\n"
 "Last-Translator: Christian Kirbach <christian.kirbach@googlemail.com>\n"
 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
-"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: de\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 msgid "Could not read title information for DVD."
@@ -64,8 +64,7 @@ msgstr "Frontend-Gerät »%s« konnte nicht geöffnet werden."
 
 #, c-format
 msgid "Could not get settings from frontend device \"%s\"."
-msgstr ""
-"Einstellungen des Frontend-Geräts »%s« konnten nicht aufgerufen werden."
+msgstr "Einstellungen des Frontend-Geräts »%s« konnten nicht aufgerufen werden."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/el.po b/po/el.po
index 0770e63..f11775c 100644
--- a/po/el.po
+++ b/po/el.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-09-02 12:32+0300\n"
 "Last-Translator: Simos Xenitellis <simos.lists@googlemail.com>\n"
 "Language-Team: Greek <team@lists.gnome.gr>\n"
-"Language: el\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: el\n"
 "Plural-Forms: nplurals=2; plural=n>1;\n"
 
 msgid "Could not read title information for DVD."
diff --git a/po/en_GB.po b/po/en_GB.po
index 25ea6f8..ce5a6ee 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins 0.8.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2004-04-26 10:41-0400\n"
 "Last-Translator: Gareth Owen <gowen72@yahoo.com>\n"
 "Language-Team: English (British) <en_gb@li.org>\n"
-"Language: en_GB\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: en_GB\n"
 
 #, fuzzy
 msgid "Could not read title information for DVD."
diff --git a/po/es.po b/po/es.po
index 0fc56d1..544e81a 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-09-29 23:12+0200\n"
 "Last-Translator: Jorge González González <aloriel@gmail.com>\n"
 "Language-Team: Spanish <es@li.org>\n"
-"Language: es\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: es\n"
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
 
 msgid "Could not read title information for DVD."
diff --git a/po/eu.po b/po/eu.po
index 23c5e8b..a460ea3 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.17.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-03-25 12:30+0100\n"
 "Last-Translator: Mikel Olasagasti Uranga <hey_neken@mundurat.net>\n"
 "Language-Team: Basque <translation-team-eu@lists.sourceforge.net>\n"
-"Language: eu\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: eu\n"
 "X-Generator: KBabel 1.11.4\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
diff --git a/po/fi.po b/po/fi.po
index 5374b81..df07f95 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -11,14 +11,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-12 22:13+0300\n"
 "Last-Translator: Tommi Vainikainen <Tommi.Vainikainen@iki.fi>\n"
 "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
-"Language: fi\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: fi\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: KBabel 1.11.2\n"
 
diff --git a/po/fr.po b/po/fr.po
index bede0d6..a807c4c 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-09-22 20:27+0200\n"
 "Last-Translator: Claude Paroz <claude@2xlibre.net>\n"
 "Language-Team: French <traduc@traduc.org>\n"
-"Language: fr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: fr\n"
 
 msgid "Could not read title information for DVD."
 msgstr "Impossible de lire les informations de titre du DVD."
diff --git a/po/gl.po b/po/gl.po
index 13e5900..ed93766 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-05-30 13:28+0200\n"
 "Last-Translator: Fran Dieguez <frandieguez@ubuntu.com>\n"
 "Language-Team: Galician <proxecto@trasno.net>\n"
-"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: gl\n"
 "Plural-Forms: nplurals=2; plural=(n!=1);\\\n"
 "X-Poedit-Language: galego\n"
 
diff --git a/po/hu.po b/po/hu.po
index a2ad847..e8c9d96 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-12 23:33+0200\n"
 "Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n"
 "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
-"Language: hu\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: hu\n"
 "X-Generator: KBabel 1.11.4\n"
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
 
diff --git a/po/id.po b/po/id.po
index d6a8e4c..f94207a 100644
--- a/po/id.po
+++ b/po/id.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-24 11:38-0400\n"
 "Last-Translator: Andhika Padmawan <andhika.padmawan@gmail.com>\n"
 "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
-"Language: id\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: id\n"
 
 msgid "Could not read title information for DVD."
 msgstr "Tak dapat membaca informasi judul untuk DVD."
diff --git a/po/it.po b/po/it.po
index 580a77b..92dfef2 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-14 00:12+0200\n"
 "Last-Translator: Luca Ferretti <elle.uca@infinito.it>\n"
 "Language-Team: Italian <tp@lists.linux.it>\n"
-"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: it\n"
 
 msgid "Could not read title information for DVD."
 msgstr "Impossibile leggere le informazioni del titolo per il DVD."
diff --git a/po/ja.po b/po/ja.po
index 878d34b..b4df71e 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2011-01-07 20:26+0000\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-10-26 16:31+0900\n"
 "Last-Translator: Makoto Kato <makoto.kt@gmail.com>\n"
 "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
-"Language: ja\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: ja\n"
 "X-Generator: Lokalize 0.3\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
diff --git a/po/ky.po b/po/ky.po
index 8c59de5..bbc33d8 100644
--- a/po/ky.po
+++ b/po/ky.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.5\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2007-11-13 17:16+0600\n"
 "Last-Translator: Ilyas Bakirov <just_ilyas@yahoo.com>\n"
 "Language-Team: Kirghiz <i18n-team-ky-kyrgyz@lists.sourceforge.net>\n"
-"Language: ky\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: ky\n"
 "X-Poedit-Language: Kyrgyz\n"
 "X-Poedit-Country: KYRGYZSTAN\n"
 
diff --git a/po/lt.po b/po/lt.po
index ce8746d..801cfe0 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -6,17 +6,17 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.6.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2008-05-14 02:13+0300\n"
 "Last-Translator: Gintautas Miliauskas <gintas@akl.lt>\n"
 "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
-"Language: lt\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: lt\n"
 "X-Generator: KBabel 1.11.4\n"
-"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
-"%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%"
+"100<10 || n%100>=20) ? 1 : 2);\n"
 
 #, fuzzy
 msgid "Could not read title information for DVD."
diff --git a/po/lv.po b/po/lv.po
index 6f29f10..0ff2ae3 100644
--- a/po/lv.po
+++ b/po/lv.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-12 20:33+0100\n"
 "Last-Translator: Rihards Priedītis <rprieditis@gmail.com>\n"
 "Language-Team: Latvian <translation-team-lv@lists.sourceforge.net>\n"
-"Language: lv\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: lv\n"
 "X-Poedit-Language: Latvian\n"
 "X-Poedit-Country: LATVIA\n"
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
diff --git a/po/mt.po b/po/mt.po
index 6ca6744..9ca0f76 100644
--- a/po/mt.po
+++ b/po/mt.po
@@ -5,14 +5,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.8.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2008-10-26 20:27+0100\n"
 "Last-Translator: Michel Bugeja <michelbugeja@rabatmalta.com>\n"
 "Language-Team: Maltese <translation-team-mt@lists.sourceforge.net>\n"
-"Language: mt\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: mt\n"
 "X-Poedit-Language: Maltese\n"
 "X-Poedit-Country: MALTA\n"
 "X-Poedit-SourceCharset: utf-8\n"
diff --git a/po/nb.po b/po/nb.po
index 93c6bc6..5111a11 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.5\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2007-11-03 14:46+0100\n"
 "Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
 "Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
-"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: \n"
 
 #, fuzzy
 msgid "Could not read title information for DVD."
diff --git a/po/nl.po b/po/nl.po
index 77beaa5..0e4efca 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-13 00:06+0200\n"
 "Last-Translator: Freek de Kruijf <f.de.kruijf@hetnet.nl>\n"
 "Language-Team: Dutch <vertaling@vrijschrift.org>\n"
-"Language: nl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: nl\n"
 "X-Generator: KBabel 1.11.4\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
diff --git a/po/or.po b/po/or.po
index c87e45a..04d63b9 100644
--- a/po/or.po
+++ b/po/or.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-0.8.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2004-09-27 13:32+0530\n"
 "Last-Translator: Gora Mohanty <gora_mohanty@yahoo.co.in>\n"
 "Language-Team: Oriya <gora_mohanty@yahoo.co.in>\n"
-"Language: or\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: or\n"
 
 #, fuzzy
 msgid "Could not read title information for DVD."
diff --git a/po/pl.po b/po/pl.po
index b2005df..be75202 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-26 16:52+0200\n"
 "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
 "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
-"Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: pl\n"
 
 msgid "Could not read title information for DVD."
 msgstr "Nie udało się odczytać informacji o tytułach dla DVD."
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 2b466e1..2142920 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-05-26 00:00-0300\n"
 "Last-Translator: Fabrício Godoy <skarllot@gmail.com>\n"
 "Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
-"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
 msgid "Could not read title information for DVD."
diff --git a/po/ro.po b/po/ro.po
index 4521363..a948e68 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -5,14 +5,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-08-16 03:11+0300\n"
 "Last-Translator: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>\n"
 "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
-"Language: ro\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: ro\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
 "20)) ? 1 : 2);;\n"
 "X-Generator: Virtaal 0.6.1\n"
diff --git a/po/ru.po b/po/ru.po
index 743bef5..a6123ac 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.9.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-02-12 15:00+0200\n"
 "Last-Translator: Pavel Maryanov <acid_jack@ukr.net>\n"
 "Language-Team: Russian <gnu@mx.ru>\n"
-"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: ru\n"
 
 msgid "Could not read title information for DVD."
 msgstr "Не удалось прочесть информацию о структуре DVD."
diff --git a/po/sk.po b/po/sk.po
index 8a388fc..b4aea8e 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8,16 +8,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.17.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-03-08 09:20+0100\n"
 "Last-Translator: Peter Tuhársky <tuharsky@misbb.sk>\n"
 "Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
-"Language: sk\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Language: sk\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 "X-Poedit-Language: Slovak\n"
 "X-Poedit-Country: SLOVAKIA\n"
 
diff --git a/po/sl.po b/po/sl.po
index 6bd5d7b..b039ee4 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -8,14 +8,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-07-01 17:42+0100\n"
 "Last-Translator: Matej Urbančič <matej.urban@gmail.com>\n"
 "Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
-"Language: sl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: sl\n"
 "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
 "%100==4 ? 3 : 0);\n"
 "X-Poedit-Language: Slovenian\n"
diff --git a/po/sq.po b/po/sq.po
index 81f440e..e1ee43b 100644
--- a/po/sq.po
+++ b/po/sq.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.7.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2008-08-15 16:07+0200\n"
 "Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
 "Language-Team: Albanian <translation-team-sq@lists.sourceforge.net>\n"
-"Language: sq\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: sq\n"
 
 #, fuzzy
 msgid "Could not read title information for DVD."
diff --git a/po/sr.po b/po/sr.po
index 6857998..9ec1041 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins 0.7.6\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2004-03-13 00:18+0100\n"
 "Last-Translator: Danilo Segan <dsegan@gmx.net>\n"
 "Language-Team: Serbian <gnu@prevod.org>\n"
-"Language: sr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: sr\n"
 "Plural-Forms: nplurals=3;    plural=n%10==1 && n%100!=11 ? 0 :  (n%10>=2 && n"
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
diff --git a/po/sv.po b/po/sv.po
index 71b26ff..8691dbd 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-12 20:29+0100\n"
 "Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
-"Language: sv\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: sv\n"
 
 msgid "Could not read title information for DVD."
 msgstr "Kunde inte läsa titelinformation för dvd."
diff --git a/po/tr.po b/po/tr.po
index 8b0d370..45e4ae6 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -6,14 +6,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-08-12 19:51+0200\n"
 "Last-Translator: Server Acim <serveracim@gmail.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
-"Language: tr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: tr\n"
 "X-Generator: KBabel 1.11.4\n"
 
 msgid "Could not read title information for DVD."
diff --git a/po/uk.po b/po/uk.po
index 43dd49b..ff059b1 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -7,16 +7,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.5\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2007-07-04 12:19+0200\n"
 "Last-Translator: Maxim V. Dziumanenko <dziumanenko@gmail.com>\n"
 "Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
-"Language: uk\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Language: uk\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 msgid "Could not read title information for DVD."
 msgstr ""
diff --git a/po/vi.po b/po/vi.po
index 5dd1ea7..768f480 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.17.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2010-03-06 22:09+1030\n"
 "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
 "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
-"Language: vi\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: vi\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 "X-Generator: LocFactoryEditor 1.8\n"
 
diff --git a/po/zh_CN.po b/po/zh_CN.po
index b962e38..c3506a0 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -9,14 +9,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.16.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2010-10-19 23:33+0100\n"
+"POT-Creation-Date: 2011-03-17 14:57+0100\n"
 "PO-Revision-Date: 2009-11-20 18:12中国标准时间\n"
 "Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
-"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: zh_CN\n"
 
 msgid "Could not read title information for DVD."
 msgstr "无法读取 DVD 的标题信息。"
