From f708b597901a35c4e9b0b0a7bf959b1860b3938e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Wed, 12 Feb 2020 11:22:47 +0100 Subject: [PATCH] (wip) ffmpeg support attempt for Windows --- src/podcast/UBPodcastController.cpp | 16 ++-------------- src/podcast/podcast.pri | 15 +++++++++------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/podcast/UBPodcastController.cpp b/src/podcast/UBPodcastController.cpp index 0a33ab32..35b00563 100644 --- a/src/podcast/UBPodcastController.cpp +++ b/src/podcast/UBPodcastController.cpp @@ -59,8 +59,8 @@ #ifdef Q_OS_WIN - #include "windowsmedia/UBWindowsMediaVideoEncoder.h" - #include "windowsmedia/UBWaveRecorder.h" + #include "ffmpeg/UBFFmpegVideoEncoder.h" + #include "ffmpeg/UBMicrophoneInput.h" #elif defined(Q_OS_OSX) #include "ffmpeg/UBFFmpegVideoEncoder.h" #include "ffmpeg/UBMicrophoneInput.h" @@ -308,13 +308,7 @@ void UBPodcastController::start() applicationMainModeChanged(UBApplication::applicationController->displayMode()); -#ifdef Q_OS_WIN - mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop -#elif defined(Q_OS_OSX) - mVideoEncoder = new UBFFmpegVideoEncoder(this); -#elif defined(Q_OS_LINUX) mVideoEncoder = new UBFFmpegVideoEncoder(this); -#endif if (mVideoEncoder) { @@ -805,13 +799,7 @@ QStringList UBPodcastController::audioRecordingDevices() { QStringList devices; -#ifdef Q_OS_WIN - devices = UBWaveRecorder::waveInDevices(); -#elif defined(Q_OS_OSX) devices = UBMicrophoneInput::availableDevicesNames(); -#elif defined(Q_OS_LINUX) - devices = UBMicrophoneInput::availableDevicesNames(); -#endif return devices; } diff --git a/src/podcast/podcast.pri b/src/podcast/podcast.pri index e96263fa..1e0f0673 100644 --- a/src/podcast/podcast.pri +++ b/src/podcast/podcast.pri @@ -13,13 +13,16 @@ SOURCES += src/podcast/UBPodcastController.cpp \ win32 { - SOURCES += src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.cpp \ - src/podcast/windowsmedia/UBWindowsMediaFile.cpp \ - src/podcast/windowsmedia/UBWaveRecorder.cpp + SOURCES += src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp \ + src/podcast/ffmpeg/UBMicrophoneInput.cpp + + HEADERS += src/podcast/ffmpeg/UBFFmpegVideoEncoder.h \ + src/podcast/ffmpeg/UBMicrophoneInput.h + + LIBS += -L$$PWD/../OpenBoard-ThirdParty/ffmpeg/lib/ -lavformat -lavcodec -lswscale -lswresample -lavutil - HEADERS += src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.h \ - src/podcast/windowsmedia/UBWindowsMediaFile.h \ - src/podcast/windowsmedia/UBWaveRecorder.h + INCLUDEPATH += $$PWD/../OpenBoard-ThirdParty/ffmpeg/include + DEPENDPATH += $$PWD/../OpenBoard-ThirdParty/ffmpeg/include } macx {