mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge branch 'hyperion-project:master' into comments
This commit is contained in:
commit
b79a7139ae
15
.github/workflows/qt5_6.yml
vendored
15
.github/workflows/qt5_6.yml
vendored
@ -163,19 +163,26 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
|
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
|
||||||
key: ${{ runner.os }}${{ inputs.qt_version == '6' && '-chocolatey-qt6' || '-chocolatey' }}
|
key: ${{ runner.os }}${{ '-chocolatey' }}
|
||||||
|
|
||||||
- name: 📥 Install DirectX SDK, OpenSSL, libjpeg-turbo ${{ inputs.qt_version == '6' && 'and Vulkan-SDK' || '' }}
|
- name: 📥 Install DirectX SDK, OpenSSL, libjpeg-turbo
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
choco install --no-progress directx-sdk ${{env.VULKAN_SDK}} -y
|
choco install --no-progress directx-sdk -y
|
||||||
choco install --no-progress ${{env.OPENSSL}} -y
|
choco install --no-progress ${{env.OPENSSL}} -y
|
||||||
Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/libjpeg-turbo/3.0.1/libjpeg-turbo-3.0.1-vc64.exe -OutFile libjpeg-turbo.exe -UserAgent NativeHost
|
Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/libjpeg-turbo/3.0.1/libjpeg-turbo-3.0.1-vc64.exe -OutFile libjpeg-turbo.exe -UserAgent NativeHost
|
||||||
.\libjpeg-turbo /S
|
.\libjpeg-turbo /S
|
||||||
env:
|
env:
|
||||||
VULKAN_SDK: ${{ inputs.qt_version == '6' && 'vulkan-sdk' || '' }}
|
|
||||||
OPENSSL: ${{ inputs.qt_version == '6' && 'openssl' || 'openssl --version=1.1.1.2100' }}
|
OPENSSL: ${{ inputs.qt_version == '6' && 'openssl' || 'openssl --version=1.1.1.2100' }}
|
||||||
|
|
||||||
|
- name: Install Vulkan SDK
|
||||||
|
if: ${{ inputs.qt_version == '6' }}
|
||||||
|
uses: jakoch/install-vulkan-sdk-action@v1.0.3
|
||||||
|
with:
|
||||||
|
install_runtime: false
|
||||||
|
cache: true
|
||||||
|
stripdown: true
|
||||||
|
|
||||||
- name: 📥 Install Qt
|
- name: 📥 Install Qt
|
||||||
uses: jurplel/install-qt-action@v4
|
uses: jurplel/install-qt-action@v4
|
||||||
with:
|
with:
|
||||||
|
2
dependencies/external/flatbuffers
vendored
2
dependencies/external/flatbuffers
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 0100f6a5779831fa7a651e4b67ef389a8752bd9b
|
Subproject commit 595bf0007ab1929570c7671f091313c8fc20644e
|
2
dependencies/external/mbedtls
vendored
2
dependencies/external/mbedtls
vendored
@ -1 +1 @@
|
|||||||
Subproject commit edb8fec9882084344a314368ac7fd957a187519c
|
Subproject commit 2ca6c285a0dd3f33982dd57299012dacab1ff206
|
2
dependencies/external/protobuf
vendored
2
dependencies/external/protobuf
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 7f94235e552599141950d7a4a3eaf93bc87d1b22
|
Subproject commit 3d9f7c430a5ae1385512908801492d4421c3cdb7
|
@ -46,6 +46,7 @@ public:
|
|||||||
int numerator = 0;
|
int numerator = 0;
|
||||||
int denominator = 0;
|
int denominator = 0;
|
||||||
PixelFormat pf = PixelFormat::NO_CHANGE;
|
PixelFormat pf = PixelFormat::NO_CHANGE;
|
||||||
|
long defstride = 0;
|
||||||
GUID guid = GUID_NULL;
|
GUID guid = GUID_NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -124,10 +124,10 @@ inline QString pixelFormatToString(const PixelFormat& pixelFormat)
|
|||||||
|
|
||||||
enum class FlipMode
|
enum class FlipMode
|
||||||
{
|
{
|
||||||
|
NO_CHANGE,
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
BOTH,
|
BOTH
|
||||||
NO_CHANGE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline FlipMode parseFlipMode(const QString& flipMode)
|
inline FlipMode parseFlipMode(const QString& flipMode)
|
||||||
|
@ -174,7 +174,7 @@ int DDAGrabber::grabFrame(Image<ColorRgb> &image)
|
|||||||
// Acquire the next frame.
|
// Acquire the next frame.
|
||||||
CComPtr<IDXGIResource> desktopResource;
|
CComPtr<IDXGIResource> desktopResource;
|
||||||
DXGI_OUTDUPL_FRAME_INFO frameInfo;
|
DXGI_OUTDUPL_FRAME_INFO frameInfo;
|
||||||
hr = d->desktopDuplication->AcquireNextFrame(INFINITE, &frameInfo, &desktopResource);
|
hr = d->desktopDuplication->AcquireNextFrame(500, &frameInfo, &desktopResource);
|
||||||
if (hr == DXGI_ERROR_ACCESS_LOST || hr == DXGI_ERROR_INVALID_CALL)
|
if (hr == DXGI_ERROR_ACCESS_LOST || hr == DXGI_ERROR_INVALID_CALL)
|
||||||
{
|
{
|
||||||
if (!restartCapture())
|
if (!restartCapture())
|
||||||
@ -185,7 +185,7 @@ int DDAGrabber::grabFrame(Image<ColorRgb> &image)
|
|||||||
}
|
}
|
||||||
if (hr == DXGI_ERROR_WAIT_TIMEOUT)
|
if (hr == DXGI_ERROR_WAIT_TIMEOUT)
|
||||||
{
|
{
|
||||||
// This shouldn't happen since we specified an INFINITE timeout.
|
// Nothing changed on the screen in the 500ms we waited.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
RETURN_IF_ERROR(hr, "Failed to acquire next frame", 0);
|
RETURN_IF_ERROR(hr, "Failed to acquire next frame", 0);
|
||||||
|
@ -363,6 +363,18 @@ done:
|
|||||||
_height = props.height;
|
_height = props.height;
|
||||||
_frameByteSize = _width * _height * 3;
|
_frameByteSize = _width * _height * 3;
|
||||||
_lineLength = _width * 3;
|
_lineLength = _width * 3;
|
||||||
|
// adjust flipMode for bottom-up images
|
||||||
|
if (props.defstride < 0)
|
||||||
|
{
|
||||||
|
if (_flipMode == FlipMode::NO_CHANGE)
|
||||||
|
_flipMode = FlipMode::HORIZONTAL;
|
||||||
|
else if (_flipMode == FlipMode::HORIZONTAL)
|
||||||
|
_flipMode = FlipMode::NO_CHANGE;
|
||||||
|
else if (_flipMode == FlipMode::VERTICAL)
|
||||||
|
_flipMode = FlipMode::BOTH;
|
||||||
|
else if (_flipMode == FlipMode::BOTH)
|
||||||
|
_flipMode = FlipMode::VERTICAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cleanup
|
// Cleanup
|
||||||
@ -436,6 +448,14 @@ void MFGrabber::enumVideoCaptureDevices()
|
|||||||
properties.denominator = denominator;
|
properties.denominator = denominator;
|
||||||
properties.pf = pixelformat;
|
properties.pf = pixelformat;
|
||||||
properties.guid = format;
|
properties.guid = format;
|
||||||
|
|
||||||
|
HRESULT hr = pType->GetUINT32(MF_MT_DEFAULT_STRIDE, (UINT32*)&properties.defstride);
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
hr = MFGetStrideForBitmapInfoHeader(format.Data1, width, &properties.defstride);
|
||||||
|
if (FAILED(hr))
|
||||||
|
DebugIf (verbose, _log, "failed to get default stride");
|
||||||
|
}
|
||||||
devicePropertyList.append(properties);
|
devicePropertyList.append(properties);
|
||||||
|
|
||||||
DebugIf (verbose, _log, "%s %d x %d @ %d fps (%s)", QSTRING_CSTR(dev), properties.width, properties.height, properties.fps, QSTRING_CSTR(pixelFormatToString(properties.pf)));
|
DebugIf (verbose, _log, "%s %d x %d @ %d fps (%s)", QSTRING_CSTR(dev), properties.width, properties.height, properties.fps, QSTRING_CSTR(pixelFormatToString(properties.pf)));
|
||||||
@ -797,7 +817,7 @@ QJsonArray MFGrabber::discover(const QJsonObject& params)
|
|||||||
resolution_default["width"] = 640;
|
resolution_default["width"] = 640;
|
||||||
resolution_default["height"] = 480;
|
resolution_default["height"] = 480;
|
||||||
resolution_default["fps"] = 25;
|
resolution_default["fps"] = 25;
|
||||||
format_default["format"] = "bgr24";
|
format_default["format"] = "rgb24";
|
||||||
format_default["resolution"] = resolution_default;
|
format_default["resolution"] = resolution_default;
|
||||||
video_inputs_default["inputIdx"] = 0;
|
video_inputs_default["inputIdx"] = 0;
|
||||||
video_inputs_default["standards"] = "PAL";
|
video_inputs_default["standards"] = "PAL";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user