tag 571015 patch thanks Am Montag, den 22.02.2010, 21:39 +0100 schrieb Julian Andres Klode: > Package: totem > Version: 2.28.5-1 > Severity: wishlist > > I have a laptop with a 16:10 display, and I would like to see a 16:10 > aspect ratio preset which scales the video to my display. VLC has such > a preset as well. > > Regards, > Julian > I have attached a patch. The WXGA name should be replaced with something generic, as WXGA actually describes a screen resolution.
-- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Author: Julian Andres Klode <j...@debian.org> Description: Add support for 16:10 aspect ratio. Allow the user to choose 16:10 aspect ratio. --- a/data/totem.ui +++ b/data/totem.ui @@ -348,7 +348,15 @@ <property name="value">4</property> </object> </child> - + <child> + <object class="GtkRadioAction" id="aspect-ratio-wxga"> + <property name="label" translatable="yes">16:10 (WXGA)</property> + <property name="tooltip" translatable="yes">Sets 16:10 (WXGA) aspect ratio</property> + <!-- BVW_RATIO_WXGA --> + <property name="group">aspect-ratio-auto</property> + <property name="value">5</property> + </object> + </child> <child> <object class="GtkAction" id="subtitles-menu"> <property name="label" translatable="yes">S_ubtitles</property> @@ -468,6 +476,7 @@ <menuitem name="aspect-ratio-fbt" action="aspect-ratio-fbt"/> <menuitem name="aspect-ratio-anamorphic" action="aspect-ratio-anamorphic"/> <menuitem name="aspect-ratio-dvb" action="aspect-ratio-dvb"/> + <menuitem name="aspect-ratio-wxga" action="aspect-ratio-wxga"/> </menu> <menuitem name="deinterlace" action="deinterlace"/> <menuitem name="next-angle" action="next-angle"/> --- a/src/totem-menu.c +++ b/src/totem-menu.c @@ -1424,7 +1424,8 @@ static const GtkRadioActionEntry aspect_ { "aspect-ratio-square", NULL, N_("Square"), NULL, N_("Sets square aspect ratio"), BVW_RATIO_SQUARE }, { "aspect-ratio-fbt", NULL, N_("4:3 (TV)"), NULL, N_("Sets 4:3 (TV) aspect ratio"), BVW_RATIO_FOURBYTHREE }, { "aspect-ratio-anamorphic", NULL, N_("16:9 (Widescreen)"), NULL, N_("Sets 16:9 (Anamorphic) aspect ratio"), BVW_RATIO_ANAMORPHIC }, - { "aspect-ratio-dvb", NULL, N_("2.11:1 (DVB)"), NULL, N_("Sets 2.11:1 (DVB) aspect ratio"), BVW_RATIO_DVB } + { "aspect-ratio-dvb", NULL, N_("2.11:1 (DVB)"), NULL, N_("Sets 2.11:1 (DVB) aspect ratio"), BVW_RATIO_DVB }, + { "aspect-ratio-wxga", NULL, N_("16:10 (WXGA)"), NULL, N_("Sets 16:10 (WXGA) aspect ratio"), BVW_RATIO_WXGA } }; void --- a/src/backend/bacon-video-widget-gst-0.10.c +++ b/src/backend/bacon-video-widget-gst-0.10.c @@ -452,6 +452,10 @@ get_media_size (BaconVideoWidget *bvw, g movie_par_n = 20 * bvw->priv->video_height; movie_par_d = 9 * bvw->priv->video_width; break; + case BVW_RATIO_WXGA: + movie_par_n = 16 * bvw->priv->video_height; + movie_par_d = 10 * bvw->priv->video_width; + break; /* handle these to avoid compiler warnings */ case BVW_RATIO_AUTO: default: --- a/src/backend/bacon-video-widget.h +++ b/src/backend/bacon-video-widget.h @@ -343,6 +343,7 @@ typedef enum { * @BVW_RATIO_FOURBYTHREE: four-by-three (4:3) * @BVW_RATIO_ANAMORPHIC: anamorphic (16:9) * @BVW_RATIO_DVB: DVB (20:9) + * @BVW_RATIO_WXGA: WXGA (16:10) * * The pixel aspect ratios available in which to display videos using * @bacon_video_widget_set_aspect_ratio(). @@ -352,7 +353,8 @@ typedef enum { BVW_RATIO_SQUARE = 1, BVW_RATIO_FOURBYTHREE = 2, BVW_RATIO_ANAMORPHIC = 3, - BVW_RATIO_DVB = 4 + BVW_RATIO_DVB = 4, + BVW_RATIO_WXGA = 5 } BvwAspectRatio; gboolean bacon_video_widget_can_deinterlace (BaconVideoWidget *bvw);