[gst-devel] fixed-aspect video scaling?
Dan Taylor
dtaylor at startrac.com
Sat Nov 15 02:24:13 CET 2008
> -----Original Message-----
> From: Michael Smith [mailto:msmith at xiph.org]
> Sent: Wednesday, November 12, 2008 10:16 AM
> To: Discussion of the development of GStreamer
> Subject: Re: [gst-devel] fixed-aspect video scaling?
>
> On Tue, Nov 11, 2008 at 7:28 PM, Dan Taylor <dtaylor at startrac.com>
wrote:
> > I want to scale video to a fixed height, while keeping the image
> > proportions.
> >
> > I do not see this capability in videoscale. If I set only one
property,
> it
> > is the only one scaled,
> > and the property ranges do not have the "overloaded" values of the
> scaling
> > in mplayer.
>
> Yes, right now, the application has to calculate the image dimensions
> itself if it wants to scale like this (which isn't all that complex,
> but it's obviously easier to have this happen automatically).
>
> Adding a force-aspect-ratio property (like some of the video sinks
> have) would probably be reasonable to do.
>
> Mike
I hadn't tripped over the force-aspect-ratio properties of the other
video sinks. I've added this property to the fbdevsink, rather than
making a redundant (for those sinks) change to the scaling engine.
While I was in the fbdevsink, I made a lot of other changes to it that
make it easier to embed. I've added properties for a "box" in which
the video is displayed, controls for whether, or not, to center, and
in which axes, and controls for whether to fit in x, y, or both. In
addition, if centering an image larger than the buffer/box in x or y,
the center portion of the image is displayed, and I use a table to
drive the copy, so the several multiplies in the render routine are
moved to a routine that only runs at setup/property change time.
I left the default behavior as is, such that if none of the new
properties are set, it displays exactly as the original.
It isn't cleaned up enough to generate a patch, just yet. When it is,
I will submit it and hope someone else finds it useful.
Thanks for info about the force-aspect-ratio in the other sinks.
More information about the gstreamer-devel
mailing list