Alberto,<br><br>I'm also using gstreamer to develop some computer vision routines and my approach is to develop one plugin for each algorithm that I need: background subtraction, edge detection, convolution, morphological operators, etc.
<br><br>This way I can easily prototype an application using gst-launch and test my plugins.<br><br>To create these plugins I've just followed the effectv plugins examples (gst-plugins-good).<br><br>---<br>Fábio Sato<br><br>
<br><div><span class="gmail_quote">2006/8/23, alberto colombo &lt;<a href="mailto:albx79@gmail.com">albx79@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hello<br><br>I'm working on a computer vision project and I need to build a video<br>analysis tool. For the moment, I will have to to a simple mean-shift<br>tracker, however it's going to expand a lot.<br><br>Anyway, I decided to use gstreamer (both because it looks the right tool
<br>and because I was advised so by people from vlc-devel!). Basically, what<br>I need to do is open an avi or mpeg file (for now, but possibly a live<br>stream in the future), step through each frame, do my analysis on the
<br>image and paint the output over the frame.<br><br>My first attempt was to use playbin to do all the dirty stuff, and then<br>send &quot;seek&quot; events to step frame by frame:<br><br>void MainWindow::on_button_next_frame_clicked()
<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;...<br>&nbsp;&nbsp;&nbsp;&nbsp;gst_element_seek(play, 1.0, GST_FORMAT_DEFAULT,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GstSeekFlags(GST_SEEK_FLAG_FLUSH|<br>GST_SEEK_FLAG_ACCURATE),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GST_SEEK_TYPE_SET, pos+1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GST_SEEK_TYPE_NONE, -1 );
<br>}<br><br>However, this code doesn't work: the video position does not change. So<br>I tried with<br><br>void MainWindow::on_button_next_frame_clicked()<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;...<br>&nbsp;&nbsp;&nbsp;&nbsp;gst_element_seek(play, 1.0, GST_FORMAT_TIME,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GstSeekFlags(GST_SEEK_FLAG_FLUSH|<br>GST_SEEK_FLAG_ACCURATE),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GST_SEEK_TYPE_SET, pos+1000*1000*1000/25,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GST_SEEK_TYPE_NONE, -1 );<br>}<br><br>But it seeks too fast: every click advances by about 1/12 seconds,
<br>instead of 1/25. (By the way, doing a non-flushing seek hangs the<br>application, looks like a deadlock because the CPU is 0%).<br><br>Can anyone explain why? Most important, is this the right approach to<br>the problem, or shall I write a plugin and put it somewhere between the
<br>decoding and the displaying elements?<br><br>Thank you very much<br>alberto<br>--<br>ICQ#: 319420338<br><br><br>-------------------------------------------------------------------------<br>Using Tomcat but need to do more? Need to support web services, security?
<br>Get stuff done quickly with pre-integrated technology to make your job easier<br>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo<br><a href="http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=263057&amp;dat=121642">
http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=263057&amp;dat=121642</a><br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.sourceforge.net">
gstreamer-devel@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br></blockquote></div><br><br clear="all">
<br>-- <br>Fábio Sato