Codecs.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:4k
源码类别:

模拟服务器

开发平台:

C/C++

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