Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
2647db0e
Commit
2647db0e
authored
Aug 07, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show how to implement custom video manager
parent
41a556ee
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
126 additions
and
70 deletions
+126
-70
custom.pri
custom-example/custom.pri
+4
-2
CustomPlugin.cc
custom-example/src/CustomPlugin.cc
+8
-0
CustomPlugin.h
custom-example/src/CustomPlugin.h
+1
-0
CustomVideoManager.cc
custom-example/src/CustomVideoManager.cc
+39
-0
CustomVideoManager.h
custom-example/src/CustomVideoManager.h
+28
-0
CustomCameraControl.cc
custom-example/src/FirmwarePlugin/CustomCameraControl.cc
+8
-0
CustomCameraControl.h
custom-example/src/FirmwarePlugin/CustomCameraControl.h
+3
-0
QGCCameraControl.cc
src/Camera/QGCCameraControl.cc
+0
-24
QGCCameraControl.h
src/Camera/QGCCameraControl.h
+0
-10
VideoManager.cc
src/FlightDisplay/VideoManager.cc
+0
-7
VideoManager.h
src/FlightDisplay/VideoManager.h
+24
-25
VideoReceiver.cc
src/VideoStreaming/VideoReceiver.cc
+3
-2
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+6
-0
QGCCorePlugin.h
src/api/QGCCorePlugin.h
+2
-0
No files found.
custom-example/custom.pri
View file @
2647db0e
...
@@ -58,11 +58,13 @@ QML_IMPORT_PATH += \
...
@@ -58,11 +58,13 @@ QML_IMPORT_PATH += \
# Our own, custom sources
# Our own, custom sources
SOURCES += \
SOURCES += \
$$PWD/src/CustomPlugin.cc \
$$PWD/src/CustomPlugin.cc \
$$PWD/src/CustomQuickInterface.cc
$$PWD/src/CustomQuickInterface.cc \
$$PWD/src/CustomVideoManager.cc
HEADERS += \
HEADERS += \
$$PWD/src/CustomPlugin.h \
$$PWD/src/CustomPlugin.h \
$$PWD/src/CustomQuickInterface.h
$$PWD/src/CustomQuickInterface.h \
$$PWD/src/CustomVideoManager.h
INCLUDEPATH += \
INCLUDEPATH += \
$$PWD/src \
$$PWD/src \
...
...
custom-example/src/CustomPlugin.cc
View file @
2647db0e
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include "CustomPlugin.h"
#include "CustomPlugin.h"
#include "CustomQuickInterface.h"
#include "CustomQuickInterface.h"
#include "CustomVideoManager.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
...
@@ -191,6 +192,13 @@ CustomPlugin::overrideSettingsGroupVisibility(QString name)
...
@@ -191,6 +192,13 @@ CustomPlugin::overrideSettingsGroupVisibility(QString name)
return
true
;
return
true
;
}
}
//-----------------------------------------------------------------------------
VideoManager
*
CustomPlugin
::
createVideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
{
return
new
CustomVideoManager
(
app
,
toolbox
);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
VideoReceiver
*
VideoReceiver
*
CustomPlugin
::
createVideoReceiver
(
QObject
*
parent
)
CustomPlugin
::
createVideoReceiver
(
QObject
*
parent
)
...
...
custom-example/src/CustomPlugin.h
View file @
2647db0e
...
@@ -79,6 +79,7 @@ public:
...
@@ -79,6 +79,7 @@ public:
QString
brandImageIndoor
()
const
final
;
QString
brandImageIndoor
()
const
final
;
QString
brandImageOutdoor
()
const
final
;
QString
brandImageOutdoor
()
const
final
;
bool
overrideSettingsGroupVisibility
(
QString
name
)
final
;
bool
overrideSettingsGroupVisibility
(
QString
name
)
final
;
VideoManager
*
createVideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
final
;
VideoReceiver
*
createVideoReceiver
(
QObject
*
parent
)
final
;
VideoReceiver
*
createVideoReceiver
(
QObject
*
parent
)
final
;
QQmlApplicationEngine
*
createRootWindow
(
QObject
*
parent
)
final
;
QQmlApplicationEngine
*
createRootWindow
(
QObject
*
parent
)
final
;
bool
adjustSettingMetaData
(
const
QString
&
settingsGroup
,
FactMetaData
&
metaData
)
final
;
bool
adjustSettingMetaData
(
const
QString
&
settingsGroup
,
FactMetaData
&
metaData
)
final
;
...
...
custom-example/src/CustomVideoManager.cc
0 → 100644
View file @
2647db0e
/****************************************************************************
*
* (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include "CustomVideoManager.h"
#include "MultiVehicleManager.h"
#include "CustomCameraManager.h"
#include "CustomCameraControl.h"
//-----------------------------------------------------------------------------
CustomVideoManager
::
CustomVideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
VideoManager
(
app
,
toolbox
)
{
}
//-----------------------------------------------------------------------------
void
CustomVideoManager
::
_updateSettings
()
{
if
(
!
_videoSettings
||
!
_videoReceiver
)
return
;
//-- Check encoding
if
(
_activeVehicle
&&
_activeVehicle
->
dynamicCameras
())
{
CustomCameraControl
*
pCamera
=
dynamic_cast
<
CustomCameraControl
*>
(
_activeVehicle
->
dynamicCameras
()
->
currentCameraInstance
());
if
(
pCamera
)
{
Fact
*
fact
=
pCamera
->
videoEncoding
();
if
(
fact
)
{
_videoReceiver
->
setVideoDecoder
(
static_cast
<
VideoReceiver
::
VideoEncoding
>
(
fact
->
rawValue
().
toInt
()));
}
}
}
VideoManager
::
_updateSettings
();
}
custom-example/src/CustomVideoManager.h
0 → 100644
View file @
2647db0e
/****************************************************************************
*
* (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#pragma once
#include <QObject>
#include <QTimer>
#include <QTime>
#include <QUrl>
#include "VideoManager.h"
class
CustomVideoManager
:
public
VideoManager
{
Q_OBJECT
public:
CustomVideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
protected:
void
_updateSettings
();
};
custom-example/src/FirmwarePlugin/CustomCameraControl.cc
View file @
2647db0e
...
@@ -19,6 +19,7 @@ QGC_LOGGING_CATEGORY(CustomCameraVerboseLog, "CustomCameraVerboseLog")
...
@@ -19,6 +19,7 @@ QGC_LOGGING_CATEGORY(CustomCameraVerboseLog, "CustomCameraVerboseLog")
static
const
char
*
kCAM_IRPALETTE
=
"CAM_IRPALETTE"
;
static
const
char
*
kCAM_IRPALETTE
=
"CAM_IRPALETTE"
;
static
const
char
*
kCAM_NEXTVISION_IRPALETTE
=
"IR_SENS_POL"
;
static
const
char
*
kCAM_NEXTVISION_IRPALETTE
=
"IR_SENS_POL"
;
static
const
char
*
kCAM_ENC
=
"CAM_ENC"
;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
CustomCameraControl
::
CustomCameraControl
(
const
mavlink_camera_information_t
*
info
,
Vehicle
*
vehicle
,
int
compID
,
QObject
*
parent
)
CustomCameraControl
::
CustomCameraControl
(
const
mavlink_camera_information_t
*
info
,
Vehicle
*
vehicle
,
int
compID
,
QObject
*
parent
)
...
@@ -116,6 +117,13 @@ CustomCameraControl::irPalette()
...
@@ -116,6 +117,13 @@ CustomCameraControl::irPalette()
return
nullptr
;
return
nullptr
;
}
}
//-----------------------------------------------------------------------------
Fact
*
CustomCameraControl
::
videoEncoding
()
{
return
_paramComplete
?
getFact
(
kCAM_ENC
)
:
nullptr
;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void
void
CustomCameraControl
::
setThermalMode
(
ThermalViewMode
mode
)
CustomCameraControl
::
setThermalMode
(
ThermalViewMode
mode
)
...
...
custom-example/src/FirmwarePlugin/CustomCameraControl.h
View file @
2647db0e
...
@@ -29,8 +29,11 @@ public:
...
@@ -29,8 +29,11 @@ public:
CustomCameraControl
(
const
mavlink_camera_information_t
*
info
,
Vehicle
*
vehicle
,
int
compID
,
QObject
*
parent
=
nullptr
);
CustomCameraControl
(
const
mavlink_camera_information_t
*
info
,
Vehicle
*
vehicle
,
int
compID
,
QObject
*
parent
=
nullptr
);
Q_PROPERTY
(
Fact
*
irPalette
READ
irPalette
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
irPalette
READ
irPalette
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
videoEncoding
READ
videoEncoding
NOTIFY
parametersReady
)
Fact
*
irPalette
();
Fact
*
irPalette
();
Fact
*
videoEncoding
();
bool
takePhoto
()
override
;
bool
takePhoto
()
override
;
bool
stopTakePhoto
()
override
;
bool
stopTakePhoto
()
override
;
bool
startVideo
()
override
;
bool
startVideo
()
override
;
...
...
src/Camera/QGCCameraControl.cc
View file @
2647db0e
...
@@ -70,9 +70,6 @@ const char* QGCCameraControl::kCAM_SHUTTERSPD = "CAM_SHUTTERSPD";
...
@@ -70,9 +70,6 @@ const char* QGCCameraControl::kCAM_SHUTTERSPD = "CAM_SHUTTERSPD";
const
char
*
QGCCameraControl
::
kCAM_APERTURE
=
"CAM_APERTURE"
;
const
char
*
QGCCameraControl
::
kCAM_APERTURE
=
"CAM_APERTURE"
;
const
char
*
QGCCameraControl
::
kCAM_WBMODE
=
"CAM_WBMODE"
;
const
char
*
QGCCameraControl
::
kCAM_WBMODE
=
"CAM_WBMODE"
;
const
char
*
QGCCameraControl
::
kCAM_MODE
=
"CAM_MODE"
;
const
char
*
QGCCameraControl
::
kCAM_MODE
=
"CAM_MODE"
;
const
char
*
QGCCameraControl
::
kCAM_BITRATE
=
"CAM_BITRATE"
;
const
char
*
QGCCameraControl
::
kCAM_FPS
=
"CAM_FPS"
;
const
char
*
QGCCameraControl
::
kCAM_ENC
=
"CAM_ENC"
;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
QGCCameraOptionExclusion
::
QGCCameraOptionExclusion
(
QObject
*
parent
,
QString
param_
,
QString
value_
,
QStringList
exclusions_
)
QGCCameraOptionExclusion
::
QGCCameraOptionExclusion
(
QObject
*
parent
,
QString
param_
,
QString
value_
,
QStringList
exclusions_
)
...
@@ -2116,27 +2113,6 @@ QGCCameraControl::mode()
...
@@ -2116,27 +2113,6 @@ QGCCameraControl::mode()
return
_paramComplete
?
getFact
(
kCAM_MODE
)
:
nullptr
;
return
_paramComplete
?
getFact
(
kCAM_MODE
)
:
nullptr
;
}
}
//-----------------------------------------------------------------------------
Fact
*
QGCCameraControl
::
bitRate
()
{
return
_paramComplete
?
getFact
(
kCAM_BITRATE
)
:
nullptr
;
}
//-----------------------------------------------------------------------------
Fact
*
QGCCameraControl
::
frameRate
()
{
return
_paramComplete
?
getFact
(
kCAM_FPS
)
:
nullptr
;
}
//-----------------------------------------------------------------------------
Fact
*
QGCCameraControl
::
videoEncoding
()
{
return
_paramComplete
?
getFact
(
kCAM_ENC
)
:
nullptr
;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
QGCVideoStreamInfo
::
QGCVideoStreamInfo
(
QObject
*
parent
,
const
mavlink_video_stream_information_t
*
si
)
QGCVideoStreamInfo
::
QGCVideoStreamInfo
(
QObject
*
parent
,
const
mavlink_video_stream_information_t
*
si
)
:
QObject
(
parent
)
:
QObject
(
parent
)
...
...
src/Camera/QGCCameraControl.h
View file @
2647db0e
...
@@ -167,9 +167,6 @@ public:
...
@@ -167,9 +167,6 @@ public:
Q_PROPERTY
(
Fact
*
aperture
READ
aperture
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
aperture
READ
aperture
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
wb
READ
wb
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
wb
READ
wb
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
mode
READ
mode
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
mode
READ
mode
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
bitRate
READ
bitRate
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
frameRate
READ
frameRate
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
videoEncoding
READ
videoEncoding
NOTIFY
parametersReady
)
Q_PROPERTY
(
QStringList
activeSettings
READ
activeSettings
NOTIFY
activeSettingsChanged
)
Q_PROPERTY
(
QStringList
activeSettings
READ
activeSettings
NOTIFY
activeSettingsChanged
)
Q_PROPERTY
(
VideoStatus
videoStatus
READ
videoStatus
NOTIFY
videoStatusChanged
)
Q_PROPERTY
(
VideoStatus
videoStatus
READ
videoStatus
NOTIFY
videoStatusChanged
)
...
@@ -255,9 +252,6 @@ public:
...
@@ -255,9 +252,6 @@ public:
virtual
Fact
*
aperture
();
virtual
Fact
*
aperture
();
virtual
Fact
*
wb
();
virtual
Fact
*
wb
();
virtual
Fact
*
mode
();
virtual
Fact
*
mode
();
virtual
Fact
*
bitRate
();
virtual
Fact
*
frameRate
();
virtual
Fact
*
videoEncoding
();
//-- Stream names to show the user (for selection)
//-- Stream names to show the user (for selection)
virtual
QStringList
streamLabels
()
{
return
_streamLabels
;
}
virtual
QStringList
streamLabels
()
{
return
_streamLabels
;
}
...
@@ -289,7 +283,6 @@ public:
...
@@ -289,7 +283,6 @@ public:
//-- Allow controller to modify or invalidate parameter change
//-- Allow controller to modify or invalidate parameter change
virtual
bool
validateParameter
(
Fact
*
pFact
,
QVariant
&
newValue
);
virtual
bool
validateParameter
(
Fact
*
pFact
,
QVariant
&
newValue
);
// Known Parameters
// Known Parameters
static
const
char
*
kCAM_EV
;
static
const
char
*
kCAM_EV
;
static
const
char
*
kCAM_EXPMODE
;
static
const
char
*
kCAM_EXPMODE
;
...
@@ -298,9 +291,6 @@ public:
...
@@ -298,9 +291,6 @@ public:
static
const
char
*
kCAM_APERTURE
;
static
const
char
*
kCAM_APERTURE
;
static
const
char
*
kCAM_WBMODE
;
static
const
char
*
kCAM_WBMODE
;
static
const
char
*
kCAM_MODE
;
static
const
char
*
kCAM_MODE
;
static
const
char
*
kCAM_BITRATE
;
static
const
char
*
kCAM_FPS
;
static
const
char
*
kCAM_ENC
;
signals:
signals:
void
infoChanged
();
void
infoChanged
();
...
...
src/FlightDisplay/VideoManager.cc
View file @
2647db0e
...
@@ -279,13 +279,6 @@ VideoManager::_updateSettings()
...
@@ -279,13 +279,6 @@ VideoManager::_updateSettings()
return
;
return
;
//-- Auto discovery
//-- Auto discovery
if
(
_activeVehicle
&&
_activeVehicle
->
dynamicCameras
())
{
if
(
_activeVehicle
&&
_activeVehicle
->
dynamicCameras
())
{
QGCCameraControl
*
pCamera
=
_activeVehicle
->
dynamicCameras
()
->
currentCameraInstance
();
if
(
pCamera
)
{
Fact
*
fact
=
pCamera
->
videoEncoding
();
if
(
fact
)
{
_videoReceiver
->
setVideoDecoder
(
static_cast
<
VideoReceiver
::
VideoEncoding
>
(
fact
->
rawValue
().
toInt
()));
}
}
QGCVideoStreamInfo
*
pInfo
=
_activeVehicle
->
dynamicCameras
()
->
currentStreamInstance
();
QGCVideoStreamInfo
*
pInfo
=
_activeVehicle
->
dynamicCameras
()
->
currentStreamInstance
();
if
(
pInfo
)
{
if
(
pInfo
)
{
qCDebug
(
VideoManagerLog
)
<<
"Configure primary stream: "
<<
pInfo
->
uri
();
qCDebug
(
VideoManagerLog
)
<<
"Configure primary stream: "
<<
pInfo
->
uri
();
...
...
src/FlightDisplay/VideoManager.h
View file @
2647db0e
...
@@ -34,7 +34,7 @@ class VideoManager : public QGCTool
...
@@ -34,7 +34,7 @@ class VideoManager : public QGCTool
public:
public:
VideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
VideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
VideoManager
();
virtual
~
VideoManager
();
Q_PROPERTY
(
bool
hasVideo
READ
hasVideo
NOTIFY
hasVideoChanged
)
Q_PROPERTY
(
bool
hasVideo
READ
hasVideo
NOTIFY
hasVideoChanged
)
Q_PROPERTY
(
bool
isGStreamer
READ
isGStreamer
NOTIFY
isGStreamerChanged
)
Q_PROPERTY
(
bool
isGStreamer
READ
isGStreamer
NOTIFY
isGStreamerChanged
)
...
@@ -51,34 +51,33 @@ public:
...
@@ -51,34 +51,33 @@ public:
Q_PROPERTY
(
bool
autoStreamConfigured
READ
autoStreamConfigured
NOTIFY
autoStreamConfiguredChanged
)
Q_PROPERTY
(
bool
autoStreamConfigured
READ
autoStreamConfigured
NOTIFY
autoStreamConfiguredChanged
)
Q_PROPERTY
(
bool
hasThermal
READ
hasThermal
NOTIFY
aspectRatioChanged
)
Q_PROPERTY
(
bool
hasThermal
READ
hasThermal
NOTIFY
aspectRatioChanged
)
bool
hasVideo
();
virtual
bool
hasVideo
();
bool
isGStreamer
();
virtual
bool
isGStreamer
();
bool
isAutoStream
();
virtual
bool
isTaisync
()
{
return
_isTaisync
;
}
bool
isTaisync
()
{
return
_isTaisync
;
}
virtual
bool
fullScreen
()
{
return
_fullScreen
;
}
bool
fullScreen
()
{
return
_fullScreen
;
}
virtual
QString
videoSourceID
()
{
return
_videoSourceID
;
}
QString
videoSourceID
()
{
return
_videoSourceID
;
}
virtual
double
aspectRatio
();
double
aspectRatio
();
virtual
double
thermalAspectRatio
();
double
thermalAspectRatio
();
virtual
double
hfov
();
double
hfov
();
virtual
double
thermalHfov
();
double
thermalHfov
();
virtual
bool
autoStreamConfigured
();
bool
autoStreamConfigured
();
virtual
bool
hasThermal
();
bool
hasThermal
();
virtual
void
restartVideo
();
void
restartVideo
();
virtual
VideoReceiver
*
videoReceiver
()
{
return
_videoReceiver
;
}
VideoReceiver
*
videoReceiver
()
{
return
_videoReceiver
;
}
virtual
VideoReceiver
*
thermalVideoReceiver
()
{
return
_thermalVideoReceiver
;
}
VideoReceiver
*
thermalVideoReceiver
()
{
return
_thermalVideoReceiver
;
}
#if defined(QGC_DISABLE_UVC)
#if defined(QGC_DISABLE_UVC)
bool
uvcEnabled
()
{
return
false
;
}
virtual
bool
uvcEnabled
()
{
return
false
;
}
#else
#else
bool
uvcEnabled
();
virtual
bool
uvcEnabled
();
#endif
#endif
void
setfullScreen
(
bool
f
)
{
_fullScreen
=
f
;
emit
fullScreenChanged
();
}
v
irtual
v
oid
setfullScreen
(
bool
f
)
{
_fullScreen
=
f
;
emit
fullScreenChanged
();
}
void
setIsTaisync
(
bool
t
)
{
_isTaisync
=
t
;
emit
isTaisyncChanged
();
}
v
irtual
v
oid
setIsTaisync
(
bool
t
)
{
_isTaisync
=
t
;
emit
isTaisyncChanged
();
}
// Override from QGCTool
// Override from QGCTool
void
setToolbox
(
QGCToolbox
*
toolbox
);
v
irtual
v
oid
setToolbox
(
QGCToolbox
*
toolbox
);
Q_INVOKABLE
void
startVideo
();
Q_INVOKABLE
void
startVideo
();
Q_INVOKABLE
void
stopVideo
();
Q_INVOKABLE
void
stopVideo
();
...
@@ -93,7 +92,7 @@ signals:
...
@@ -93,7 +92,7 @@ signals:
void
aspectRatioChanged
();
void
aspectRatioChanged
();
void
autoStreamConfiguredChanged
();
void
autoStreamConfiguredChanged
();
pr
ivate
slots
:
pr
otected
slots
:
void
_videoSourceChanged
();
void
_videoSourceChanged
();
void
_udpPortChanged
();
void
_udpPortChanged
();
void
_rtspUrlChanged
();
void
_rtspUrlChanged
();
...
@@ -102,10 +101,10 @@ private slots:
...
@@ -102,10 +101,10 @@ private slots:
void
_setActiveVehicle
(
Vehicle
*
vehicle
);
void
_setActiveVehicle
(
Vehicle
*
vehicle
);
void
_aspectRatioChanged
();
void
_aspectRatioChanged
();
pr
ivate
:
pr
otected
:
void
_updateSettings
();
void
_updateSettings
();
pr
ivate
:
pr
otected
:
SubtitleWriter
_subtitleWriter
;
SubtitleWriter
_subtitleWriter
;
bool
_isTaisync
=
false
;
bool
_isTaisync
=
false
;
VideoReceiver
*
_videoReceiver
=
nullptr
;
VideoReceiver
*
_videoReceiver
=
nullptr
;
...
...
src/VideoStreaming/VideoReceiver.cc
View file @
2647db0e
...
@@ -630,6 +630,7 @@ VideoReceiver::setVideoDecoder(VideoEncoding encoding)
...
@@ -630,6 +630,7 @@ VideoReceiver::setVideoDecoder(VideoEncoding encoding)
_hwDecoderName
=
nullptr
;
_hwDecoderName
=
nullptr
;
}
}
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// When we finish our pipeline will look like this:
// When we finish our pipeline will look like this:
//
//
...
...
src/api/QGCCorePlugin.cc
View file @
2647db0e
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include "SettingsManager.h"
#include "SettingsManager.h"
#include "AppMessages.h"
#include "AppMessages.h"
#include "QmlObjectListModel.h"
#include "QmlObjectListModel.h"
#include "VideoManager.h"
#include "VideoReceiver.h"
#include "VideoReceiver.h"
#include "QGCLoggingCategory.h"
#include "QGCLoggingCategory.h"
#include "QGCCameraManager.h"
#include "QGCCameraManager.h"
...
@@ -408,6 +409,11 @@ QmlObjectListModel* QGCCorePlugin::customMapItems()
...
@@ -408,6 +409,11 @@ QmlObjectListModel* QGCCorePlugin::customMapItems()
return
&
_p
->
_emptyCustomMapItems
;
return
&
_p
->
_emptyCustomMapItems
;
}
}
VideoManager
*
QGCCorePlugin
::
createVideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
{
return
new
VideoManager
(
app
,
toolbox
);
}
VideoReceiver
*
QGCCorePlugin
::
createVideoReceiver
(
QObject
*
parent
)
VideoReceiver
*
QGCCorePlugin
::
createVideoReceiver
(
QObject
*
parent
)
{
{
return
new
VideoReceiver
(
parent
);
return
new
VideoReceiver
(
parent
);
...
...
src/api/QGCCorePlugin.h
View file @
2647db0e
...
@@ -104,6 +104,8 @@ public:
...
@@ -104,6 +104,8 @@ public:
/// Allows the plugin to override the creation of the root (native) window.
/// Allows the plugin to override the creation of the root (native) window.
virtual
QQmlApplicationEngine
*
createRootWindow
(
QObject
*
parent
);
virtual
QQmlApplicationEngine
*
createRootWindow
(
QObject
*
parent
);
/// Allows the plugin to override the creation of VideoManager.
virtual
VideoManager
*
createVideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
/// Allows the plugin to override the creation of VideoReceiver.
/// Allows the plugin to override the creation of VideoReceiver.
virtual
VideoReceiver
*
createVideoReceiver
(
QObject
*
parent
);
virtual
VideoReceiver
*
createVideoReceiver
(
QObject
*
parent
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment