Update the element bindings to use GTypeNameAttribute

This commit is contained in:
Sebastian Dröge 2009-05-21 21:47:17 +02:00
parent 9d71f4e833
commit 15532cc8c6
5 changed files with 6 additions and 13 deletions

View file

@ -25,6 +25,7 @@ namespace Gst.BasePlugins
}
}
[GTypeName("GstDecodeBin")]
public class DecodeBin : Bin
{
private Delegate new_decoded_pad_delegate;
@ -33,10 +34,6 @@ namespace Gst.BasePlugins
{
}
public DecodeBin (GLib.Object o) : base (o.Handle)
{
}
protected virtual void OnNewDecodedPad(object o, GLib.SignalArgs args)
{
BindingHelper.InvokeProxySignalDelegate(new_decoded_pad_delegate,

View file

@ -13,14 +13,13 @@ using System.Runtime.InteropServices;
namespace Gst.BasePlugins
{
[GTypeName("GstPlayBin")]
public class PlayBin : Pipeline
{
public PlayBin(IntPtr raw) : base(raw)
{
}
public PlayBin(GLib.Object o) : base (o.Handle) {}
[GLib.Property("uri")]
public string Uri {
get {

View file

@ -26,6 +26,7 @@ namespace Gst.CorePlugins
}
}
[GTypeName("GstTypeFindElement")]
public class TypeFindElement : Element
{
private Delegate have_type_delegate;
@ -34,13 +35,9 @@ namespace Gst.CorePlugins
{
}
public TypeFindElement(GLib.Object o) : base(o.Handle)
{
}
public static TypeFindElement Make(string name)
{
return new TypeFindElement (ElementFactory.Make("typefind", name));
return ElementFactory.Make("typefind", name) as TypeFindElement;
}
protected virtual void OnHaveType(object o, GLib.SignalArgs args)

View file

@ -96,7 +96,7 @@ public class DecodeBinTranscoder : IDisposable
filesink = ElementFactory.Make("filesink", "filesink");
audioconvert = ElementFactory.Make("audioconvert", "audioconvert");
encoder = ElementFactory.Make("wavenc", "wavenc");
decodebin = new DecodeBin (ElementFactory.Make("decodebin", "decodebin"));
decodebin = ElementFactory.Make("decodebin", "decodebin") as DecodeBin;
decodebin.NewDecodedPad += OnNewDecodedPad;
pipeline.Add (filesrc, decodebin, audioconvert, encoder, filesink);

View file

@ -26,7 +26,7 @@ public class PlayBinPlayer
Gst.Application.Init ();
loop = new MainLoop ();
play = new PlayBin (ElementFactory.Make ("playbin", "play"));
play = ElementFactory.Make ("playbin", "play") as PlayBin;
if (play == null) {
Console.WriteLine ("error creating a playbin gstreamer object");