gst-plugins-bad: intervideosrc: Fix GAP flag setting on black frames correctly

Arun Raghavan arun at centricular.com
Thu Jan 22 20:38:31 PST 2015


(resending as the lists bounced the last time)

On Thu, 2015-01-22 at 21:06 +0100, Sebastian Dröge wrote:
> On Mi, 2015-01-21 at 21:39 -0800, Arun Raghavan wrote:
> > Module: gst-plugins-bad
> > Branch: master
> > Commit: 825239b45063e41f68771917ca047a25c852fbd3
> > URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=825239b45063e41f68771917ca047a25c852fbd3
> > 
> > Author: Arun Raghavan <arun at centricular.com>
> > Date:   Thu Jan 22 11:08:23 2015 +0530
> > 
> > intervideosrc: Fix GAP flag setting on black frames correctly
> > 
> > This did not actually work since the video_buffer was set to NULL after
> > the first black frame.
> > [...]
> > -    /* Repeated buffer? */
> > -    if (intervideosrc->surface->video_buffer_count > 0)
> > -      is_gap = TRUE;
> 
> If I'm not mistaken, this part is missing now. It should mark repeated
> non-black frames as GAP too. The logic was to mark every frame as GAP,
> that is the same as the previous one.

The logic is currently there to set the GAP flag, so either I'm missing
something, or it's too complicated, since Patrik also reported the same
thing.

The if/else blocks I added should have the following logic:

  if (...) {
    /* We have a buffer, and we count the timeout */
    ...
  } else if (...) {
    /* The timeout expired in the previous call to create() */
    ...
  } else if (...) {
    /* Repeat black frame, set GAP */
    ...
  }

Cheers,
Arun



More information about the gstreamer-devel mailing list