Building decklink for windows using cerbero

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Building decklink for windows using cerbero

Felipe Mogollon
Hi,

I am trying to build decklink (Blackmagic) plugin into windows using cerbero but I can't get any result.

I am using debian 8.0 as host machine

I have made:

./cerbero-uninstalled -c config/cross-win64 bootstrap
./cerbero-uninstalled -c config/cross-win64 build gst-plugins-bad-1.0

successfully but no libgstdecklink.dll is created.

If I dive into gst-plugins-bad-1.0/sys/decklink folder I can see that there is a Makefile that has been generated but It doesn't work.

It has several errors:

* Cannot find mingw compiler
* Cannot find pthread.h
* Cannot find dlfcn.h

I could solve those issues by adding my mingw compiler to PATH manually and adding include paths to those headers manually to the Makefile file.

But when I run again make I get the following error:

Creating library file: .libs/libgstdecklink.dll.a
.libs/libgstdecklink_la-gstdecklink.o: In function `init_devices':
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/gstdecklink.cpp:1012: undefined reference to `__imp_SysFreeString'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/gstdecklink.cpp:989: undefined reference to `IID_IDeckLinkOutput'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/gstdecklink.cpp:1027: undefined reference to `IID_IDeckLinkConfiguration'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/gstdecklink.cpp:1034: undefined reference to `IID_IDeckLinkAttributes'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/gstdecklink.cpp:952: undefined reference to `IID_IDeckLinkInput'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/gstdecklink.cpp:974: undefined reference to `__imp_SysFreeString'
linux/.libs/libgstdecklink_la-DeckLinkAPIDispatch.o: In function `InitDeckLinkAPI':
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:58: undefined reference to `dlopen(char const*, int)'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:67: undefined reference to `dlsym(void*, char const*)'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:70: undefined reference to `dlsym(void*, char const*)'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:73: undefined reference to `dlsym(void*, char const*)'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:76: undefined reference to `dlsym(void*, char const*)'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:78: undefined reference to `dlerror()'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:69: undefined reference to `dlerror()'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:72: undefined reference to `dlerror()'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:75: undefined reference to `dlerror()'
linux/.libs/libgstdecklink_la-DeckLinkAPIDispatch.o: In function `InitDeckLinkPreviewAPI':
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:85: undefined reference to `dlopen(char const*, int)'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:91: undefined reference to `dlsym(void*, char const*)'
/home/VICOMTECH/fmogollon/trabajo/bideoakta/cerbero/build/sources/windows_x86_64/gst-plugins-bad-1.0-1.13.0.1/sys/decklink/linux/DeckLinkAPIDispatch.cpp:93: undefined reference to `dlerror()'
collect2: error: ld returned 1 exit status
Makefile:943: recipe for target 'libgstdecklink.la' failed
make: *** [libgstdecklink.la] Error 1


I have checked that there were some changes to support decklink windows in the last months but I am not able to get it working.

Am I doing something wrong? Is there any step I am not doing ok?

Regards

Felipe



--
Juan Felipe Mogollón Rodríguez
Researcher | Investigador
Digital Media
+[34] 943 30 92 30
[hidden email]
www.vicomtech.org
Member of IK4 Research Alliance and GraphicsMedia.net
Legal Notice - Privacy policy (http://www.vicomtech.org/en/proteccion-datos)

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Building decklink for windows using cerbero

Nirbheek Chauhan
Hello,

On Wed, Jul 12, 2017 at 6:50 PM, Felipe Mogollon
<[hidden email]> wrote:

> Hi,
>
> I am trying to build decklink (Blackmagic) plugin into windows using cerbero
> but I can't get any result.
>
> I am using debian 8.0 as host machine
>
> I have made:
>
> ./cerbero-uninstalled -c config/cross-win64 bootstrap
> ./cerbero-uninstalled -c config/cross-win64 build gst-plugins-bad-1.0
>
> successfully but no libgstdecklink.dll is created.
>
> If I dive into gst-plugins-bad-1.0/sys/decklink folder I can see that there
> is a Makefile that has been generated but It doesn't work.
>

If you want to compile things manually, you have to build from inside
the cerbero environment:

./cerbero-uninstalled -c config/cross-win64 shell

Then navigate to that location and do whatever you want to.

> I have checked that there were some changes to support decklink windows in
> the last months but I am not able to get it working.
>
> Am I doing something wrong? Is there any step I am not doing ok?
>

Sorry about that, I tested only the meson build files on Windows since
I was testing the MSVC build. I then decided to also see if it can
work with MinGW and patched it to work that way too. So, in the end,
the Autotools build doesn't have decklink support on Windows.

As a result, the Makefile that is generated won't work for Windows
because it's not using the right sources. Let me cook up a patch for
Autotools.

Cheers,
Nirbheek
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Building decklink for windows using cerbero

Felipe Mogollon
Hi,

thanks for your aclarations, I have managed to build it using meson as you said: I explain how I did it just for info:


Prerequisites:

1. Install MinGW
2. Install Perl3
4. Install glib for windows
 
  1. go to http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
  2. download the file pkg-config_0.26-1_win32.zip
  3. extract the file bin/pkg-config.exe to C:\MinGW\bin
  4. download the file gettext-runtime_0.18.1.1-2_win32.zip
  5. extract the file bin/intl.dll to C:\MinGW\bin
  6. go to http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28
  7. download the file glib_2.28.8-1_win32.zip
  8. extract the file bin/libglib-2.0-0.dll to C:\MinGW\bin

5.Edit meson.build files to get only decklink build

   * Edit gst-plugins-bad mson.build and remove all subdir('xxx') except subdir('sys')

   * Edit sys/meson.build and keep only subdir('decklink')


Building :


1. Execute Developer Command Line from Visual Studio 2015
2. Add C:\MinGW\bin and C:\MinGW\msys\1.0\bin to Developer Command Line Path
   set PATH=%PATH%; C:\MinGW\bin;C:\MinGW\msys\1.0\bin
3. Execute meson in your gst-plugins-bad folder:
    python3 C:\your_path_to_meson_0_41\meson.py build --backend vs2015
4. Open the solution created in your build folder in Visual Studio 2015
5 Set Target Machine to win64
   Your Solution->Your project->right button->properties->Linker->advanced->Target Machine->MachineX64
6 Build


http://mesonbuild.com/Using-with-Visual-Studio.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html
https://stackoverflow.com/questions/1710922/how-to-install-pkg-config-in-windows

Felipe

On Fri, Jul 14, 2017 at 10:31 AM, Nirbheek Chauhan <[hidden email]> wrote:
Hello,

On Wed, Jul 12, 2017 at 6:50 PM, Felipe Mogollon
<[hidden email]> wrote:
> Hi,
>
> I am trying to build decklink (Blackmagic) plugin into windows using cerbero
> but I can't get any result.
>
> I am using debian 8.0 as host machine
>
> I have made:
>
> ./cerbero-uninstalled -c config/cross-win64 bootstrap
> ./cerbero-uninstalled -c config/cross-win64 build gst-plugins-bad-1.0
>
> successfully but no libgstdecklink.dll is created.
>
> If I dive into gst-plugins-bad-1.0/sys/decklink folder I can see that there
> is a Makefile that has been generated but It doesn't work.
>

If you want to compile things manually, you have to build from inside
the cerbero environment:

./cerbero-uninstalled -c config/cross-win64 shell

Then navigate to that location and do whatever you want to.

> I have checked that there were some changes to support decklink windows in
> the last months but I am not able to get it working.
>
> Am I doing something wrong? Is there any step I am not doing ok?
>

Sorry about that, I tested only the meson build files on Windows since
I was testing the MSVC build. I then decided to also see if it can
work with MinGW and patched it to work that way too. So, in the end,
the Autotools build doesn't have decklink support on Windows.

As a result, the Makefile that is generated won't work for Windows
because it's not using the right sources. Let me cook up a patch for
Autotools.

Cheers,
Nirbheek
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Juan Felipe Mogollón Rodríguez
Researcher | Investigador
Digital Media
+[34] 943 30 92 30
[hidden email]
www.vicomtech.org
Member of IK4 Research Alliance and GraphicsMedia.net
Legal Notice - Privacy policy (http://www.vicomtech.org/en/proteccion-datos)

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel