attributo MF_TOPOLOGY_STATIC_PLAYBACK_OPTIMIZATIONS
Abilita le ottimizzazioni statiche nella pipeline video.
Tipo di dati
UINT32
Ottenere/impostare
Per ottenere questo attributo, chiamare IMFAttributes::GetUINT32.
Per impostare questo attributo, chiamare IMFAttributes::SetUINT32.
Si applica a
Commenti
Impostare questo attributo prima di caricare una topologia. Se l'attributo è TRUE, il caricatore della topologia tenta di ottimizzare la pipeline prima dell'avvio della riproduzione.
Se si imposta questo attributo, è necessario impostare anche gli attributi seguenti:
La costante GUID per questo attributo viene esportata da mfuuid.lib.
Esempio
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;
}
Requisiti
Requisito | Valore |
---|---|
Client minimo supportato |
Windows 7 [solo app desktop] |
Server minimo supportato |
Windows Server 2008 R2 [solo app desktop] |
Intestazione |
|
Vedi anche