After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 654537 - Add container for video textures
Add container for video textures
Status: RESOLVED FIXED
Product: clutter-gst
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-gst-maint
clutter-gst-maint
Depends on:
Blocks: 655590
 
 
Reported: 2011-07-13 10:29 UTC by Javier Jardón (IRC: jjardon)
Modified: 2013-11-15 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Javier Jardón (IRC: jjardon) 2011-07-13 10:29:36 UTC
This is a clone of bug http://bugzilla.clutter-project.org/show_bug.cgi?id=2626


Something similar to the MxAspectFrame that would allow to:
- keep the texture's aspect ratio
- allow clipping/cropping (similar to the "expand" property in MxAspectFrame)
- handles rotation and rotation animations properly (eg. allows for 90 degrees
and multiples rotation, make rotation smooth through animation/resize)

------- Comment #1 From Damien Lespiau 2011-04-05 06:24:22 [reply] -------
- Zoom factor (to be on par with totem current features)
- Draw the black quads when in pillarbox/letterbox. This is to limit the
overdraw in the current solution (clear the color buffer + video on top = we
end up touching the pixels of the video twice instead of doing 3 quads, 2 of
them with a black material, and one in the center for the video). With this you
could set up the "no clear" hint on the stage to disable the glClear().

------- Comment #2 From Bastien Nocera 2011-04-05 07:30:37 [reply] -------
(In reply to comment #1)
> - Zoom factor (to be on par with totem current features)

Totem doesn't use it anymore, just the equivalent of the expand property (which
is would be awesome to have animated).
Comment 1 Bastien Nocera 2012-06-27 19:48:12 UTC
(In reply to comment #0)
> This is a clone of bug http://bugzilla.clutter-project.org/show_bug.cgi?id=2626
> 
> 
> Something similar to the MxAspectFrame that would allow to:
> - keep the texture's aspect ratio

Done in TotemAspectFrame

> - allow clipping/cropping (similar to the "expand" property in MxAspectFrame)

Done in TotemAspectFrame

> - handles rotation and rotation animations properly (eg. allows for 90 degrees
> and multiples rotation, make rotation smooth through animation/resize)

Emmanuele mentions that this should be implemented similarly to ClutterScrollActor, overriding apply_transform() and changing cogl_matrix_translate() to cogl_matrix_rotate().

I've implemented this slightly differently, and with a few FIXMEs that we already had in the orientation plugin.

> ------- Comment #1 From Damien Lespiau 2011-04-05 06:24:22 [reply] -------
> - Zoom factor (to be on par with totem current features)

Removed.

> - Draw the black quads when in pillarbox/letterbox. This is to limit the
> overdraw in the current solution (clear the color buffer + video on top = we
> end up touching the pixels of the video twice instead of doing 3 quads, 2 of
> them with a black material, and one in the center for the video). With this you
> could set up the "no clear" hint on the stage to disable the glClear().

Damien, do we still have that? Where does the code that does that live? Would be nice to get fixed.

> ------- Comment #2 From Bastien Nocera 2011-04-05 07:30:37 [reply] -------
> (In reply to comment #1)
> > - Zoom factor (to be on par with totem current features)
> 
> Totem doesn't use it anymore, just the equivalent of the expand property (which
> is would be awesome to have animated).

It's animated now.
Comment 2 Bastien Nocera 2013-03-26 10:47:31 UTC
This is all done (and working properly) in TotemAspectFrame, thanks Lionel and Damien.
Comment 3 Lionel Landwerlin 2013-03-26 11:08:51 UTC
We have a similar feature on master (aspect ratio + black quads) but still missing the zoom bit.
And of course you can rotate the actor in any direction you would like.
Comment 4 Bastien Nocera 2013-03-26 11:10:20 UTC
As you've seen, rotation isn't exactly trivial.
Comment 5 Lionel Landwerlin 2013-03-26 11:31:21 UTC
In the case of Totem, yes. But that's a corner case of being able to rotation an actor :)
Have a look at : https://git.gnome.org/browse/clutter-gst/tree/examples/video-flip2.js
Comment 6 Lionel Landwerlin 2013-11-15 18:04:35 UTC
Just implemented the "zoom" on master : https://git.gnome.org/browse/clutter-gst/commit/?id=69f3f007e09797902e1a293aa277e758d5757d7b