C Syntax | HRESULT IltmmMediaSampleDisp_SetDXGITexture(pediaSampleDisp, pContext, pTexture) |
C++ Syntax | HRESULT SetDXGITexture(pContext, pTexture) |
Writes a Direct3D 11 2D Texture to the media sample data.
pointer to an interface
Pointer to the Device Context object, the device represents the display adapter and used for rendering commands.
Pointer to the 2D Texture object.
Value | Meaning |
---|---|
S_OK | The function was successful. |
<> S_OK | An error occurred. Refer to the Error Codes or the HRESULT error codes in the DirectShow documentation. |
Use this function to assign a COM object of type (ID3D11DeviceContext) as the Device Context object, to assign a COM object of type (ID3D11Texture2D) as the 2D Texture object, and to directly write a Direct3D 11 2D Texture to the stream.
The texture must be of a resource type D3D11_RESOURCE_DIMENSION_TEXTURE2D and the texture resource must have one of the following format (DXGI_FORMAT) values:
If the supplied texure is already a staging texture, it will be used directly; otherwise, a staging texture will be created out of it.
If the supplied texture had MSAA (Multisample anti-aliasing) content, it will be resolved before copying the data into the staging texture.
Win32, x64
For a C example, refer to Copying ltmmMediaSample attributes and data for C.
For a C++ example, refer to Copying ltmmMediaSample attributes and data for C++.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document