Exemple #1
0
void VideoOutput::onSetOutAspectRatio(qreal ratio)
{
    if (!isAvailable())
        return;
    DPTR_D(VideoOutput);
    qreal a = d.impl->outAspectRatio();
    OutAspectRatioMode am = d.impl->outAspectRatioMode();
    d.impl->setOutAspectRatio(ratio);
    if (a != outAspectRatio())
        emit outAspectRatioChanged(ratio);
    if (am != outAspectRatioMode())
        emit outAspectRatioModeChanged(outAspectRatioMode());
}
Exemple #2
0
bool VideoOutput::onSetOutAspectRatio(qreal ratio)
{
    DPTR_D(VideoOutput);
    qreal a = outAspectRatio();
    OutAspectRatioMode am = outAspectRatioMode();
    d.impl->onSetOutAspectRatio(ratio);
    d.out_rect = d.impl->videoRect();
    d.out_aspect_ratio = d.impl->outAspectRatio();
    d.out_aspect_ratio_mode = d.impl->outAspectRatioMode();
    bool changed = false;
    if (a != outAspectRatio()) {
        changed = true;
        emit outAspectRatioChanged(ratio);
    }
    if (am != outAspectRatioMode()) {
        changed = true;
        emit outAspectRatioModeChanged(outAspectRatioMode());
    }
    return changed;
}