1cpp_quote("/**") 2cpp_quote(" * This file is part of the mingw-w64 runtime package.") 3cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.") 4cpp_quote(" */") 5cpp_quote("") 6 7cpp_quote("#include <winapifamily.h>") 8cpp_quote("") 9 10import "unknwn.idl"; 11import "objidl.idl"; 12 13cpp_quote("") 14cpp_quote("#ifdef __strmif_h__") 15cpp_quote("typedef AM_MEDIA_TYPE DMO_MEDIA_TYPE;") 16cpp_quote("#else") 17typedef struct _DMOMediaType { 18 GUID majortype; 19 GUID subtype; 20 WINBOOL bFixedSizeSamples; 21 WINBOOL bTemporalCompression; 22 ULONG lSampleSize; 23 GUID formattype; 24 IUnknown *pUnk; 25 ULONG cbFormat; 26 [size_is (cbFormat)] BYTE *pbFormat; 27} DMO_MEDIA_TYPE; 28 29cpp_quote("") 30typedef LONGLONG REFERENCE_TIME; 31cpp_quote("#endif") 32 33cpp_quote("") 34enum _DMO_INPUT_DATA_BUFFER_FLAGS { 35 DMO_INPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001, 36 DMO_INPUT_DATA_BUFFERF_TIME = 0x00000002, 37 DMO_INPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004, 38 DMO_INPUT_DATA_BUFFERF_DISCONTINUITY = 0x00000008 39}; 40 41cpp_quote("") 42enum _DMO_OUTPUT_DATA_BUFFER_FLAGS { 43 DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001, 44 DMO_OUTPUT_DATA_BUFFERF_TIME = 0x00000002, 45 DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004, 46 DMO_OUTPUT_DATA_BUFFERF_DISCONTINUITY = 0x00000008, 47 DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE = 0x01000000 48}; 49 50cpp_quote("") 51enum _DMO_INPUT_STATUS_FLAGS { 52 DMO_INPUT_STATUSF_ACCEPT_DATA = 0x00000001 53}; 54 55cpp_quote("") 56enum _DMO_INPUT_STREAM_INFO_FLAGS { 57 DMO_INPUT_STREAMF_WHOLE_SAMPLES = 0x00000001, 58 DMO_INPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002, 59 DMO_INPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004, 60 DMO_INPUT_STREAMF_HOLDS_BUFFERS = 0x00000008 61}; 62 63cpp_quote("") 64enum _DMO_OUTPUT_STREAM_INFO_FLAGS { 65 DMO_OUTPUT_STREAMF_WHOLE_SAMPLES = 0x00000001, 66 DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002, 67 DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004, 68 DMO_OUTPUT_STREAMF_DISCARDABLE = 0x00000008, 69 DMO_OUTPUT_STREAMF_OPTIONAL = 0x00000010 70}; 71 72cpp_quote("") 73enum _DMO_SET_TYPE_FLAGS { 74 DMO_SET_TYPEF_TEST_ONLY = 0x00000001, 75 DMO_SET_TYPEF_CLEAR = 0x00000002 76}; 77 78cpp_quote("") 79enum _DMO_PROCESS_OUTPUT_FLAGS { 80 DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER = 0x00000001 81}; 82 83cpp_quote("") 84cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)") 85enum _DMO_INPLACE_PROCESS_FLAGS { 86 DMO_INPLACE_NORMAL = 0x00000000, 87 DMO_INPLACE_ZERO = 0x00000001 88}; 89 90cpp_quote("") 91enum _DMO_QUALITY_STATUS_FLAGS { 92 DMO_QUALITY_STATUS_ENABLED = 0x00000001 93}; 94 95cpp_quote("") 96enum _DMO_VIDEO_OUTPUT_STREAM_FLAGS { 97 DMO_VOSF_NEEDS_PREVIOUS_SAMPLE = 0x00000001 98}; 99 100cpp_quote("") 101[object, local, uuid (59eff8b9-938c-4a26-82f2-95cb84cdc837)] 102interface IMediaBuffer : IUnknown { 103 HRESULT SetLength (DWORD cbLength); 104 HRESULT GetMaxLength ([out] DWORD *pcbMaxLength); 105 HRESULT GetBufferAndLength ([out] BYTE **ppBuffer,[out] DWORD *pcbLength); 106} 107 108cpp_quote("") 109typedef struct _DMO_OUTPUT_DATA_BUFFER { 110 IMediaBuffer *pBuffer; 111 DWORD dwStatus; 112 REFERENCE_TIME rtTimestamp; 113 REFERENCE_TIME rtTimelength; 114} DMO_OUTPUT_DATA_BUFFER,*PDMO_OUTPUT_DATA_BUFFER; 115 116cpp_quote("") 117[object, local, uuid (d8ad0f58-5494-4102-97c5-ec798e59bcf4)] 118interface IMediaObject : IUnknown { 119 HRESULT GetStreamCount ([out] DWORD *pcInputStreams,[out] DWORD *pcOutputStreams); 120 HRESULT GetInputStreamInfo (DWORD dwInputStreamIndex,[out] DWORD *pdwFlags); 121 HRESULT GetOutputStreamInfo (DWORD dwOutputStreamIndex,[out] DWORD *pdwFlags); 122 HRESULT GetInputType (DWORD dwInputStreamIndex, DWORD dwTypeIndex,[out] DMO_MEDIA_TYPE *pmt); 123 HRESULT GetOutputType (DWORD dwOutputStreamIndex, DWORD dwTypeIndex,[out] DMO_MEDIA_TYPE *pmt); 124 HRESULT SetInputType (DWORD dwInputStreamIndex,[in] const DMO_MEDIA_TYPE *pmt, DWORD dwFlags); 125 HRESULT SetOutputType (DWORD dwOutputStreamIndex,[in] const DMO_MEDIA_TYPE *pmt, DWORD dwFlags); 126 HRESULT GetInputCurrentType (DWORD dwInputStreamIndex,[out] DMO_MEDIA_TYPE *pmt); 127 HRESULT GetOutputCurrentType (DWORD dwOutputStreamIndex,[out] DMO_MEDIA_TYPE *pmt); 128 HRESULT GetInputSizeInfo (DWORD dwInputStreamIndex,[out] DWORD *pcbSize,[out] DWORD *pcbMaxLookahead,[out] DWORD *pcbAlignment); 129 HRESULT GetOutputSizeInfo (DWORD dwOutputStreamIndex,[out] DWORD *pcbSize,[out] DWORD *pcbAlignment); 130 HRESULT GetInputMaxLatency (DWORD dwInputStreamIndex,[out] REFERENCE_TIME *prtMaxLatency); 131 HRESULT SetInputMaxLatency (DWORD dwInputStreamIndex, REFERENCE_TIME rtMaxLatency); 132 HRESULT Flush (); 133 HRESULT Discontinuity (DWORD dwInputStreamIndex); 134 HRESULT AllocateStreamingResources (); 135 HRESULT FreeStreamingResources (); 136 HRESULT GetInputStatus (DWORD dwInputStreamIndex,[out] DWORD *dwFlags); 137 HRESULT ProcessInput (DWORD dwInputStreamIndex, IMediaBuffer *pBuffer, DWORD dwFlags, REFERENCE_TIME rtTimestamp, REFERENCE_TIME rtTimelength); 138 HRESULT ProcessOutput (DWORD dwFlags, DWORD cOutputBufferCount,[in, out, size_is (cOutputBufferCount)]DMO_OUTPUT_DATA_BUFFER *pOutputBuffers,[out] DWORD *pdwStatus); 139 HRESULT Lock (LONG bLock); 140}; 141 142cpp_quote("") 143[object, local, uuid (2c3cd98a-2bfa-4a53-9c27-5249ba64ba0f)] 144interface IEnumDMO : IUnknown { 145 HRESULT Next (DWORD cItemsToFetch,[out, size_is (cItemsToFetch), length_is (*pcItemsFetched)] CLSID *pCLSID,[out, size_is (cItemsToFetch), length_is (*pcItemsFetched), string] LPWSTR *Names,[out] DWORD *pcItemsFetched); 146 HRESULT Skip (DWORD cItemsToSkip); 147 HRESULT Reset (void); 148 HRESULT Clone ([out] IEnumDMO **ppEnum); 149} 150 151cpp_quote("") 152[object, local, uuid (651b9ad0-0fc7-4aa9-9538-d89931010741)] 153interface IMediaObjectInPlace : IUnknown { 154 HRESULT Process ([in] ULONG ulSize,[in, out, size_is (ulSize)] BYTE *pData,[in] REFERENCE_TIME refTimeStart,[in] DWORD dwFlags); 155 HRESULT Clone ([out] IMediaObjectInPlace **ppMediaObject); 156 HRESULT GetLatency ([out] REFERENCE_TIME *pLatencyTime); 157} 158 159cpp_quote("") 160[object, local, uuid (65abea96-cf36-453f-af8a-705e98f16260)] 161interface IDMOQualityControl : IUnknown { 162 HRESULT SetNow ([in] REFERENCE_TIME rtNow); 163 HRESULT SetStatus ([in] DWORD dwFlags); 164 HRESULT GetStatus ([out] DWORD *pdwFlags); 165} 166 167cpp_quote("") 168[object, local, uuid (be8f4f4e-5b16-4d29-b350-7f6b5d9298ac)] 169interface IDMOVideoOutputOptimizations : IUnknown { 170 HRESULT QueryOperationModePreferences (ULONG ulOutputStreamIndex, DWORD *pdwRequestedCapabilities); 171 HRESULT SetOperationMode (ULONG ulOutputStreamIndex, DWORD dwEnabledFeatures); 172 HRESULT GetCurrentOperationMode (ULONG ulOutputStreamIndex, DWORD *pdwEnabledFeatures); 173 HRESULT GetCurrentSampleRequirements (ULONG ulOutputStreamIndex, DWORD *pdwRequestedFeatures); 174} 175cpp_quote("#endif") 176