how to use gstreamer-sharp in Visual Studio WinForms applicaiton

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

how to use gstreamer-sharp in Visual Studio WinForms applicaiton

rockStarInTraining
Hi,

I have downloaded the "glue" DLL (libgstreamersharpglue-1.0.0.dll) which also includes glib-sharp.dll & gstramer-sharp.dll.  I have installed gstreamer 1.4.0 x86 from: https://gstreamer.freedesktop.org/data/pkg/windows/1.4.0/.  I also have downloaded gtk-sharp2.12.

If I create a standard WinForms project in VS 2012 targeting .NET 4.5 and add a dependencies to glib-sharp.dll, gstreamer-sharp.dll, gtk-dotnet.dll, & gtk-sharp.dll and have the glue DLL (libgstreamersharpglue-1.0.0.dll) in the  debug directory.  I get an error when executing the first line of code that makes a call to gstreamer-sharp: Gst.Application.Init()

The type initializer for 'Gst.Application' threw an exception.  {"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"}

Source: gstreamer-sharp
StackTrace:    at Gst.Application.Init()
   at GStreamerTest.Form1..ctor() in c:\Users\Dfisch\Documents\Visual Studio 2012\Projects\GStreamerTest\GStreamerTest\Form1.cs:line 25
   at GStreamerTest.Program.Main() in c:\Users\Dfisch\Documents\Visual Studio 2012\Projects\GStreamerTest\GStreamerTest\Program.cs:line 17

How do I fix this or what am I doing wrong?

Also I would like to know how I can bind or link-up gstreamer-sharp with a GUI control for showing my video stream?



Reply | Threaded
Open this post in threaded view
|

Re: how to use gstreamer-sharp in Visual Studio WinForms applicaiton

rockStarInTraining
I have tried the same in Visual Studio 2013 and it runs the Applicaiton.Init(), so I am guessing that the glue DLL is not compatible with VS 2012 which is what I really need it to work with.  Now I have no clue how to actually display a stream from my camera in a WinForm.