attributo MF_TRANSFORM_ASYNC

Specifica se una trasformazione Media Foundation (MFT) esegue l'elaborazione asincrona.

Tipo di dati

UINT32

Ottenere/impostare

Per ottenere questo attributo, chiamare FMAttributes::GetUINT32.

Per impostare questo attributo, chiamare IMFAttributes::SetUINT32.

Commenti

L'attributo è un valore booleano:

  • Se l'attributo è diverso da zero, MFT esegue l'elaborazione asincrona.
  • Se l'attributo è 0 o meno impostato, MFT è sincrono.

Per ottenere questo attributo, chiamare prima FMTransform::GetAttributes per ottenere l'archivio attributi MFT. Se il metodo ha esito positivo, chiamare IMFAttributes::GetUINT32 per ottenere il valore dell'attributo. Se uno dei due metodi ha esito negativo, MFT è sincrono.

Per le mft asincrone, questo attributo deve essere impostato su un valore diverso da zero. Per le mft sincrone, questo attributo è facoltativo, ma deve essere impostato su 0 se presente.

Le mft asincrone non sono compatibili con le versioni precedenti di Media Foundation. Per usare un MFT asincrono, il client deve impostare l'attributo MF_TRANSFORM_ASYNC_UNLOCK nel MFT. La pipeline di Microsoft Media Foundation esegue automaticamente questo passaggio.

Esempio

Il codice seguente verifica se un MFT esegue l'elaborazione asincrona.

BOOL IsTransformAsync(IMFTransform *pMFT)
{
    BOOL bAsync = FALSE;
    IMFAttributes *pAttributes = NULL;

    HRESULT hr = pMFT->GetAttributes(&pAttributes);
    if (SUCCEEDED(hr))
    {
        bAsync = MFGetAttributeUINT32(pAttributes, MF_TRANSFORM_ASYNC, FALSE);
        pAttributes->Release();
    }

    return (bAsync != FALSE);
}

Requisiti

Requisito Valore
Client minimo supportato
Windows 7 [app desktop | App UWP]
Server minimo supportato
Windows Server 2008 R2 [app desktop | App UWP]
Intestazione
Mftransform.h

Vedi anche

Elenco alfabetico degli attributi di Media Foundation

MFT asincroni

Attributi di trasformazione

MF_TRANSFORM_ASYNC_UNLOCK