Skip to content

Commit

Permalink
Merge foleys_video_addons into one module
Browse files Browse the repository at this point in the history
  • Loading branch information
ffAudio committed Nov 6, 2023
1 parent 2fd9221 commit 631a315
Show file tree
Hide file tree
Showing 25 changed files with 99 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Doxygen Action
# events but only for the master branch
on:
push:
branches: [ master, main, file-layout ]
branches: [ master, main ]


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).

EXAMPLE_PATH = ../Examples/
EXAMPLE_PATH = ../examples/

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
Expand Down
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

add_subdirectory(VideoPlayer)
add_subdirectory(VideoEditor)
add_subdirectory(MultiCamTest)
45 changes: 45 additions & 0 deletions examples/MultiCamTest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cmake_minimum_required(VERSION 3.12)

project(MULTI_CAM_TEST VERSION 0.0.1)
set(CMAKE_BINARY_DIR build)

set(JUCE_MODULES_DIR "${JUCE_SOURCE_DIR}/modules" CACHE INTERNAL
"The path to JUCE modules")

juce_add_gui_app(${PROJECT_NAME}
PRODUCT_NAME "Multi Camera Test"
VERSION "${PROJECT_VERSION}"
MICROPHONE_PERMISSION_ENABLED ON
CAMERA_PERMISSION_ENABLED ON
SEND_APPLE_EVENTS_PERMISSION_ENABLED OFF
DOCUMENT_BROWSER_ENABLED ON
BUNDLE_ID "com.foleysfinest.FoleysVideoPlayer"
ICON_BIG "${CMAKE_CURRENT_LIST_DIR}/../Resources/FF-Logo.png"
COMPANY_COPYRIGHT "2019-2023 by Foleys Finest Audio"
COMPANY_NAME "Foleys Finest Audio"
COMPANY_WEBSITE "https://foleysfinest.com"
COMPANY_EMAIL "info@foleysfinest.com")

target_sources(${PROJECT_NAME}
PRIVATE
Source/Main.cpp
Source/MainComponent.cpp)

target_link_libraries(${PROJECT_NAME}
PRIVATE
# ConsoleAppData # If you'd created a binary data target, you'd link to it here
juce::juce_core
Foleys::foleys_video_engine
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_warning_flags)

target_compile_definitions(${PROJECT_NAME} PRIVATE
JUCE_MODAL_LOOPS_PERMITTED=1
JUCE_STRICT_REFCOUNTEDPOINTER=1
FOLEYS_USE_OPENGL=0
FOLEYS_USE_FFMPEG=0
FOLEYS_CAMERA_SUPPORT=1
USE_FF_AUDIO_METERS=0)

juce_generate_juce_header(${PROJECT_NAME})
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 0 additions & 31 deletions modules/foleys_video_addons/Tests/MultiCamTest/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
==============================================================================
Copyright (c) 2019, Foleys Finest Audio - Daniel Walz
Copyright (c) 2019 - 2023, Foleys Finest Audio - Daniel Walz
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,6 @@ std::unique_ptr<CameraReceiver> CameraManager::openCamera (const juce::String& u
return pimpl->openCamera (uid);
}

std::shared_ptr<CameraClip> CameraManager::createCameraClip (int index)
{
auto camera = openCamera (index);
camera->onCaptureEngineInitialized = [cameraPtr = camera.get()]()
{ cameraPtr->start(); };

return createCameraClip (std::move (camera));
}

std::shared_ptr<CameraClip> CameraManager::createCameraClip (const juce::String& uid)
{
auto camera = openCamera (uid);
camera->onCaptureEngineInitialized = [cameraPtr = camera.get()]()
{ cameraPtr->start(); };

return createCameraClip (std::move (camera));
}

std::shared_ptr<CameraClip> CameraManager::createCameraClip (std::unique_ptr<CameraReceiver> camera)
{
auto clip = std::make_shared<CameraClip> (engine, std::move (camera));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ class CameraManager
*/
std::shared_ptr<CameraClip> createCameraClip (std::unique_ptr<CameraReceiver>);

JUCE_DEPRECATED (std::shared_ptr<CameraClip> createCameraClip (int index));
JUCE_DEPRECATED (std::shared_ptr<CameraClip> createCameraClip (const juce::String& uid));

private:
struct Pimpl;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
==============================================================================
Copyright (c) 2020-2021, Foleys Finest Audio - Daniel Walz
Copyright (c) 2020-2023, Foleys Finest Audio - Daniel Walz
All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
Expand All @@ -24,7 +24,7 @@
#include <AVFoundation/AVFoundation.h>
#include <CoreImage/CoreImage.h>
#include <objc/message.h>
#include <juce_core/native/juce_mac_ObjCHelpers.h>
#include <juce_core/native/juce_ObjCHelpers_mac.h>
#undef AVMediaType

namespace foleys
Expand Down
9 changes: 9 additions & 0 deletions modules/foleys_video_engine/foleys_video_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
#include "ReadWrite/foleys_AVFormatManager.cpp"
#include "ReadWrite/foleys_ClipRenderer.cpp"

#if JUCE_WINDOWS
#include "Native/foleys_Helpers_Win.h"
#include "Camera/foleys_CameraManager_Win.cpp"
#include "ReadWrite/Windows/foleys_MediaFoundation_Win.cpp"
#endif

#include "Camera/foleys_CameraManager.cpp"
#include "Camera/foleys_CameraClip.cpp"

#if FOLEYS_USE_FFMPEG
#include "ReadWrite/FFmpeg/foleys_FFmpegReader.cpp"
#include "ReadWrite/FFmpeg/foleys_FFmpegWriter.cpp"
Expand Down
14 changes: 14 additions & 0 deletions modules/foleys_video_engine/foleys_video_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
#define FOLEYS_USE_OPENGL 0
#endif

/** Config: FOLEYS_CAMERA_SUPPORT
Set this flag to access the cameras attached to the system
*/
#ifndef FOLEYS_CAMERA_SUPPORT
#define FOLEYS_CAMERA_SUPPORT 1
#endif

/** Config: FOLEYS_USE_FFMPEG
Set this flag to use FFmpeg as reading/writing library
*/
Expand Down Expand Up @@ -126,10 +133,17 @@
#include "Widgets/foleys_OpenGLDraw.h"
#include "Widgets/foleys_OpenGLView.h"

#include "Camera/foleys_CameraManager.h"
#include "Camera/foleys_CameraClip.h"

#if FOLEYS_USE_FFMPEG
#include "ReadWrite/FFmpeg/foleys_FFmpegReader.h"
#include "ReadWrite/FFmpeg/foleys_FFmpegWriter.h"
#include "ReadWrite/FFmpeg/foleys_FFmpegFormat.h"
#endif

#if JUCE_WINDOWS
#include "ReadWrite/foleys_MediaFoundation_Win.h"
#endif

#include "Plugins/foleys_ColourCurveVideoProcessor.h"
25 changes: 25 additions & 0 deletions modules/foleys_video_engine/foleys_video_engine.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
==============================================================================
Copyright (c) 2019-2021, Foleys Finest Audio - Daniel Walz
All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
==============================================================================
*/

#include "foleys_video_engine.h"

#include "Camera/foleys_CameraManager_OSX.mm"

#include "foleys_video_engine.cpp"

0 comments on commit 631a315

Please sign in to comment.