IltmmMediaSampleDisp::SetDXGITexture

Summary

Writes a Direct3D 11 2D Texture to the media sample data.

Syntax

#include "ltmm.h"

Language Syntax
C HRESULT IltmmMediaSampleDisp_SetDXGITexture(pediaSampleDisp, pContext, pTexture)
C++ HRESULT SetDXGITexture(pContext, pTexture)

Parameters

IltmmMediaSampleDisp * pediaSampleDisp

pointer to an IltmmMediaSampleDisp interface

IUnknown *pContext

Pointer to the Device Context object, the device represents the display adapter and used for rendering commands.

IUnknown *pTexture

Pointer to the 2D Texture object.

Returns

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.

Comments

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 texture 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.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

Language Example
C Copying ltmmMediaSample attributes and data
C++ Copying ltmmMediaSample attributes and data
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.