Home | History | Annotate | Download | only in include
      1 /*
      2  * Copyright (C) 2002 Alexandre Julliard
      3  * Copyright (C) 2004 Vincent Bron
      4  *
      5  * This library is free software; you can redistribute it and/or
      6  * modify it under the terms of the GNU Lesser General Public
      7  * License as published by the Free Software Foundation; either
      8  * version 2.1 of the License, or (at your option) any later version.
      9  *
     10  * This library is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13  * Lesser General Public License for more details.
     14  *
     15  * You should have received a copy of the GNU Lesser General Public
     16  * License along with this library; if not, write to the Free Software
     17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
     18  */
     19 
     20 import "unknwn.idl";
     21 import "objidl.idl";
     22 import "strmif.idl";
     23 
     24 interface IDMOQualityControl;
     25 interface IDMOVideoOutputOptimizations;
     26 
     27 typedef struct _DMOMediaType
     28 {
     29     GUID majortype;
     30     GUID subtype;
     31     BOOL bFixedSizeSamples;
     32     BOOL bTemporalCompression;
     33     ULONG lSampleSize;
     34     GUID formattype;
     35     IUnknown *pUnk;
     36     ULONG cbFormat;
     37     BYTE *pbFormat;
     38 } DMO_MEDIA_TYPE;
     39 
     40 /*****************************************************************************
     41  * IEnumDMO interface
     42  */
     43 [
     44     object,
     45     uuid(2C3CD98A-2BFA-4A53-9C27-5249BA64BA0F),
     46     pointer_default(unique)
     47 ]
     48 interface IEnumDMO : IUnknown
     49 {
     50     [local]
     51     HRESULT Next(
     52         [in] DWORD cItemsToFetch,
     53         [out] CLSID *pCLSID,
     54         [out] WCHAR **Names,
     55         [out] DWORD *pcItemsFetched
     56     );
     57 
     58     HRESULT Skip(
     59         [in] DWORD cItemsToSkip
     60     );
     61 
     62     HRESULT Reset();
     63 
     64     HRESULT Clone(
     65         [out] IEnumDMO **ppEnum
     66     );
     67 }
     68 
     69 /*****************************************************************************
     70  * IMediaBuffer interface
     71  */
     72 [
     73     object,
     74     uuid(59eff8b9-938c-4a26-82f2-95cb84cdc837),
     75     local
     76 ]
     77 interface IMediaBuffer : IUnknown
     78 {
     79     HRESULT SetLength(
     80        DWORD cbLength
     81     );
     82 
     83     HRESULT GetMaxLength(
     84        [out] DWORD *pcbMaxLength
     85     );
     86 
     87     HRESULT GetBufferAndLength(
     88        [out] BYTE **ppBuffer,
     89        [out] DWORD *pcbLength
     90     );
     91 }
     92 
     93 typedef struct _DMO_OUTPUT_DATA_BUFFER {
     94     IMediaBuffer *pBuffer;
     95     DWORD dwStatus;
     96     REFERENCE_TIME rtTimestamp;
     97     REFERENCE_TIME rtTimelength;
     98 } DMO_OUTPUT_DATA_BUFFER, *PDMO_OUTPUT_DATA_BUFFER;
     99 
    100 enum _DMO_INPLACE_PROCESS_FLAGS {
    101     DMO_INPLACE_NORMAL = 0x00000000,
    102     DMO_INPLACE_ZERO   = 0x00000001
    103 };
    104 
    105 /*****************************************************************************
    106  * IMediaObject interface
    107  */
    108 [
    109     object,
    110     uuid(d8ad0f58-5494-4102-97c5-ec798e59bcf4),
    111     local
    112 ]
    113 interface IMediaObject : IUnknown
    114 {
    115     HRESULT GetStreamCount(
    116         [out] DWORD *pcInputStreams,
    117         [out] DWORD *pcOutputStreams
    118     );
    119 
    120     HRESULT GetInputStreamInfo(
    121         DWORD dwInputStreamIndex,
    122         [out] DWORD *pdwFlags
    123     );
    124 
    125     HRESULT GetOutputStreamInfo(
    126         DWORD dwOutputStreamIndex,
    127         [out] DWORD *pdwFlags
    128     );
    129 
    130     HRESULT GetInputType(
    131         DWORD dwInputStreamIndex,
    132         DWORD dwTypeIndex,
    133         [out] DMO_MEDIA_TYPE *pmt
    134     );
    135 
    136     HRESULT GetOutputType(
    137         DWORD dwOutputStreamIndex,
    138         DWORD dwTypeIndex,
    139         [out] DMO_MEDIA_TYPE *pmt
    140     );
    141 
    142     HRESULT SetInputType(
    143         DWORD dwInputStreamIndex,
    144         [in] const DMO_MEDIA_TYPE *pmt,
    145         DWORD dwFlags
    146     );
    147 
    148     HRESULT SetOutputType(
    149         DWORD dwOutputStreamIndex,
    150         [in] const DMO_MEDIA_TYPE *pmt,
    151         DWORD dwFlags
    152     );
    153 
    154     HRESULT GetInputCurrentType(
    155         DWORD dwInputStreamIndex,
    156         [out] DMO_MEDIA_TYPE *pmt
    157     );
    158 
    159     HRESULT GetOutputCurrentType(
    160         DWORD dwOutputStreamIndex,
    161         [out] DMO_MEDIA_TYPE *pmt
    162     );
    163 
    164     HRESULT GetInputSizeInfo(
    165         DWORD dwInputStreamIndex,
    166         [out] DWORD *pcbSize,
    167         [out] DWORD *pcbMaxLookahead,
    168         [out] DWORD *pcbAlignment
    169     );
    170 
    171     HRESULT GetOutputSizeInfo(
    172         DWORD dwOutputStreamIndex,
    173         [out] DWORD *pcbSize,
    174         [out] DWORD *pcbAlignment
    175     );
    176 
    177     HRESULT GetInputMaxLatency(
    178         DWORD dwInputStreamIndex,
    179         [out] REFERENCE_TIME *prtMaxLatency
    180     );
    181 
    182     HRESULT SetInputMaxLatency(
    183         DWORD dwInputStreamIndex,
    184         REFERENCE_TIME rtMaxLatency
    185     );
    186 
    187     HRESULT Flush();
    188 
    189     HRESULT Discontinuity(DWORD dwInputStreamIndex);
    190 
    191     HRESULT AllocateStreamingResources();
    192 
    193     HRESULT FreeStreamingResources();
    194 
    195     HRESULT GetInputStatus(
    196         DWORD dwInputStreamIndex,
    197         [out] DWORD *dwFlags
    198     );
    199 
    200     HRESULT ProcessInput(
    201         DWORD dwInputStreamIndex,
    202         IMediaBuffer *pBuffer,
    203         DWORD dwFlags,
    204         REFERENCE_TIME rtTimestamp,
    205         REFERENCE_TIME rtTimelength
    206     );
    207 
    208     HRESULT ProcessOutput(
    209         DWORD dwFlags,
    210         DWORD cOutputBufferCount,
    211         [in,out] DMO_OUTPUT_DATA_BUFFER *pOutputBuffers,
    212         [out] DWORD *pdwStatus
    213     );
    214 
    215     HRESULT Lock(LONG bLock);
    216 };
    217 
    218 /*****************************************************************************
    219  * IMediaObjectInPlace interface
    220  */
    221 
    222 [
    223     object,
    224     uuid(651b9ad0-0fc7-4aa9-9538-d89931010741),
    225     local
    226 ]
    227 interface IMediaObjectInPlace : IUnknown {
    228     HRESULT Process(
    229         [in] ULONG ulSize,
    230         [in,out] BYTE* pData,
    231         [in] REFERENCE_TIME refTimeStart,
    232         [in] DWORD dwFlags
    233     );
    234 
    235     HRESULT Clone(
    236         [out] IMediaObjectInPlace **ppMediaObject
    237     );
    238 
    239     HRESULT GetLatency(
    240         [out] REFERENCE_TIME *pLatencyTime
    241     );
    242 }
    243