[gst-devel] Re: [gst-cvs] ds gst-plugins: gst-plugins/ gst-plugins/ext/ffmpeg/ gst-plugins/ext/mad/ gst-plugins/gst/audioconvert/ gst-plugins/gst/audioscale/ gst-plugins/gst/videofilter/ gst-plugins/gst/videoscale/ gst-plugins/sys/ximage/

David Schleef ds at schleef.org
Thu Jan 1 20:07:44 CET 2004


On Fri, Jan 02, 2004 at 12:37:27AM +0100, Ronald Bultje wrote:
> > -  /* and our own template of course */
> > -  ourcaps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
> > +    gst_structure_set_name (structure,"video/x-raw-yuv");
> > +    gst_structure_remove_field (structure,"format");
> > +    gst_structure_remove_field (structure,"endianness");
> > +    gst_structure_remove_field (structure,"depth");
> > +    gst_structure_remove_field (structure,"bpp");
> > +    gst_structure_remove_field (structure,"red_mask");
> > +    gst_structure_remove_field (structure,"green_mask");
> > +    gst_structure_remove_field (structure,"blue_mask");
> > +  }
> 
> ? YUV? How about RGB? 

That function takes the otherpad's allowed caps, strips the format
information, simplifies the caps, and then returns the remaining
width/height/framerate information as both video/x-raw-yuv and
video/x-raw-rgb.  It's the YUV/RGB format equivalent to videoscale's
getcaps function, which has:

  gst_structure_set (structure,
    "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
    "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
    NULL);

> This is handled a few lines lower in this function, so this isn't really
> needed.

Oops.  That was supposed to be removed.  I added it because I was
having problems with the same format getting negotiated on both
pads, thus causing an (incorrect) passthru.  But that was fixed.

> In general: did you test ffcolorspace?

Yes, extensively.

> To reproduce:

You are "testing" it using broken elements.  Don't do that.

> Why were the changes needed (it worked fine, even in renegotiation)?

Because it was horrificly broken.  In particular, these pipelines
didn't work when resizing the X window:

  videotestsrc ! <some_format> ! ffcolorspace ! ximagesink

  videotestsrc ! <some_format> ! videoscale ! ffcolorspace ! ximagesink

  videotestsrc ! <some_format> ! ffcolorspace ! videoscale ! ximagesink

  videotestsrc ! <some_format> ! videobalance ! ffcolorspace ! ximagesink

  videotestsrc ! tee ! ffcolorspace ! ximagesink tee0.src%d ! xvimagesink



dave...





More information about the gstreamer-devel mailing list