Support video deactivation, remove MSFunctions

This commit is contained in:
Julien Wadel 2021-03-19 00:40:49 +01:00
parent 7ac33d7459
commit 8ec51179b4
6 changed files with 4 additions and 108 deletions

View file

@ -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 "")

View file

@ -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

View file

@ -25,7 +25,6 @@
#include "components/call/CallModel.hpp"
#include "components/core/CoreManager.hpp"
#include "MSFunctions.hpp"
#include "Camera.hpp"

View file

@ -24,7 +24,6 @@
#include <QTimer>
#include "components/core/CoreManager.hpp"
#include "MSFunctions.hpp"
#include "CameraPreview.hpp"

View file

@ -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 <http://www.gnu.org/licenses/>.
*/
#include <QDebug>
#include "MSFunctions.hpp"
// Do not include this header before `QOpenGLFunctions`!!!
#include <mediastreamer2/msogl_functions.h>
// =============================================================================
MSFunctions *MSFunctions::mInstance;
// -----------------------------------------------------------------------------
void * getProcAddress(const char * name){
return (void*)QOpenGLContext::currentContext()->getProcAddress(name);
}
MSFunctions::MSFunctions () {
set();
}
void MSFunctions::set () {
mGetProcAddress = getProcAddress;
}
MSFunctions::~MSFunctions () {
}

View file

@ -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 <http://www.gnu.org/licenses/>.
*/
#ifndef MS_FUNCTIONS_H_
#define MS_FUNCTIONS_H_
#include <QOpenGLFunctions>
// =============================================================================
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_