6 #ifndef _INC_cDirectMediaType_H
7 #define _INC_cDirectMediaType_H
12 #include "../GrayLibBase.h"
15 #if defined(USE_DX_SHOW)
22 #define EC_COMPLETE 0x01
24 #ifndef EC_DEVICE_LOST
25 #define EC_DEVICE_LOST 1
26 #define EC_USERABORT 2
27 #define EC_ERRORABORT 3
35 class cDirectMediaType :
public ::AM_MEDIA_TYPE
41 cDirectMediaType() noexcept
43 cMem::Zero(
static_cast<::AM_MEDIA_TYPE*
>(
this),
sizeof(::AM_MEDIA_TYPE));
53 static inline void FreeMediaType(::AM_MEDIA_TYPE& mt)
55 if (mt.cbFormat != 0 && mt.pbFormat !=
nullptr)
57 ::CoTaskMemFree((PVOID)mt.pbFormat);
59 mt.pbFormat =
nullptr;
61 if (mt.pUnk !=
nullptr)
static void Zero(void *pData, size_t nSizeBlock) noexcept
Definition: cMem.h:100