[Bug 744763] gltransformation: Make all property into universal [0-1] coordinate

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 27 16:50:36 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=744763

--- Comment #8 from Lubosz Sarnecki <lubosz at gmail.com> ---
Created attachment 298147
  --> https://bugzilla.gnome.org/attachment.cgi?id=298147&action=edit
gltransformation: Add pivot point

>From the commit message:

Add an pivot vector for setting the origin of rotations and scales.

With the pivot point the rotation and scale operations can have
different origins. This adds the ability to rotate around different points.
Currently the default (0, 0) pivot point is possible. Rotation around the
center,
also scaling / zooming into the center.

With an pivot point this is optional.
I defined the following image coordinates for the pivot point:

     (-1,1) ----------------- (1,1)
        |        |
        |        |
        |    (0,0)    |
        |        |
        |        |
        |        |
    (-1,-1) ----------------- (1,-1)

Example:

    Rotate the video at the bottom left corner

    gst-launch-1.0 videotestsrc \
            ! gltransformation \
                 scale-x=0.5 \
                scale-y=0.5 \
                rotation-z=25.0 \
                pivot-x=-1.0 \
                pivot-y=-1.0 \
            ! glimagesink

The pivot-z option defined the pivot point in 3D space,
this only affects the rotation, since we have no Z data to scale.
With this option a video can be rotated around a point in 3D space.

__________

Other examples:

    Rotate around point behind the image:

    gst-launch-1.0 videotestsrc ! gltransformation rotation-x=10.0 pivot-z=-4.0
! glimagesink

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list