Commit be312fc0 authored by Don Gagne's avatar Don Gagne

parents 620f8911 b9e5f3fa
......@@ -19,17 +19,17 @@ install:
- mkdir %LOCALAPPDATA%\QtProject && copy test\qtlogging.ini %LOCALAPPDATA%\QtProject\
- ps: |
Write-Host "Installing GStreamer..." -ForegroundColor Cyan
$msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86-1.5.2.msi"
$msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86-1.14.4.msi"
Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-x86-1.5.2.msi', $msiPath)
(New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-x86-1.14.4.msi', $msiPath)
Write-Host "Installing..."
cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Write-Host "Installed" -ForegroundColor Green
- ps: |
Write-Host "Installing GStreamer dev..." -ForegroundColor Cyan
$msiPath = "$($env:USERPROFILE)\gstreamer-1.0-devel-x86-1.5.2.msi"
$msiPath = "$($env:USERPROFILE)\gstreamer-1.0-devel-x86-1.14.4.msi"
Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-x86-1.5.2.msi', $msiPath)
(New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-x86-1.14.4.msi', $msiPath)
Write-Host "Installing..."
cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Write-Host "Installed" -ForegroundColor Green
......
......@@ -34,6 +34,10 @@ Note: This file only contains high level features or important fixes.
* ArduPilot: Support configurable mavlink stream rates. Available from Settings/Mavlink page.
* Major rewrite and bug fix pass through Structure Scan. Previous version had such bad problems that it can no longer be supported. Plans with Structure Scan will need to be recreated. New QGC will not load old Structure Scan plans.
### 3.5.4 - Not yet released
* Guard against null geometry coming from gstreamer which can cause crashes
* Add .apj file selection support to custom firmware flash
### 3.5.3 - Stable
* Change minimum RTK Survey-In limit to 0.01 meters
* Change Windows driver detection logic
......
......@@ -78,6 +78,17 @@ void VideoItem::setSurface(VideoSurface *surface)
}
#if defined(QGC_GST_STREAMING)
QSGGeometry* VideoItem::_createDefaultGeometry(QRectF& rectBound)
{
QSGGeometry *geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), 4);
geometry->vertexDataAsPoint2D()[0].set(rectBound.x(), rectBound.y());
geometry->vertexDataAsPoint2D()[1].set(rectBound.x(), rectBound.height());
geometry->vertexDataAsPoint2D()[2].set(rectBound.width(), rectBound.y());
geometry->vertexDataAsPoint2D()[3].set(rectBound.width(), rectBound.height());
return geometry;
}
QSGNode* VideoItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData*)
{
QRectF r = boundingRect();
......@@ -103,19 +114,22 @@ QSGNode* VideoItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData*)
newNode = oldNode;
}
if (r != _data->targetArea) {
QSGGeometry *geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), 4);
geometry->vertexDataAsPoint2D()[0].set(r.x(), r.y());
geometry->vertexDataAsPoint2D()[1].set(r.x(), r.height());
geometry->vertexDataAsPoint2D()[2].set(r.width(), r.y());
geometry->vertexDataAsPoint2D()[3].set(r.width(), r.height());
QSGGeometryNode *node = static_cast<QSGGeometryNode*>(newNode);
node->setGeometry(geometry);
node->setGeometry(_createDefaultGeometry(r));
_data->targetArea = r;
}
} else {
g_signal_emit_by_name(_data->surface.data()->_data->videoSink, "update-node", (void*)oldNode, r.x(), r.y(), r.width(), r.height(), (void**)&newNode);
}
// Sometimes we can still end up here with no geometry when gstreamer fails to create it for whatever reason. If that happens it can
// cause crashes.
QSGGeometryNode *node = static_cast<QSGGeometryNode*>(newNode);
if (node->geometry() == nullptr) {
qDebug() << "Creating default geom";
node->setGeometry(_createDefaultGeometry(r));
}
return newNode;
}
#endif
......@@ -19,6 +19,8 @@
#include <QtQuick/QQuickItem>
#include "VideoSurface.h"
class QSGGeometry;
class VideoItem : public QQuickItem
{
Q_OBJECT
......@@ -40,6 +42,8 @@ protected:
private:
#if defined(QGC_GST_STREAMING)
QSGGeometry* _createDefaultGeometry(QRectF& rectBound);
struct Private;
Private* const _data;
#endif
......
......@@ -686,3 +686,8 @@ QString LogReplayLinkController::_secondsToHMS(int seconds)
return tr("%1h:%2m:%3s").arg(hoursPart, 2).arg(minutesPart, 2).arg(secondsPart, 2);
}
void LogReplayLink::_signalCurrentLogTimeSecs(void)
{
emit currentLogTimeSecs((_logCurrentTimeUSecs - _logStartTimeUSecs) / 1000000);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment