GNOME Bugzilla – Bug 794652
Decklink initialization fails in windows binary 1.14.0.1
Last modified: 2018-03-31 05:47:20 UTC
Testing decklink gst-launch-1.0 -v decklinkvideosrc ! autovideosink 0:00:00.131386962 6948 0000000002F9CC60 ERROR decklink gstdecklink.cpp:1145:init_devices: no driver 0:00:00.133962274 6948 0000000002F9CC60 ERROR decklinkvideosrc gstdecklinkvideosrc.cpp:1001:gst_decklink_video_src_open:<decklinkvideosrc0> Failed to acquire input There is no log of gst_decklink_com_thread () which initializes COM. The initialization part is not valid with #ifdef MSC_VER. Windows binaries are built with gcc. As with other codes, it was avoidable by setting it to G_OS_WIN32 instead of MSC_VER. #ifdef _MSC_VER -> #ifdef G_OS_WIN32
$ diff gstdecklink.cpp.org gstdecklink.cpp 1068c1068 < #ifdef _MSC_VER --- > #ifdef G_OS_WIN32 1117c1117 < #endif /* _MSC_VER */ --- > #endif /* G_OS_WIN32 */ 1130c1130 < #ifdef _MSC_VER --- > #ifdef G_OS_WIN32 1141c1141 < #endif /* _MSC_VER */ --- > #endif /* G_OS_WIN32 */
Can you provide the patch in "git format-patch" format? Thanks for catching this!
(In reply to Sebastian Dröge (slomo) from comment #2) > Can you provide the patch in "git format-patch" format? Thanks for catching > this! I am sorry I do not understand the method Because I am a beginner
See https://gstreamer.freedesktop.org/documentation/contribute/index.html#how-to-submit-patches
Created attachment 370170 [details] [review] decklink: fix initialization fails in windows binary
Review of attachment 370170 [details] [review]: looks good to me.
Hi, This change breaks the build on MSYS2/MinGW with : In file included from ../../../gst-plugins-bad/sys/decklink/gstdecklink.h:35:0, from ../../../gst-plugins-bad/sys/decklink/gstdecklink.cpp:27: ../../../gst-plugins-bad/sys/decklink/win/DeckLinkAPI.h:19:0: error: ignoring #pragma warning [-Werror=unknown-pragmas] #pragma warning( disable: 4049 ) /* more than 64k source lines */
commit a7228ed4863a6546b6b4a51883f093807888cc32 (HEAD -> 1.14, origin/1.14) Author: Nirbheek Chauhan <nirbheek@centricular.com> Date: Sat Mar 31 10:41:32 2018 +0530 decklink: Fix MinGW warnings due to MSVC-specific pragmas https://bugzilla.gnome.org/show_bug.cgi?id=794652#c7 Fixed in both 1.14 and master branches.