[Gtk-sharp-list] Gst# bindings and audio seeking
Christian Rudh
lists-christian@rudh.se
Fri, 07 Jan 2005 12:00:02 +0100
Hi
I am stuck trying to get seeking in audio working with Gst#, and I know
that other developers are too. I haven't found _any_ example of how to
do this with correctly with Gst#. The following are two tries that I
have found or come up with after inspecting the C code:
Version 1:
ulong s = 5;
s = s*1000*1000*1000;
uint seekType = (uint)SeekType.MethodSet;
if (bin.Seek (seekType, s))
Console.WriteLine("Yes");
else
Console.WriteLine("No");
But I couldn't get it to do anything. I tried (among other things) to
replace bin (the pipeline) with the sink but that didn't work either.
I found another C-example:
http://gstreamer.freedesktop.org/data/doc/gstreamer/stable/gstreamer/html/gstreamer-GstEvent.html#id2643201
And I tried the following:
long s = 5;
s = s*1000*1000*1000;
uint seekType = (uint)SeekType.MethodSet;
if (bin.SendEvent (Gst.Event.NewSeek (SeekType.MethodSet, s)))
Console.WriteLine("Yes");
else
Console.WriteLine("No");
But couldn't get that to do anything either. In the example they send
the event to bin (the sink), when I tried to do that the application
crashed without any info. Sending it to the pipeline did nothing.
So I don't know if I am missing something or if there is a problem with
the bindnings. Any help or pointing me to example code would be really
appreciated!
Thanks,
Christian Rudh