home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / codecs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  4.5 KB  |  135 lines

  1. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  2. //****************************************************************************
  3. //  File: CODECS.H
  4. //  Content:    
  5. //              
  6. //
  7. //  Copyright (c) Microsoft Corporation 1997
  8. //      All Rights Reserved
  9. //
  10. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 
  11. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
  12. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
  13. // PARTICULAR PURPOSE.
  14. //****************************************************************************
  15.  
  16. #include <pshpack8.h> /* Assume 8 byte packing throughout */
  17. #include "appavcap.h"
  18.  
  19. /*
  20.  *    Constants
  21.  */
  22.  
  23. // hresult codes, facility IC = 0x301
  24. #define IC_E_CAPS_INSTANTIATION_FAILURE        0x83010001    // could not instantiate a required caps object
  25. #define IC_E_CAPS_INITIALIZATION_FAILURE    0x83010002    // could not initialize a required bject
  26. #define IC_E_NO_FORMATS                        0x83010003    // no formats available
  27. #define IC_E_NO_SUCH_FORMAT                    0x83010005    // no matching AC</VCM format was found
  28. #define IC_E_INTERNAL_ERROR                    0x83010006    // the Network Audio/Video Controller
  29.                                                         // reported a system error
  30.  
  31. /*
  32.  *    Macros
  33.  */
  34.  
  35. /*
  36.  *    Data Structures
  37.  */
  38.  
  39. /*
  40.  *    Functions
  41.  */
  42.  
  43. /*
  44.  *    Interfaces
  45.  */
  46.  
  47. #ifndef DECLARE_INTERFACE_PTR
  48. #ifdef __cplusplus
  49. #define DECLARE_INTERFACE_PTR(iface, piface)                       \
  50.     interface iface; typedef iface FAR * piface
  51. #else
  52. #define DECLARE_INTERFACE_PTR(iface, piface)                       \
  53.     typedef interface iface iface, FAR * piface
  54. #endif
  55. #endif /* DECLARE_INTERFACE_PTR */
  56.  
  57.  
  58. #define IUNKNOWN_METHODS(IPURE)                                        \
  59.     STDMETHOD (QueryInterface)                                      \
  60.         (THIS_ REFIID riid, LPVOID FAR * ppvObj) IPURE;                \
  61.     STDMETHOD_(ULONG,AddRef)  (THIS) IPURE;                            \
  62.     STDMETHOD_(ULONG,Release) (THIS) IPURE;                            \
  63.  
  64. #define IINSTALLAUDIOCODECS_METHODS(IPURE)                            \
  65.     STDMETHOD(AddACMFormat)                                            \
  66.         (THIS_ LPWAVEFORMATEX lpwfx, PAUDCAP_INFO pAudCapInfo) IPURE;    \
  67.     STDMETHOD (RemoveACMFormat)                                        \
  68.         (THIS_ LPWAVEFORMATEX lpwfx) IPURE;    \
  69.     STDMETHOD (ReorderFormats)                                        \
  70.         (THIS_ PAUDCAP_INFO_LIST pAudCapInfoList) IPURE;            \
  71.     STDMETHOD (EnumFormats)                                            \
  72.         (THIS_ PAUDCAP_INFO_LIST *ppAudCapInfoList) IPURE;    \
  73.     STDMETHOD (FreeBuffer) (THIS_ LPVOID lpBuffer) IPURE;            \
  74.  
  75. #define IINSTALLVIDEOCODECS_METHODS(IPURE)                            \
  76.     STDMETHOD(AddVCMFormat)                                            \
  77.         (THIS_ PVIDCAP_INFO pVidCapInfo) IPURE;    \
  78.     STDMETHOD (RemoveVCMFormat)                                        \
  79.         (THIS_ PVIDCAP_INFO pVidCapInfo) IPURE;    \
  80.     STDMETHOD (ReorderFormats)                                        \
  81.         (THIS_ PVIDCAP_INFO_LIST pVidCapInfoList) IPURE;            \
  82.     STDMETHOD (EnumFormats)                                            \
  83.         (THIS_ PVIDCAP_INFO_LIST *ppVidCapInfoList) IPURE;    \
  84.     STDMETHOD (FreeBuffer) (THIS_ LPVOID lpBuffer) IPURE;            \
  85.  
  86. // IInstallAudioCodecs
  87. #undef       INTERFACE
  88. #define      INTERFACE  IInstallAudioCodecs
  89. DECLARE_INTERFACE_(IInstallAudioCodecs, IUnknown)
  90. {
  91.     IUNKNOWN_METHODS(PURE)
  92.     IINSTALLAUDIOCODECS_METHODS(PURE)
  93. };
  94. DECLARE_INTERFACE_PTR(IInstallAudioCodecs, LPINSTALLAUDIOCODECS);
  95.  
  96. // IInstallVideooCodecs
  97. #undef       INTERFACE
  98. #define      INTERFACE  IInstallVideoCodecs
  99. DECLARE_INTERFACE_(IInstallVideoCodecs, IUnknown)
  100. {
  101.     IUNKNOWN_METHODS(PURE)
  102.     IINSTALLVIDEOCODECS_METHODS(PURE)
  103. };
  104. DECLARE_INTERFACE_PTR(IInstallVideoCodecs, LPINSTALLVIDEOCODECS);
  105.  
  106. // IInstallAudioCodecs
  107. #undef       INTERFACE
  108. #define      INTERFACE  IInstallCodecs
  109. DECLARE_INTERFACE_(IInstallCodecs, IUnknown)
  110. {
  111.     IUNKNOWN_METHODS(PURE)
  112. };
  113. DECLARE_INTERFACE_PTR(IInstallCodecs, LPINSTALLCODECS);
  114.  
  115. EXTERN_C HRESULT WINAPI CreateInstallCodecs (
  116.                                 IUnknown *punkOuter,
  117.                                 REFIID riid,
  118.                                 void **ppv);
  119.  
  120. typedef HRESULT (WINAPI *PFNCREATEINSTALLCODECS)
  121.                 (IUnknown *punkOuter, REFIID riid, void **ppv);
  122.  
  123.  
  124. // {8ED14CC0-7A1F-11d0-92F6-00A0C922E6B2}
  125. DEFINE_GUID(CLSID_InstallCodecs, 0x8ed14cc0, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  126. // {8ED14CC1-7A1F-11d0-92F6-00A0C922E6B2}
  127. DEFINE_GUID(IID_IInstallCodecs, 0x8ed14cc1, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  128. // {8ED14CC2-7A1F-11d0-92F6-00A0C922E6B2}
  129. DEFINE_GUID(IID_IInstallAudioCodecs, 0x8ed14cc2, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  130. // {8ED14CC3-7A1F-11d0-92F6-00A0C922E6B2}
  131. DEFINE_GUID(IID_IInstallVideoCodecs, 0x8ed14cc3, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  132.  
  133. #include <poppack.h> /* End byte packing */
  134. #pragma option pop /*P_O_Pop*/
  135.