コード例 #1
0
ファイル: VideoOutput.cpp プロジェクト: jay602/QtAV
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());
}
コード例 #2
0
ファイル: VideoOutput.cpp プロジェクト: xiongbinsh/QtAV
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;
}