[gst-devel] How to perform frame-by-frame video playing

Wim Taymans wim.taymans at gmail.com
Fri Jun 19 18:11:09 CEST 2009


On Fri, 2009-06-19 at 16:02 +0000, Albert Costa wrote:

Your approach will probably work. 

Current GIT /and the eventual 0.10.24) has framestepping through the
STEP events, which should solve things in a more general way (when you
need to keep audio synchronized too).

Wim 

> Hi,
> I'm trying to do the following:
> I have an application that constructs and controls a pipeline. Merely,
> my pipe would be "filesink ! decodebin ! identity sync=true !
> myfilter ! ffmpegcolorspace ! directdrawsink sync=false".
> The element myfilter is currently just a pass-through element (it does
> not process anything). My goal is, from the application, to play the
> file only by moving a frame ahead when the user hits a key (in fact
> later that would be a signal sent by another process). My idea was to
> block the chain() function inside myfilter each time it is called,
> untill a release notification is sent. What I did so far is :
> in the chain() :
> {
> ...
>     g_mutex_lock(myfilter->lock);
>   do 
>   {
>     g_cond_wait(myfilter->process_next, myfilter->lock);
>   } 
>   g_mutex_unlock(myfilter ->lock);
> ...
> }
> 
> 
> In my application, I have a specific function that gets the sink pad
> of my filter element, and send a specific event on it.
> In myfilter's sink_event function, I have a case of event type where I
> call g_cond_signal(myfilter->process_next) (which I thought would
> release the lock in the chain).
> My problem is that when I launch the pipeline, the cond_wait does lock
> the chain function; but then in my application specific function,
> calling gst_pad_send_event never returns, and my event is thus not
> received by my element. Eveything hangs...
> Is there any way to have it working somehow? (another option was to
> set the pipe in pause mode and send seek events to go to next frame,
> but i'm using mpeg2 ts files that do not support seek anyway, and I
> have other constraints for which I need an element that can be
> controled).
> Any help would be appreciated,
> Regards,
> Al
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing 
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list