converting videocrop to use VideoCropMeta

Nicolas Dufresne nicolas.dufresne at collabora.com
Wed Mar 5 08:43:42 PST 2014


Le mercredi 05 mars 2014 à 11:17 -0500, Stirling Westrup a écrit :
> Now I see why I didn't know about videomixer. The results of
> gst-inspect-1.0 give no hints as to what it does or how it works,
> other than the name. Even the embedded comments in the source only say
> that one sets parameters on the sink pads, but the documentation for
> GstVideoMixer2Pad doesn't list any parameters.
> 
> 
> Basically, I can't find out how it works or how to configure it. :-/

Oops, indeed the link for pad documentation is broken. Just extracted
the information from the code. You can set zorder, xpos, ypos, and
alpha. This is on the pad you have requested. So for you used case, I'd
use videocrop, to remove the part you don't need, and then videomixer to
position that cropped video inside the display size. Don't forget to set
the type of background you want, by default it's a checker. This is what
we use in gst-editing-services. The bonus is that you can also combine
multiple smaller video if needed.

  g_object_class_install_property (gobject_class, PROP_PAD_ZORDER,
      g_param_spec_uint ("zorder", "Z-Order", "Z Order of the picture",
          0, 10000, DEFAULT_PAD_ZORDER,
          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_class, PROP_PAD_XPOS,
      g_param_spec_int ("xpos", "X Position", "X Position of the picture",
          G_MININT, G_MAXINT, DEFAULT_PAD_XPOS,
          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_class, PROP_PAD_YPOS,
      g_param_spec_int ("ypos", "Y Position", "Y Position of the picture",
          G_MININT, G_MAXINT, DEFAULT_PAD_YPOS,
          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_class, PROP_PAD_ALPHA,
      g_param_spec_double ("alpha", "Alpha", "Alpha of the picture", 0.0, 1.0,
          DEFAULT_PAD_ALPHA,
          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));

cheers,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140305/d0699533/attachment-0001.pgp>


More information about the gstreamer-devel mailing list