MF_TOPOLOGY_STATIC_PLAYBACK_OPTIMIZATIONS 특성

비디오 파이프라인에서 정적 최적화를 사용하도록 설정합니다.

데이터 형식

UINT32

가져오기/설정

이 특성을 얻으려면 IMFAttributes::GetUINT32를 호출합니다.

이 특성을 설정하려면 IMFAttributes::SetUINT32를 호출합니다.

적용 대상

IMFTopology

설명

토폴로지를 로드하기 전에 이 특성을 설정합니다. 특성이 TRUE이면 토폴로지 로더는 재생이 시작되기 전에 파이프라인을 최적화하려고 시도합니다.

이 특성을 설정하는 경우 다음 특성도 설정해야 합니다.

이 특성의 GUID 상수는 mfuuid.lib에서 내보냅니다.

예제

HRESULT SetPlaybackOptimizations(IMFTopology *pTopology, HWND hwnd)
{
    HRESULT hr = pTopology->SetUINT32(
        MF_TOPOLOGY_STATIC_PLAYBACK_OPTIMIZATIONS, TRUE);

    if (FAILED(hr))
    {
        return hr;
    }

    HMONITOR hCurrentMon = MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY);

    if (hCurrentMon)
    {
        MONITORINFO MonitorInfo = {0};
        MonitorInfo.cbSize = sizeof(MONITORINFO);

        BOOL fSucceeded = GetMonitorInfo(hCurrentMon, &MonitorInfo);

        if (fSucceeded )
        {
            const RECT& rcMonitor = MonitorInfo.rcMonitor;

            LONG width = rcMonitor.right - rcMonitor.left;
            LONG height = rcMonitor.bottom - rcMonitor.top;

            hr = MFSetAttributeSize(
                pTopology, 
                MF_TOPOLOGY_PLAYBACK_MAX_DIMS, 
                (UINT32)width, (UINT32)height
                );

            if (FAILED(hr))
            {
                goto done;
            }

            HDC hdc = GetDC(hwnd);

            hr = MFSetAttributeRatio(
                pTopology,
                MF_TOPOLOGY_PLAYBACK_FRAMERATE,
                GetDeviceCaps(hdc, VREFRESH), 1
                );

            ReleaseDC(hwnd, hdc);
        }
    }
done:
    return hr;
}

요구 사항

요구 사항
지원되는 최소 클라이언트
Windows 7 [데스크톱 앱만 해당]
지원되는 최소 서버
Windows Server 2008 R2 [데스크톱 앱만 해당]
헤더
Mfidl.h

추가 정보

미디어 파운데이션 특성의 사전순 목록

토폴로지 특성

비디오 품질 관리