public unsafe GstPlayer(int width, int height, PlayerUseType type) : base(IntPtr.Zero) { if(GetType() != typeof(GstPlayer)) { throw new InvalidOperationException("Can't override this constructor."); } IntPtr error = IntPtr.Zero; Raw = bacon_video_widget_new(width, height, (int) type, out error); if(error != IntPtr.Zero) throw new GLib.GException(error); }
void Init(PlayerUseType type) { rate = 1; IntPtr error = IntPtr.Zero; Raw = lgm_video_player_new((int)type, out error); if (error != IntPtr.Zero) { throw new GLib.GException(error); } this.GlibError += (o, args) => { if (Error != null) { Error(this, args.Message); } }; this.GlibStateChange += (o, args) => { if (StateChange != null) { StateChange( new PlaybackStateChangedEvent { Sender = this, Playing = args.Playing } ); } }; this.GlibReadyToSeek += (sender, e) => { if (ReadyToSeek != null) { ReadyToSeek(this); } }; this.GlibEos += (sender, e) => { if (Eos != null) { Eos(this); } }; }
public unsafe GstPlayer(PlayerUseType type) : base(IntPtr.Zero) { Init(type); }
void Init (PlayerUseType type) { rate = 1; IntPtr error = IntPtr.Zero; Raw = lgm_video_player_new ((int)type, out error); if (error != IntPtr.Zero) throw new GLib.GException (error); this.GlibError += (o, args) => { if (Error != null) Error (this, args.Message); }; this.GlibStateChange += (o, args) => { if (StateChange != null) StateChange (this, args.Playing); }; this.GlibReadyToSeek += (sender, e) => { if (ReadyToSeek != null) ReadyToSeek (this); }; this.GlibEos += (sender, e) => { if (Eos != null) Eos (this); }; }
public unsafe GstPlayer (PlayerUseType type) : base (IntPtr.Zero) { Init (type); }