diff --git a/CMakeLists.txt b/CMakeLists.txt index 4faa26cfe..e74924af9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,8 +104,7 @@ option(ENABLE_OPENH264 "Enable the use of OpenH264 codec" YES) option(ENABLE_NON_FREE_CODECS "Enable the use of non free codecs" YES) option(ENABLE_BUILD_APP_PLUGINS "Enable the build of plugins" YES) option(ENABLE_BUILD_EXAMPLES "Enable the build of examples" NO) - - +option(ENABLE_VIDEO "Enable Video support." YES) option(ENABLE_DAEMON "Enable the linphone daemon interface." NO) option(ENABLE_CONSOLE_UI "Turn on or off compilation of console interface." NO) @@ -132,6 +131,7 @@ list(APPEND APP_OPTIONS "-DENABLE_NON_FREE_CODECS=${ENABLE_NON_FREE_CODECS}") list(APPEND APP_OPTIONS "-DENABLE_BUILD_EXAMPLES=${ENABLE_BUILD_EXAMPLES}") list(APPEND APP_OPTIONS "-DENABLE_DAEMON=${ENABLE_DAEMON}") list(APPEND APP_OPTIONS "-DENABLE_CONSOLE_UI=${ENABLE_CONSOLE_UI}") +list(APPEND APP_OPTIONS "-DENABLE_VIDEO=${ENABLE_VIDEO}") if(ENABLE_V4L) list(APPEND APP_OPTIONS "-DENABLE_V4L=${ENABLE_V4L}") @@ -139,7 +139,7 @@ endif() list(APPEND APP_OPTIONS "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}") list(APPEND APP_OPTIONS "-DLINPHONE_OUTPUT_DIR=${LINPHONE_OUTPUT_DIR}") -list(APPEND APP_OPTIONS "-DENABLE_QT_GL=YES") +list(APPEND APP_OPTIONS "-DENABLE_QT_GL=${ENABLE_VIDEO}")#Activate on video include(ExternalProject) set(PROJECT_BUILD_COMMAND "") diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt index ba57150bd..66aa6b4cc 100644 --- a/linphone-app/CMakeLists.txt +++ b/linphone-app/CMakeLists.txt @@ -122,7 +122,6 @@ set(SOURCES src/components/calls/CallsListProxyModel.cpp src/components/camera/Camera.cpp src/components/camera/CameraPreview.cpp - src/components/camera/MSFunctions.cpp src/components/chat/ChatModel.cpp src/components/chat/ChatProxyModel.cpp src/components/codecs/AbstractCodecsModel.cpp @@ -192,7 +191,6 @@ set(HEADERS src/components/calls/CallsListProxyModel.hpp src/components/camera/Camera.hpp src/components/camera/CameraPreview.hpp - src/components/camera/MSFunctions.hpp src/components/chat/ChatModel.hpp src/components/chat/ChatProxyModel.hpp src/components/codecs/AbstractCodecsModel.hpp @@ -380,8 +378,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake" "${CMAKE_CURRENT # ------------------------------------------------------------------------------ include_directories(src/) - - +include_directories("${LINPHONE_OUTPUT_DIR}}/include/OpenGL") if (CMAKE_INSTALL_RPATH) #Retrieve lib path from a know QT executable diff --git a/linphone-app/src/components/camera/Camera.cpp b/linphone-app/src/components/camera/Camera.cpp index 008c7bac6..47a6a21bb 100644 --- a/linphone-app/src/components/camera/Camera.cpp +++ b/linphone-app/src/components/camera/Camera.cpp @@ -25,7 +25,6 @@ #include "components/call/CallModel.hpp" #include "components/core/CoreManager.hpp" -#include "MSFunctions.hpp" #include "Camera.hpp" diff --git a/linphone-app/src/components/camera/CameraPreview.cpp b/linphone-app/src/components/camera/CameraPreview.cpp index a9789e2ff..47c8a41e3 100644 --- a/linphone-app/src/components/camera/CameraPreview.cpp +++ b/linphone-app/src/components/camera/CameraPreview.cpp @@ -24,7 +24,6 @@ #include #include "components/core/CoreManager.hpp" -#include "MSFunctions.hpp" #include "CameraPreview.hpp" diff --git a/linphone-app/src/components/camera/MSFunctions.cpp b/linphone-app/src/components/camera/MSFunctions.cpp deleted file mode 100644 index b093fc47e..000000000 --- a/linphone-app/src/components/camera/MSFunctions.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2010-2020 Belledonne Communications SARL. - * - * This file is part of linphone-desktop - * (see https://www.linphone.org). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include -#include "MSFunctions.hpp" - -// Do not include this header before `QOpenGLFunctions`!!! -#include - - -// ============================================================================= - -MSFunctions *MSFunctions::mInstance; - -// ----------------------------------------------------------------------------- - -void * getProcAddress(const char * name){ - return (void*)QOpenGLContext::currentContext()->getProcAddress(name); -} - -MSFunctions::MSFunctions () { - set(); -} -void MSFunctions::set () { - mGetProcAddress = getProcAddress; -} - -MSFunctions::~MSFunctions () { -} diff --git a/linphone-app/src/components/camera/MSFunctions.hpp b/linphone-app/src/components/camera/MSFunctions.hpp deleted file mode 100644 index 2bdc55610..000000000 --- a/linphone-app/src/components/camera/MSFunctions.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2010-2020 Belledonne Communications SARL. - * - * This file is part of linphone-desktop - * (see https://www.linphone.org). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef MS_FUNCTIONS_H_ -#define MS_FUNCTIONS_H_ - -#include - -// ============================================================================= - -struct OpenGlFunctions; - -class MSFunctions { -public: - ~MSFunctions (); - - void * (*mGetProcAddress)(const char * name) = nullptr; - - // --------------------------------------------------------------------------- - - static MSFunctions *getInstance () { - if (!mInstance) - mInstance = new MSFunctions(); - - return mInstance; - } - - // --------------------------------------------------------------------------- - void set(); -private: - MSFunctions (); - - - static MSFunctions *mInstance; -}; - -#endif // MS_FUNCTIONS_H_