After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794652 - Decklink initialization fails in windows binary 1.14.0.1
Decklink initialization fails in windows binary 1.14.0.1
Status: VERIFIED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.14.0
Other Windows
: Normal critical
: 1.14.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-24 13:01 UTC by Takeshi Sato
Modified: 2018-03-31 05:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decklink: fix initialization fails in windows binary (1.69 KB, patch)
2018-03-27 03:45 UTC, Takeshi Sato
committed Details | Review

Description Takeshi Sato 2018-03-24 13:01:19 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
Comment 1 Takeshi Sato 2018-03-24 13:16:21 UTC
$ 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 */
Comment 2 Sebastian Dröge (slomo) 2018-03-24 16:17:41 UTC
Can you provide the patch in "git format-patch" format? Thanks for catching this!
Comment 3 Takeshi Sato 2018-03-24 17:38:58 UTC
(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
Comment 5 Takeshi Sato 2018-03-27 03:45:06 UTC
Created attachment 370170 [details] [review]
decklink: fix initialization fails in windows binary
Comment 6 Nirbheek Chauhan 2018-03-27 06:30:06 UTC
Review of attachment 370170 [details] [review]:

looks good to me.
Comment 7 Philippe Renon 2018-03-30 15:19:27 UTC
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 */
Comment 8 Nirbheek Chauhan 2018-03-31 05:47:20 UTC
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.