plugin_dshow_config.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* Copyright (C) 2011-2013 Doubango Telecom <http://www.doubango.org>
  2. *
  3. * This file is part of Open Source Doubango Framework.
  4. *
  5. * DOUBANGO is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * DOUBANGO 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
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with DOUBANGO.
  17. */
  18. #ifndef PLUGIN_DSHOW_CONFIG_H
  19. #define PLUGIN_DSHOW_CONFIG_H
  20. #ifdef __SYMBIAN32__
  21. #undef _WIN32 /* Because of WINSCW */
  22. #endif
  23. // Windows (XP/Vista/7/CE and Windows Mobile) macro definition
  24. #if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
  25. # define PLUGIN_DSHOW_UNDER_WINDOWS 1
  26. # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
  27. # define PLUGIN_DSHOW_UNDER_WINDOWS_RT 1
  28. # endif
  29. #endif
  30. #if (PLUGIN_DSHOW_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(PLUGIN_DSHOW_EXPORTS)
  31. # define PLUGIN_DSHOW_API __declspec(dllexport)
  32. # define PLUGIN_DSHOW_GEXTERN extern __declspec(dllexport)
  33. #elif (PLUGIN_DSHOW_UNDER_WINDOWS || defined(__SYMBIAN32__)) && !defined(PLUGIN_DSHOW_IMPORTS_IGNORE)
  34. # define PLUGIN_DSHOW_API __declspec(dllimport)
  35. # define PLUGIN_DSHOW_GEXTERN __declspec(dllimport)
  36. #else
  37. # define PLUGIN_DSHOW_API
  38. # define PLUGIN_DSHOW_GEXTERN extern
  39. #endif
  40. /* Guards against C++ name mangling
  41. */
  42. #ifdef __cplusplus
  43. # define PLUGIN_DSHOW_BEGIN_DECLS extern "C" {
  44. # define PLUGIN_DSHOW_END_DECLS }
  45. #else
  46. # define PLUGIN_DSHOW_BEGIN_DECLS
  47. # define PLUGIN_DSHOW_END_DECLS
  48. #endif
  49. /* Disable some well-known warnings
  50. */
  51. #ifdef _MSC_VER
  52. # pragma warning (disable:4995 4996)
  53. # define _CRT_SECURE_NO_WARNINGS
  54. #endif
  55. /* Detecting C99 compilers
  56. */
  57. #if (__STDC_VERSION__ == 199901L) && !defined(__C99__)
  58. # define __C99__
  59. #endif
  60. #if PLUGIN_DSHOW_UNDER_WINDOWS
  61. #include <windows.h>
  62. #endif
  63. #include <stdint.h>
  64. #include <stdlib.h>
  65. #include <malloc.h>
  66. #include <memory.h>
  67. #include <tchar.h>
  68. #ifdef __SYMBIAN32__
  69. #include <stdlib.h>
  70. #endif
  71. #if HAVE_CONFIG_H
  72. #include <config.h>
  73. #endif
  74. #if !defined(TDSHOW_DEFINE_GUID) && !defined(_WIN32_WCE)
  75. #define TDSHOW_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
  76. EXTERN_C const GUID DECLSPEC_SELECTANY name \
  77. = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
  78. #elif !defined(TDSHOW_DEFINE_GUID) && defined(_WIN32_WCE)
  79. #define TDSHOW_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
  80. EXTERN_C const GUID __declspec(selectany) name \
  81. = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
  82. #endif
  83. #if 1 // workaround for "Cannot open include file: 'dxtrans.h': No such file or directory"
  84. #pragma include_alias( "dxtrans.h", "qedit.h" )
  85. #define __IDxtCompositor_INTERFACE_DEFINED__
  86. #define __IDxtAlphaSetter_INTERFACE_DEFINED__
  87. #define __IDxtJpeg_INTERFACE_DEFINED__
  88. #define __IDxtKey_INTERFACE_DEFINED__
  89. #endif
  90. #endif // PLUGIN_DSHOW_CONFIG_H