attribut MF_TOPOLOGY_STATIC_PLAYBACK_OPTIMIZATIONS
Active les optimisations statiques dans le pipeline vidéo.
Type de données
UINT32
Obtenir/définir
Pour obtenir cet attribut, appelez IMFAttributes::GetUINT32.
Pour définir cet attribut, appelez IMFAttributes::SetUINT32.
S’applique à
Notes
Définissez cet attribut avant de charger une topologie. Si l’attribut a la valeur TRUE, le chargeur de topologie tente d’optimiser le pipeline avant le début de la lecture.
Si vous définissez cet attribut, vous devez également définir les attributs suivants :
La constante GUID de cet attribut est exportée à partir de mfuuid.lib.
Exemples
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;
}
Spécifications
Condition requise | Valeur |
---|---|
Client minimal pris en charge |
Windows 7 [applications de bureau uniquement] |
Serveur minimal pris en charge |
Windows Server 2008 R2 [applications de bureau uniquement] |
En-tête |
|
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour