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 171916 - [PATCH] zoom in videos
[PATCH] zoom in videos
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: GStreamer backend
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Maintainer alias for GStreamer component of Totem
Maintainer alias for GStreamer component of Totem
: 333405 334921 352880 360631 518165 (view as bug list)
Depends on: 345653 354007
Blocks: 309714 376624
 
 
Reported: 2005-03-28 21:55 UTC by Christoph Burghardt
Modified: 2008-12-01 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add "zooming" - function (2.80 KB, patch)
2005-04-08 19:27 UTC, Christoph Burghardt
none Details | Review
New Patch against totem (1.01 KB, patch)
2005-04-19 20:34 UTC, Christoph Burghardt
needs-work Details | Review
zoom by resizing the video_window (4.03 KB, patch)
2008-11-01 13:59 UTC, Robin Stocker
none Details | Review

Description Christoph Burghardt 2005-03-28 21:55:05 UTC
Distribution/Version: Debian

It would be nice if totem would allow to zoom in the video. I have a 16:10
display and if i watch videos which have black borders i want to be able to cut
them away
Comment 1 Bastien Nocera 2005-03-28 22:23:42 UTC
Upgrade your Totem, this is already in since version 0.100.

*** This bug has been marked as a duplicate of 144929 ***
Comment 2 Christoph Burghardt 2005-03-28 22:32:54 UTC
I use totem-gstreamer from debian unstable, version is 0.100 and neither r/t nor
w/e does work
Comment 3 Bastien Nocera 2005-03-28 22:39:21 UTC
It's not implemented in the GStreamer backend (you didn't mention which one you
were using).
Comment 4 Christoph Burghardt 2005-04-03 09:03:46 UTC
Gstreamer has 2 plugins (videocrop, videoscale) that would allow such operation
Comment 5 Ronald Bultje 2005-04-03 10:15:34 UTC
I'm aware of them, as you would probably expect, but didn't have time to
implement it yet. A patch would help a lot.
Comment 6 Christoph Burghardt 2005-04-08 19:27:23 UTC
Created attachment 39846 [details] [review]
Patch to add "zooming" - function 

This patch crops top and bottom from the video so you view without black bars.
Comment 7 Ronald Bultje 2005-04-18 20:00:12 UTC
This patch has two problems:

A) it adds videocrop to totem instead of playbin
B) videocrop is currently I420-only

I'd like to fix both issues before committing.
Comment 8 Christoph Burghardt 2005-04-19 08:41:52 UTC
Ok, i make a patch against playbin which adds a new property "zoom" and patch
totem to use it.


concerning videocrop, i don't know of a good way to handle both rgb and
yuv-caps.  i think of making the element videofilter-based. but croping of rgb
is even simpler then yuv
Comment 9 Ronald Bultje 2005-04-19 08:50:12 UTC
Yes, making it videofilter based is the best solution. Regarding colorspaces,
supporting 15-, 16-, 24-, 32- bits RGB and I420/YUY2 YUV should be enough for
now. I know it's a lot already, but well, we have a lot of video outputs so we
really need this.

If you want to do it, please go for it. If not, I'll happily do the work
required to make a videofilter-derived videocrop.
Comment 10 Christoph Burghardt 2005-04-19 20:33:34 UTC
Ok, this makes sense. I've redone the now fairly trivial patch for totem and
working at the required modifications for playbin. For the modifications in
playbin i'll file a new bug against gst-plugins.

feel free to begin the new videocrop element, i'll see if i have time after playbin
Comment 11 Christoph Burghardt 2005-04-19 20:34:54 UTC
Created attachment 45459 [details] [review]
New Patch against totem

Right now untested and needs modificated playbin which will be filed in a
seperate  bug
Comment 12 Ronald Bultje 2005-04-19 21:05:02 UTC
So, Christoph, you will use the current videocrop? Please do file this bug as
dependent on the gst-plugins bug btw, so I can keep track of stuff. :).

Thanks.
Comment 13 Christian Fredrik Kalager Schaller 2006-02-02 14:25:43 UTC
Christoph, did you ever file a bug against gst-plugins?
Comment 14 Tim-Philipp Müller 2006-03-22 09:48:32 UTC
*** Bug 334921 has been marked as a duplicate of this bug. ***
Comment 15 Bastien Nocera 2006-06-18 21:36:19 UTC
Tim, would you mind looking at that for the 0.10 backend?
Comment 16 Tim-Philipp Müller 2006-08-26 08:30:22 UTC
*** Bug 352880 has been marked as a duplicate of this bug. ***
Comment 17 Bastien Nocera 2006-09-04 10:23:27 UTC
*** Bug 333405 has been marked as a duplicate of this bug. ***
Comment 18 Bastien Nocera 2006-10-08 13:14:47 UTC
*** Bug 360631 has been marked as a duplicate of this bug. ***
Comment 19 Bastien Nocera 2006-11-16 23:28:23 UTC
If both GStreamer and xine-lib implement zooming, the calls to bacon_video_widget_can_set_zoom should be removed, as well as the implementations of bacon_video_widget_can_set_zoom as well.
Comment 20 Bastien Nocera 2006-11-16 23:29:40 UTC
Tim, btw, are the playbin changes necessary for this in a release yet?
Comment 21 Tim-Philipp Müller 2006-11-18 18:04:51 UTC
> Tim, btw, are the playbin changes necessary for this in a release yet?

Nope. Videocrop itself is mostly ready (lacking some fixes for packed yuv formats, but I've got those locally), but hasn't been moved to -good yet. The main issue is renegotiation (ie. changing the cropping) during playback which is probably caused by something somewhere in GStreamer core (basetransform, or something else, no idea). Haven't had time to track it down yet. Should probably file a bug about this :)

~/gst-plugins-bad/tests/icles/test-videocrop demonstrates this issue sometimes (about one out of three times for me).


Comment 22 Bastien Nocera 2007-06-12 22:16:44 UTC
Tim, now that videocrop has been moved to -good, does this mean the above is fixed? If so, we can remove the conditionals about supporting zooming, and integrate it before 2.20.
Comment 23 Tim-Philipp Müller 2008-01-18 10:59:04 UTC
I've implemented this the other day, but there are still some racy caps negotiation issues that need fixing/figuring out on the GStreamer side before it can go in. Ideally we'd implement this in the videosinks directly somehow, e.g. via an interface or though.
Comment 24 Bastien Nocera 2008-08-18 15:30:24 UTC
*** Bug 518165 has been marked as a duplicate of this bug. ***
Comment 25 Robin Stocker 2008-11-01 13:59:16 UTC
Created attachment 121780 [details] [review]
zoom by resizing the video_window

How about this patch until a proper solution arrives in GStreamer?

It implements the zoom function by simply also multiplying by the zoom factor when calculating the resize ratio for video_window (the GdkWindow). So when zoomed, the video_window may have negative x and y, and width and height which are bigger than the screen.

It also works for videos which have borders at the sides (for which cropping only top and bottom doesn't work). The only minor hitch is that it doesn't look very smooth when zooming by holding Ctrl+R/T.
Comment 26 Robin Stocker 2008-11-24 12:31:08 UTC
Any comments on my patch? I have been using Totem with the patch for some weeks and it works perfectly. The patch is also very small if you don't count the code that was moved to a new function.
Comment 27 Tim-Philipp Müller 2008-11-24 13:33:52 UTC
The approach looks quite clever to me (didn't know you could use negative subwindow offsets), but on IRC the issue was raised that not all X drivers will handle the negative offsets very gracefully (read: crash). I'll see if I can find some X elders who can shed some light on this.

Comment 28 Bastien Nocera 2008-12-01 16:13:41 UTC
<ajax> the driver actually gets coordinates both ways (yay X), but they all seem to be using the clipped version

I completely removed the use of _can_set_zoom(), and fixed a warning on startup.

2008-12-01  Bastien Nocera  <hadess@hadess.net>

        * src/backend/bacon-video-widget-gst-0.10.c (resize_video_window),
        (bacon_video_widget_size_allocate), (bacon_video_widget_set_zoom),
        (bacon_video_widget_get_zoom):
        Patch from Robin Stocker <robin@nibor.org> to add zoom support
        to the GStreamer backend (Closes: #171916)
        * src/backend/bacon-video-widget-xine.c:
        * src/backend/bacon-video-widget.h:
        * src/totem.c (totem_callback_connect):
        Remove _can_set_zoom() function, both our backends can