As far as I know, it is impossible to tell in which position the camera is 
before you actually see its viewfinder in VideoOutput :)

In my case I had a camera upside-down, so 180 degree rotation. I managed it 
like this:

property bool cameraUpsideDown: true

Camera {
    id: camera
    metaData.orientation: cameraUpsideDown ? 180 : 0
    // ...
}

VideoOutput {
    orientation: cameraUpsideDown ? 180 : 0
    source: camera
    // ...
}

And then if you need to preview images made by this camera you can bind their 
orientation to EXIF values:

Image {
    autoTransform: true
    // ...
}

But I feel like I misunderstood your question.

---
Artem Sidyakin

> On 9 Dec 2018, at 23:53, Alexander Ivash <[email protected]> wrote:
> 
> пн, 10 дек. 2018 г. в 12:33, René Hansen <[email protected]>:
> You can get the Camera orientation like so:
> 
> QCamera *cam = qvariant_cast<QCamera 
> *>(m_filter->camera()->property("mediaObject"));
> QCameraInfo(*cam).orientation()
> 
> Then in case orientation is not % 180, you can rotate the image.
> 
> 
>  Is it the same as QML Camera's 'orientation' ? 
> http://doc.qt.io/qt-5/qml-qtmultimedia-camera.html#orientation-prop
> Or this is actual orientation? Maybe you could share sample which 'unrotate' 
> based on this property?
> 
> 
> _______________________________________________
> Interest mailing list
> [email protected]
> https://lists.qt-project.org/listinfo/interest

_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest

Reply via email to