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.

159 lines
5.5KB

  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. // Your project must contain an AppConfig.h file with your project-specific settings in it,
  27. // and your header search path must make it accessible to the module's files.
  28. #include "AppConfig.h"
  29. #include "../juce_core/native/juce_BasicNativeHeaders.h"
  30. #include "../juce_gui_extra/juce_gui_extra.h"
  31. #include "juce_video.h"
  32. #if JUCE_MAC
  33. #if JUCE_QUICKTIME
  34. #define Point CarbonDummyPointName
  35. #define Component CarbonDummyCompName
  36. #import <QTKit/QTKit.h>
  37. #undef Point
  38. #undef Component
  39. #endif
  40. //==============================================================================
  41. #elif JUCE_WINDOWS
  42. #if JUCE_QUICKTIME
  43. /* If you've got an include error here, you probably need to install the QuickTime SDK and
  44. add its header directory to your include path.
  45. Alternatively, if you don't need any QuickTime services, just set the JUCE_QUICKTIME flag to 0.
  46. */
  47. #include <Movies.h>
  48. #include <QTML.h>
  49. #include <QuickTimeComponents.h>
  50. #include <MediaHandlers.h>
  51. #include <ImageCodec.h>
  52. /* If you've got QuickTime 7 installed, then these COM objects should be found in
  53. the "\Program Files\Quicktime" directory. You'll need to add this directory to
  54. your include search path to make these import statements work.
  55. */
  56. #import <QTOLibrary.dll>
  57. #import <QTOControl.dll>
  58. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  59. #pragma comment (lib, "QTMLClient.lib")
  60. #endif
  61. #endif
  62. #if JUCE_USE_CAMERA || JUCE_DIRECTSHOW
  63. /* If you're using the camera classes, you'll need access to a few DirectShow headers.
  64. These files are provided in the normal Windows SDK, but some Microsoft plonker
  65. didn't realise that qedit.h doesn't actually compile without the rest of the DirectShow SDK..
  66. Microsoft's suggested fix for this is to hack their qedit.h file! See:
  67. http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/ed097d2c-3d68-4f48-8448-277eaaf68252
  68. .. which is a bit of a bodge, but a lot less hassle than installing the full DShow SDK.
  69. An alternative workaround is to create a dummy dxtrans.h file and put it in your include path.
  70. The dummy file just needs to contain the following content:
  71. #define __IDxtCompositor_INTERFACE_DEFINED__
  72. #define __IDxtAlphaSetter_INTERFACE_DEFINED__
  73. #define __IDxtJpeg_INTERFACE_DEFINED__
  74. #define __IDxtKey_INTERFACE_DEFINED__
  75. ..and that should be enough to convince qedit.h that you have the SDK!
  76. */
  77. #include <dshow.h>
  78. #include <qedit.h>
  79. #include <dshowasf.h>
  80. #endif
  81. #if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION
  82. #include <evr.h>
  83. #endif
  84. #if JUCE_USE_CAMERA && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  85. #pragma comment (lib, "Strmiids.lib")
  86. #pragma comment (lib, "wmvcore.lib")
  87. #endif
  88. #if JUCE_MEDIAFOUNDATION && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  89. #pragma comment (lib, "mfuuid.lib")
  90. #endif
  91. #if JUCE_DIRECTSHOW && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  92. #pragma comment (lib, "strmiids.lib")
  93. #endif
  94. #endif
  95. //==============================================================================
  96. using namespace juce;
  97. BEGIN_JUCE_NAMESPACE
  98. #if JUCE_MAC || JUCE_IOS
  99. #include "../juce_core/native/juce_osx_ObjCHelpers.h"
  100. #include "../juce_core/native/juce_mac_ObjCSuffix.h"
  101. #if JUCE_USE_CAMERA
  102. #include "native/juce_mac_CameraDevice.mm"
  103. #endif
  104. #if JUCE_QUICKTIME
  105. #include "native/juce_mac_QuickTimeMovieComponent.mm"
  106. #endif
  107. #elif JUCE_WINDOWS
  108. #include "../juce_core/native/juce_win32_ComSmartPtr.h"
  109. #if JUCE_USE_CAMERA
  110. #include "native/juce_win32_CameraDevice.cpp"
  111. #endif
  112. #if JUCE_DIRECTSHOW
  113. #include "native/juce_win32_DirectShowComponent.cpp"
  114. #endif
  115. #if JUCE_QUICKTIME
  116. #include "native/juce_win32_QuickTimeMovieComponent.cpp"
  117. #endif
  118. #elif JUCE_LINUX
  119. #elif JUCE_ANDROID
  120. #if JUCE_USE_CAMERA
  121. #include "native/juce_android_CameraDevice.cpp"
  122. #endif
  123. #endif
  124. END_JUCE_NAMESPACE