-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qt] Fix qtmultimedia with gstreamer on windows (#20555)
* apply patches to make qtmultimedia work with gestreamer on windows * version stuff * remove libnice from ci.baseline * move gstreamer on osx as fail to baseline * add supports field to qtmultimedia. Qt does not officially support x86 on windows * version stuff * remove duplicated patch * version stuff * add upstream patch to fix x86-windows * [skip actions] version stuff
- Loading branch information
Showing
13 changed files
with
247 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h | ||
index 5dc4d2222..1696dbc80 100644 | ||
--- a/src/corelib/thread/qthread.h | ||
+++ b/src/corelib/thread/qthread.h | ||
@@ -120,7 +120,7 @@ public: | ||
bool wait(QDeadlineTimer deadline = QDeadlineTimer(QDeadlineTimer::Forever)); | ||
bool wait(unsigned long time) | ||
{ | ||
- if (time == std::numeric_limits<unsigned long>::max()) | ||
+ if (time == (std::numeric_limits<unsigned long>::max)()) | ||
return wait(QDeadlineTimer(QDeadlineTimer::Forever)); | ||
return wait(QDeadlineTimer(time)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
From 3c7434025c5e14c2b3027a13ce90aab49712156c Mon Sep 17 00:00:00 2001 | ||
From: André de la Rocha <andre.rocha@qt.io> | ||
Date: Wed, 06 Oct 2021 02:45:14 +0200 | ||
Subject: [PATCH] Fix function declarations | ||
|
||
Adding missing QT_WIN_CALLBACK / QT_FASTCALL | ||
|
||
Pick-to: 6.2 | ||
Change-Id: I5ba5a6341a988f162b9562c9fd328b9d90c6e1ab | ||
Reviewed-by: Lars Knoll <lars.knoll@qt.io> | ||
--- | ||
|
||
diff --git a/src/multimedia/platform/windows/qwindowsmediadevices.cpp b/src/multimedia/platform/windows/qwindowsmediadevices.cpp | ||
index 067c2bb..a525569 100644 | ||
--- a/src/multimedia/platform/windows/qwindowsmediadevices.cpp | ||
+++ b/src/multimedia/platform/windows/qwindowsmediadevices.cpp | ||
@@ -190,7 +190,7 @@ | ||
} | ||
}; | ||
|
||
-LRESULT deviceNotificationWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) | ||
+LRESULT QT_WIN_CALLBACK deviceNotificationWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) | ||
{ | ||
if (message == WM_DEVICECHANGE) { | ||
auto b = (PDEV_BROADCAST_HDR)lParam; | ||
diff --git a/src/multimedia/platform/windows/qwindowsmediadevices_p.h b/src/multimedia/platform/windows/qwindowsmediadevices_p.h | ||
index 29e214d..0dc06a4 100644 | ||
--- a/src/multimedia/platform/windows/qwindowsmediadevices_p.h | ||
+++ b/src/multimedia/platform/windows/qwindowsmediadevices_p.h | ||
@@ -65,7 +65,7 @@ | ||
class QWindowsEngine; | ||
class CMMNotificationClient; | ||
|
||
-LRESULT deviceNotificationWndProc(HWND, UINT, WPARAM, LPARAM); | ||
+LRESULT QT_WIN_CALLBACK deviceNotificationWndProc(HWND, UINT, WPARAM, LPARAM); | ||
|
||
class QWindowsMediaDevices : public QPlatformMediaDevices | ||
{ | ||
@@ -88,7 +88,7 @@ | ||
HDEVNOTIFY m_videoDeviceNotification; | ||
|
||
friend CMMNotificationClient; | ||
- friend LRESULT deviceNotificationWndProc(HWND, UINT, WPARAM, LPARAM); | ||
+ friend LRESULT QT_WIN_CALLBACK deviceNotificationWndProc(HWND, UINT, WPARAM, LPARAM); | ||
}; | ||
|
||
QT_END_NAMESPACE | ||
diff --git a/src/multimedia/video/qvideoframeconversionhelper_avx2.cpp b/src/multimedia/video/qvideoframeconversionhelper_avx2.cpp | ||
index c17f8a6..cada965 100644 | ||
--- a/src/multimedia/video/qvideoframeconversionhelper_avx2.cpp | ||
+++ b/src/multimedia/video/qvideoframeconversionhelper_avx2.cpp | ||
@@ -114,17 +114,17 @@ | ||
convert_to_ARGB32_avx2<0, 1, 2, 3>(frame, output); | ||
} | ||
|
||
-void qt_convert_ABGR8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_ABGR8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_avx2<0, 3, 2, 1>(frame, output); | ||
} | ||
|
||
-void qt_convert_RGBA8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_RGBA8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_avx2<3, 0, 1, 2>(frame, output); | ||
} | ||
|
||
-void qt_convert_BGRA8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_BGRA8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_avx2<3, 2, 1, 0>(frame, output); | ||
} | ||
diff --git a/src/multimedia/video/qvideoframeconversionhelper_sse2.cpp b/src/multimedia/video/qvideoframeconversionhelper_sse2.cpp | ||
index 8c0092e..68abf04 100644 | ||
--- a/src/multimedia/video/qvideoframeconversionhelper_sse2.cpp | ||
+++ b/src/multimedia/video/qvideoframeconversionhelper_sse2.cpp | ||
@@ -96,22 +96,22 @@ | ||
|
||
} | ||
|
||
-void qt_convert_ARGB8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_ARGB8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_sse2<0, 1, 2, 3>(frame, output); | ||
} | ||
|
||
-void qt_convert_ABGR8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_ABGR8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_sse2<0, 3, 2, 1>(frame, output); | ||
} | ||
|
||
-void qt_convert_RGBA8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_RGBA8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_sse2<3, 0, 1, 2>(frame, output); | ||
} | ||
|
||
-void qt_convert_BGRA8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_BGRA8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_sse2<3, 2, 1, 0>(frame, output); | ||
} | ||
diff --git a/src/multimedia/video/qvideoframeconversionhelper_ssse3.cpp b/src/multimedia/video/qvideoframeconversionhelper_ssse3.cpp | ||
index c1acb9b..a5dfdda 100644 | ||
--- a/src/multimedia/video/qvideoframeconversionhelper_ssse3.cpp | ||
+++ b/src/multimedia/video/qvideoframeconversionhelper_ssse3.cpp | ||
@@ -105,17 +105,17 @@ | ||
convert_to_ARGB32_ssse3<0, 1, 2, 3>(frame, output); | ||
} | ||
|
||
-void qt_convert_ABGR8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_ABGR8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_ssse3<0, 3, 2, 1>(frame, output); | ||
} | ||
|
||
-void qt_convert_RGBA8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_RGBA8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_ssse3<3, 0, 1, 2>(frame, output); | ||
} | ||
|
||
-void qt_convert_BGRA8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output) | ||
+void QT_FASTCALL qt_convert_BGRA8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output) | ||
{ | ||
convert_to_ARGB32_ssse3<3, 2, 1, 0>(frame, output); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/cmake/FindGObject.cmake b/cmake/FindGObject.cmake | ||
index dc207a2..19a8a67 100644 | ||
--- a/cmake/FindGObject.cmake | ||
+++ b/cmake/FindGObject.cmake | ||
@@ -27,13 +27,13 @@ | ||
GLIB2::GLIB2 | ||
) | ||
else() | ||
- find_path(GGObject_INCLUDE_DIR | ||
+ find_path(GObject_INCLUDE_DIR | ||
NAMES gobject.h | ||
PATH_SUFFIXES glib-2.0/gobject/ | ||
) | ||
find_library(GObject_LIBRARY NAMES gobject-2.0) | ||
if (GObject_LIBRARY AND GObject_INCLUDE_DIR) | ||
- add_library(GObject::GObject IMPORTED) | ||
+ add_library(GObject::GObject INTERFACE IMPORTED) | ||
target_include_directories(GObject::GObject INTERFACE | ||
${GObject_INCLUDE_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 375d2c0ccb602df38ef8f49c5b3e0bf09c24bf46 Mon Sep 17 00:00:00 2001 | ||
From: Joerg Bornemann <joerg.bornemann@qt.io> | ||
Date: Mon, 13 Sep 2021 10:50:03 +0200 | ||
Subject: Fix build without pkg-config support | ||
|
||
Fix several issues in cmake/Find* in the code path that's hit when | ||
pkg-config is not used. | ||
|
||
Pick-to: 6.2 | ||
Task-number: QTBUG-96401 | ||
Change-Id: Iac6af560976ba6408d877027ed44a0354d32d2b7 | ||
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> | ||
Reviewed-by: Doris Verria <doris.verria@qt.io> | ||
--- | ||
cmake/FindGStreamer.cmake | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
(limited to 'cmake/FindGStreamer.cmake') | ||
|
||
diff --git a/cmake/FindGStreamer.cmake b/cmake/FindGStreamer.cmake | ||
index 0624c1a77..c3becd731 100644 | ||
--- a/cmake/FindGStreamer.cmake | ||
+++ b/cmake/FindGStreamer.cmake | ||
@@ -53,8 +53,8 @@ function(find_gstreamer_component component prefix header library) | ||
endif() | ||
if(GStreamer_${component}_LIBRARY AND GStreamer_${component}_INCLUDE_DIR) | ||
add_library(GStreamer::${component} INTERFACE IMPORTED) | ||
- target_include_directories(GStreamer::${component} INTERFACE GStreamer_${component}_INCLUDE_DIR) | ||
- target_link_libraries(GStreamer::${component} INTERFACE GStreamer_${component}_LIBRARY) | ||
+ target_include_directories(GStreamer::${component} INTERFACE ${GStreamer_${component}_INCLUDE_DIR}) | ||
+ target_link_libraries(GStreamer::${component} INTERFACE ${GStreamer_${component}_LIBRARY}) | ||
endif() | ||
mark_as_advanced(GStreamer_${component}_INCLUDE_DIR GStreamer_${component}_LIBRARY) | ||
endif() | ||
-- | ||
cgit v1.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/src/multimedia/platform/gstreamer/audio/qgstreameraudiosink.cpp b/src/multimedia/platform/gstreamer/audio/qgstreameraudiosink.cpp | ||
index d4806b23a..f985a973b 100644 | ||
--- a/src/multimedia/platform/gstreamer/audio/qgstreameraudiosink.cpp | ||
+++ b/src/multimedia/platform/gstreamer/audio/qgstreameraudiosink.cpp | ||
@@ -45,7 +45,6 @@ | ||
#include "qgstreameraudiosink_p.h" | ||
#include "qgstreameraudiodevice_p.h" | ||
#include <sys/types.h> | ||
-#include <unistd.h> | ||
|
||
#include <private/qgstpipeline_p.h> | ||
#include <private/qgstappsrc_p.h> | ||
diff --git a/src/multimedia/platform/gstreamer/audio/qgstreameraudiosource.cpp b/src/multimedia/platform/gstreamer/audio/qgstreameraudiosource.cpp | ||
index 51fc26c42..3b04a77bb 100644 | ||
--- a/src/multimedia/platform/gstreamer/audio/qgstreameraudiosource.cpp | ||
+++ b/src/multimedia/platform/gstreamer/audio/qgstreameraudiosource.cpp | ||
@@ -45,7 +45,6 @@ | ||
#include "qgstreameraudiosource_p.h" | ||
#include "qgstreameraudiodevice_p.h" | ||
#include <sys/types.h> | ||
-#include <unistd.h> | ||
|
||
#include <gst/gst.h> | ||
Q_DECLARE_OPAQUE_POINTER(GstSample *); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters