The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
5.4KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-11 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifdef __JUCE_VIDEO_JUCEHEADER__
  19. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  20. already included any other headers - just put it inside a file on its own, possibly with your config
  21. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  22. header files that the compiler may be using.
  23. */
  24. #error "Incorrect use of JUCE cpp file"
  25. #endif
  26. #define JUCE_DONT_DEFINE_MACROS 1
  27. #include "../juce_core/native/juce_BasicNativeHeaders.h"
  28. #include "../juce_gui_extra/juce_gui_extra.h"
  29. #include "juce_video.h"
  30. #if JUCE_MAC
  31. #if JUCE_QUICKTIME
  32. #define Point CarbonDummyPointName
  33. #define Component CarbonDummyCompName
  34. #import <QTKit/QTKit.h>
  35. #undef Point
  36. #undef Component
  37. #endif
  38. //==============================================================================
  39. #elif JUCE_WINDOWS
  40. #if JUCE_QUICKTIME
  41. /* If you've got an include error here, you probably need to install the QuickTime SDK and
  42. add its header directory to your include path.
  43. Alternatively, if you don't need any QuickTime services, just set the JUCE_QUICKTIME flag to 0.
  44. */
  45. #include <Movies.h>
  46. #include <QTML.h>
  47. #include <QuickTimeComponents.h>
  48. #include <MediaHandlers.h>
  49. #include <ImageCodec.h>
  50. /* If you've got QuickTime 7 installed, then these COM objects should be found in
  51. the "\Program Files\Quicktime" directory. You'll need to add this directory to
  52. your include search path to make these import statements work.
  53. */
  54. #import <QTOLibrary.dll>
  55. #import <QTOControl.dll>
  56. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  57. #pragma comment (lib, "QTMLClient.lib")
  58. #endif
  59. #endif
  60. #if JUCE_USE_CAMERA || JUCE_DIRECTSHOW
  61. /* If you're using the camera classes, you'll need access to a few DirectShow headers.
  62. These files are provided in the normal Windows SDK, but some Microsoft plonker
  63. didn't realise that qedit.h doesn't actually compile without the rest of the DirectShow SDK..
  64. Microsoft's suggested fix for this is to hack their qedit.h file! See:
  65. http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/ed097d2c-3d68-4f48-8448-277eaaf68252
  66. .. which is a bit of a bodge, but a lot less hassle than installing the full DShow SDK.
  67. An alternative workaround is to create a dummy dxtrans.h file and put it in your include path.
  68. The dummy file just needs to contain the following content:
  69. #define __IDxtCompositor_INTERFACE_DEFINED__
  70. #define __IDxtAlphaSetter_INTERFACE_DEFINED__
  71. #define __IDxtJpeg_INTERFACE_DEFINED__
  72. #define __IDxtKey_INTERFACE_DEFINED__
  73. ..and that should be enough to convince qedit.h that you have the SDK!
  74. */
  75. #include <dshow.h>
  76. #include <qedit.h>
  77. #include <dshowasf.h>
  78. #endif
  79. #if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION
  80. #include <evr.h>
  81. #endif
  82. #if JUCE_USE_CAMERA && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  83. #pragma comment (lib, "Strmiids.lib")
  84. #pragma comment (lib, "wmvcore.lib")
  85. #endif
  86. #if JUCE_MEDIAFOUNDATION && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  87. #pragma comment (lib, "mfuuid.lib")
  88. #endif
  89. #if JUCE_DIRECTSHOW && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  90. #pragma comment (lib, "strmiids.lib")
  91. #endif
  92. #endif
  93. //==============================================================================
  94. using namespace juce;
  95. BEGIN_JUCE_NAMESPACE
  96. #if JUCE_MAC || JUCE_IOS
  97. #include "../juce_core/native/juce_osx_ObjCHelpers.h"
  98. #include "../juce_core/native/juce_mac_ObjCSuffix.h"
  99. #if JUCE_USE_CAMERA
  100. #include "native/juce_mac_CameraDevice.mm"
  101. #endif
  102. #if JUCE_QUICKTIME
  103. #include "native/juce_mac_QuickTimeMovieComponent.mm"
  104. #endif
  105. #elif JUCE_WINDOWS
  106. #include "../juce_core/native/juce_win32_ComSmartPtr.h"
  107. #if JUCE_USE_CAMERA
  108. #include "native/juce_win32_CameraDevice.cpp"
  109. #endif
  110. #if JUCE_DIRECTSHOW
  111. #include "native/juce_win32_DirectShowComponent.cpp"
  112. #endif
  113. #if JUCE_QUICKTIME
  114. #include "native/juce_win32_QuickTimeMovieComponent.cpp"
  115. #endif
  116. #elif JUCE_LINUX
  117. #elif JUCE_ANDROID
  118. #if JUCE_USE_CAMERA
  119. #include "native/juce_android_CameraDevice.cpp"
  120. #endif
  121. #endif
  122. END_JUCE_NAMESPACE