Hi Stefan,<div><br></div><div>Thanks for your replay. </div><div><br></div><div>It does fail for both forward and backward.</div><div><br></div><div>Yes let me try that to add some patch to alawdec for the seek,</div><div>
<br></div><div>With Warm Regards<br>Jesu Anuroop Suresh <br><br>&quot;Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.&quot;<br>
&quot;Anyone who has never made a mistake has never tried anything new.&quot;<br><br><br><br><br>
<br><br><div class="gmail_quote">On Mon, Oct 3, 2011 at 11:29 PM, Stefan Sauer [via GStreamer-devel] <span dir="ltr">&lt;<a href="/user/SendEmail.jtp?type=node&node=3869968&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">

        On 09/23/2011 08:30 AM, Jesu Anuroop Suresh wrote:
<br></div><div class="im">&gt; Hi 
<br>&gt;
<br>&gt; Below is the pipeline
<br>&gt;
<br>&gt; gst-launch -v filesrc location=give_me_jesus.alaw  !  audio/x-alaw,
<br>&gt; rate=44100, channels=2 ! alawdec ! alsasink
<br>&gt;
<br>&gt; It fails for gst_element_seek
<br></div><div class="im">only for backward or for both? File a bug for it and ideally have a look
<br>at alwadec and see if you can make a patch.
<br><br>Stefan
<br></div><div><div><div></div><div class="h5"><div class='shrinkable-quote'><br>&gt; Below is the code for the seek 
<br>&gt;
<br>&gt; ff - 1 for forward, 0 for backward
<br>&gt; time_seconds = number of seconds to seek
<br>&gt;
<br>&gt; This same code is working with the mp3 pipeline
<br>&gt;
<br>&gt; static void seekMediaTime (int ff, int time_seconds)
<br>&gt; {
<br>&gt;     gint64 start_pos, stop_pos, rate;
<br>&gt;     gint64 start_flag, stop_flag;
<br>&gt;     gint64 pos, len, tmp = 0;
<br>&gt;     gint64 timeFf = FF_SPEED_BASE;
<br>&gt;     GstFormat fmt = GST_FORMAT_TIME;
<br>&gt;
<br>&gt;     if (!gst_element_query_duration (recordEng.recPipeline, &amp;fmt, &amp;len) ||
<br>&gt;         !gst_element_query_position (recordEng.recPipeline, &amp;fmt, &amp;pos))
<br>&gt;     {
<br>&gt;           printf (&quot;%s: %d Query Failed\r\n&quot;,__func__,__LINE__);
<br>&gt;           return;
<br>&gt;     }
<br>&gt;
<br>&gt;     if (ff == 1)
<br>&gt;     {
<br>&gt;           timeFf = ((gint64)FF_SPEED_BASE * time_seconds);
<br>&gt;
<br>&gt;           if ((len &lt;= (pos + timeFf)) || (len == pos))
<br>&gt;                 timeFf = 0;
<br>&gt;           else
<br>&gt;                 tmp = pos + timeFf;
<br>&gt;           printf (&quot;FORWARDWORD BY:%llu\r\n&quot;,timeFf);
<br>&gt;     }
<br>&gt;     else
<br>&gt;     {
<br>&gt;           timeFf = ((gint64)FF_SPEED_BASE * time_seconds);
<br>&gt;
<br>&gt;           if ((pos &lt;= timeFf) || (len == pos))
<br>&gt;                 timeFf = 0;
<br>&gt;           else
<br>&gt;                 tmp = (pos - timeFf);
<br>&gt;           printf (&quot;BACKWORD BY:%llu\r\n&quot;,timeFf);
<br>&gt;     }
<br>&gt;     g_print (&quot;Current Pos Time: %llu %llu\r\n&quot;,pos,len);
<br>&gt;     g_print (&quot;Set Pos Time: %llu\r\n&quot;,tmp);
<br>&gt;     timeFf = tmp;
<br>&gt;     rate = 1.0;
<br>&gt;     start_pos = timeFf;
<br>&gt;     start_flag = GST_SEEK_TYPE_SET;
<br>&gt;     stop_flag = GST_SEEK_TYPE_NONE;
<br>&gt;     stop_pos = GST_CLOCK_TIME_NONE;
<br>&gt;
<br>&gt;     if (!gst_element_seek (recordEng.recPipeline, rate,
<br>&gt;            GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
<br>&gt;            start_flag, start_pos,
<br>&gt;            stop_flag, stop_pos))
<br>&gt;     {
<br>&gt;             g_print (&quot;Seek failed!\r\n&quot;);
<br>&gt;     }
<br>&gt;     else
<br>&gt;     {
<br>&gt;             g_print (&quot;Time: %&quot; GST_TIME_FORMAT &quot; / %&quot;
<br>&gt;                GST_TIME_FORMAT &quot;\r\n&quot;,
<br>&gt;                GST_TIME_ARGS (pos), GST_TIME_ARGS (len));
<br>&gt;
<br>&gt;             /* We will wait til it is running or failed */
<br>&gt;             if (gst_element_get_state (recordEng.recPipeline,
<br>&gt;                  NULL, NULL, -1) == GST_STATE_CHANGE_FAILURE)
<br>&gt;             {
<br>&gt;                   g_print (&quot;Failed to go into PLAYING state\r\n&quot;);
<br>&gt;             }
<br>&gt;     }
<br>&gt; }
<br>&gt;
<br>&gt;
<br>&gt; Regards
<br>&gt; Jesu Anuroop Suresh
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; --
<br>&gt; View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/gst-element-seek-fails-with-alawdec-tp3835910p3835910.html" rel="nofollow" link="external" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/gst-element-seek-fails-with-alawdec-tp3835910p3835910.html</a></div>
&gt; Sent from the GStreamer-devel mailing list archive at Nabble.com.
<br>&gt; _______________________________________________
<br>&gt; gstreamer-devel mailing list
<br></div></div>&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=3868308&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="nofollow" link="external" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></div><br>_______________________________________________
<br>gstreamer-devel mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=3868308&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="nofollow" link="external" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://gstreamer-devel.966125.n4.nabble.com/gst-element-seek-fails-with-alawdec-tp3835910p3868308.html" target="_blank" rel="nofollow" link="external">http://gstreamer-devel.966125.n4.nabble.com/gst-element-seek-fails-with-alawdec-tp3835910p3868308.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em">
                
                To unsubscribe from gst_element_seek fails with alawdec, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.
        </div></blockquote></div><br></div>

        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/gst-element-seek-fails-with-alawdec-tp3835910p3869968.html">Re: gst_element_seek fails with alawdec</a><br/>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>