11

I need to install gstreamer-sharp for Xamarin Studio(Gtk# project). I installed OSSBuild and add to references gstreamer-sharp.dll, after debugging I got exception:

Gst.GLib.GException: no element "playbin" in Gst.Parse.Launch(String pipeline_description)

Output:

0:00:00.010000000  6224   0748AA00 ERROR           GST_REGISTRY gstregistrybinary.c:557:gst_registry_binary_read_cache: Binary registry type not recognized (invalid magic) for file at C:\Users\Admin\.gstreamer-0.10\registry.i686.bin

** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libgsf-win32-1-114.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libgsf-win32-1-114.dll': Не найден указанный модуль.

** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libpangocairo-1.0-0.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libpangocairo-1.0-0.dll': Не найдена указанная процедура.

** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\librsvg-2-2.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\librsvg-2-2.dll': Не найден указанный модуль.
0:00:02.501003000  6224   0748AA00 ERROR           GST_PIPELINE grammar.tab.c:1975:_gst_parse_yyparse: no element "playbin"
0:00:02.501003000  6224   0748AA00 ERROR           GST_PIPELINE grammar.tab.c:2564:_gst_parse_launch: Unrecoverable syntax error while parsing pipeline playbin uri=http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.1080p.DivX_Plus_HD.mkv
Loaded Module 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_ru_b77a5c561934e089\mscorlib.resources.dll'

Code:

    Gst.Application.Init ();
    GLib.MainLoop Loop;
    Gst.Element element;
    Loop = new GLib.MainLoop();
    element = Gst.Parse.Launch("playbin uri=http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.1080p.DivX_Plus_HD.mkv");
    element.Bus.AddSignalWatch();
    element.SetState( Gst.State.Playing);
    Loop.Run();

I understand, it's only my fault, so I don't need to fix this, I need to reinstall gstreamer-sharp and correct use it in Xamarin. How is this done correctly?

P.S. I think it would be nice if people who have installed it for .Net could give me advice too.

wonea
  • 4,783
  • 17
  • 86
  • 139
konstantin_doncov
  • 2,725
  • 4
  • 40
  • 100
  • what version of gstreamer-sharp are you using? – knocte Jan 12 '14 at 14:40
  • @knocte gstreamer-sharp v.0.10 – konstantin_doncov Jan 12 '14 at 18:26
  • that version in unsupported, the new version 0.99.0 (which is a beta version towards 1.0) will be the only one which receives new features and bugfixes now, so you're out of luck if you find bugs in the 0.10 version (unless you fix them yourself) – knocte Jan 12 '14 at 19:46
  • @knocte ok, I downloaded v.0.99.0, but I'm completely newbie in compilers like mingw, so I don't know how to compile gstreamer-sharp for Xamarin Studio – konstantin_doncov Jan 13 '14 at 18:09
  • I'm part of the developers of gstreamer-sharp. Unfortunately we haven't prepared gstreamer-sharp to be cross-platform yet (we have only tested it in Linux). You can join us and help though, join the IRC channel #bindinator on irc.gnome.org and we can work together – knocte Jan 13 '14 at 18:47
  • @knocte oh, nice! I will think about this, thanks! One more question, can I use gstreamer(not gstreamer-sharp) in Xamarin Gtk# for cross-platform project? – konstantin_doncov Jan 13 '14 at 23:46
  • if you use gstreamer without using the gstreamer .NET binding, you will need to p/invoke, and that is going to get very hairy very quickly – knocte Jan 14 '14 at 00:24
  • @knocte "very hairy very quickly"? What do you mean? – konstantin_doncov Jan 14 '14 at 00:44
  • have you ever used p/invokes? – knocte Jan 14 '14 at 00:45
  • @knocte if pinvoke is not the best solution, may I use CXXI for call gstreamer C++ functions from Gtk#? – konstantin_doncov Jan 15 '14 at 03:54
  • 1st: GStreamer is not implemented in C++, but C. 2nd: I didn't say it's not the best solution. I think that if you don't use gstreamer-sharp it is the **only** solution! But of course using gstreamer-sharp is better, and I think the time spent helping us making gstreamer-sharp windows-compatible is better spent (and is maybe lower) than the needed to p/invoke gstreamer. – knocte Jan 15 '14 at 09:23

2 Answers2

2

Unfortunately the gstreamer-sharp v.0.10 is not supported. At the moment no version can do what you want however once the 1.0 version is released it will be fully supported on windows, Android and linux.

The V.1.0 should be released within the next 2 months according to their site.

Lain
  • 2,166
  • 4
  • 23
  • 47
1

I had to use a different code. This code is works fine:

        Gst.Application.Init ();
        var pipeDescription = "playbin uri=file:///a:/test.avi ";
        var pipeline = Gst.Parse.Launch(pipeDescription) as Gst.Bin; 
        var someElementInPipe = pipeline.GetChildByName("myBin") as Gst.Element;
        pipeline.SetState(Gst.State.Playing);
konstantin_doncov
  • 2,725
  • 4
  • 40
  • 100