[Bug 727483] New: v4l2sink: Keep aspect ratio when device scale

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Apr 2 02:20:26 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=727483
  GStreamer | gst-plugins-good | unspecified

           Summary: v4l2sink: Keep aspect ratio when device scale
    Classification: Platform
           Product: GStreamer
           Version: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: aurelien.zanelli at parrot.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=273456)
 View: https://bugzilla.gnome.org/attachment.cgi?id=273456
 Review: https://bugzilla.gnome.org/review?bug=727483&attachment=273456

v4l2sink: Keep aspect ratio when device scale

It seems to be the responsibility of the application to ensure that aspect
ratio is preserved. The device aspect ratio is constant within a standard. I
attached a preliminary work which preserve display aspect ratio of the video.
It has been written on 1.2 branch but it should apply on master with a little
conflict in v4l2_calls.c

Here is the main idea of the solution:
First we determine if device can scale using VIDIOC_CROPCAP ioctl by checking
if cropcap.bounds and cropcaps.defrect differs. If so we doesn't want to force
PAR in caps.
Then, when we know video information and if scaling is supported, we determine
the target rectangle and we set it with CROP ioctl.

This work is not complete since is conflicting with cropping property (crop_*)
of v4l2sink element and it scale into output device bounds instead of
user-defined display windows.
However before working further on this topic, I think it's better to have
comments and remarks.

Regards

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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