CSupported.cpp
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:2k
源码类别:

DirextX编程

开发平台:

Visual C++

  1. //
  2. // CSupported.cpp
  3. //
  4. #include "stdafx.h"
  5. #include <initguid.h>
  6. #include <streams.h>
  7. #include "CSupported.h"
  8. // {38be3000-dbf4-11d0-860e-00a024cfef6d}
  9. DEFINE_GUID(CLSID_MicrosoftMp3Decoder, 
  10. 0x38be3000, 0xdbf4, 0x11d0, 0x86, 0x0e, 0x00, 0xa0, 0x24, 0xcf, 0xef, 0x6d);
  11. // {d51bd5a1-7548-11cf-a520-0080c77ef58a}
  12. DEFINE_GUID(CLSID_MicrosoftWaveParser, 
  13. 0xd51bd5a1, 0x7548, 0x11cf, 0xa5, 0x20, 0x00, 0x80, 0xc7, 0x7e, 0xf5, 0x8a);
  14. // {280a3020-86cf-11d1-abe6-00a0c905f375}
  15. DEFINE_GUID(CLSID_MicrosoftAC3Parser, 
  16. 0x280a3020, 0x86cf, 0x11d1, 0xab, 0xe6, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75);
  17. // {94297043-bd82-4dfd-b0de-8177739c6d20}
  18. DEFINE_GUID(CLSID_MicrosoftDMOWrapper, 
  19. 0x94297043, 0xbd82, 0x4dfd, 0xb0, 0xde, 0x81, 0x77, 0x73, 0x9c, 0x6d, 0x20);
  20. GUID CSupported::sSupportedGUIDs[];
  21. long CSupported::sGUIDCount = 0;
  22. /////////////////////////////////////////////////////////////////
  23. CSupported::CSupported()
  24. {
  25. long i = 0;
  26. // Video Renderer and Audio Renderer
  27. sSupportedGUIDs[i++] = CLSID_VideoRenderer;
  28. sSupportedGUIDs[i++] = CLSID_DSoundRender;
  29. // Microsoft AVI codec and miscellaneous utilities
  30. sSupportedGUIDs[i++] = CLSID_AviSplitter;
  31. sSupportedGUIDs[i++] = CLSID_AVIDec;
  32. sSupportedGUIDs[i++] = CLSID_MicrosoftWaveParser;
  33. sSupportedGUIDs[i++] = CLSID_MicrosoftAC3Parser;
  34. // DV filters
  35. sSupportedGUIDs[i++] = CLSID_DVSplitter;
  36. sSupportedGUIDs[i++] = CLSID_DVVideoCodec;  
  37. // Microsoft Mpeg1 codec
  38. sSupportedGUIDs[i++] = CLSID_MPEG1Splitter;
  39. sSupportedGUIDs[i++] = CLSID_CMpegAudioCodec;
  40. sSupportedGUIDs[i++] = CLSID_CMpegVideoCodec;
  41. sSupportedGUIDs[i++] = CLSID_MicrosoftMp3Decoder;
  42. // Microsoft Mpeg2 codec
  43. sSupportedGUIDs[i++] = CLSID_MMSPLITTER;
  44. sSupportedGUIDs[i++] = CLSID_MPEG2Demultiplexer;
  45. // This way, we support all DMO codecs. Maybe too arbitrary!
  46. sSupportedGUIDs[i++] = CLSID_MicrosoftDMOWrapper;
  47. sGUIDCount = i; // total count of CSupported GUIDs
  48. }
  49. CSupported::~CSupported()
  50. {
  51. }
  52. BOOL CSupported::IsGUIDSupported(GUID inGUID)
  53. {
  54. for (long i = 0; i < sGUIDCount; i++)
  55. {
  56. if (sSupportedGUIDs[i] == inGUID)
  57. {
  58. return TRUE;
  59. }
  60. }
  61. return FALSE;
  62. }