description | ms.assetid | title | ms.topic | ms.date |
---|---|---|---|---|
Contains the friendly names of the Synchronized Accessible Media Interchange (SAMI) styles defined in the SAMI file. |
bc679f0e-17f6-455c-8a00-1d435538ef86 |
MF_PD_SAMI_STYLELIST attribute (Mfidl.h) |
reference |
05/31/2018 |
Contains the friendly names of the Synchronized Accessible Media Interchange (SAMI) styles defined in the SAMI file.
The SAMI Media Source sets this attribute on the presentation descriptor that it creates.
Byte array
The attribute blob has the following structure:
Data Type
Description
Size (bytes)
DWORD
Number of style strings.
4
For each style string:
DWORD
Size of the string in bytes, including the NULL character.
4
LPWSTR
Null-terminated wide-character string containing the name of the style.
Varies
To set the style or retrieve the current style, use the IMFSAMIStyle interface.
The GUID constant for this attribute is exported from mfuuid.lib.
HRESULT DisplaySAMIStyleNames(IMFPresentationDescriptor *pPD)
{
UINT8 *pBuf = NULL;
UINT32 cbBuf = 0;
HRESULT hr = pPD->GetAllocatedBlob(MF_PD_SAMI_STYLELIST, &pBuf, &cbBuf);
if (SUCCEEDED(hr))
{
DWORD cStyles = ((DWORD*)pBuf)[0];
UINT8 *pStrings = pBuf + sizeof(DWORD);
for (DWORD i = 0; i < cStyles; i++)
{
DWORD cbString = ((DWORD*)pStrings)[0];
pStrings += sizeof(DWORD);
wprintf_s(L"%s\n", (WCHAR*)pStrings);
pStrings += cbString;
}
}
CoTaskMemFree(pBuf);
return hr;
}
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Header |
|