Esempio n. 1
0
 public FakeCapturer()
 {
     timer = new LiveSourceTimer ();
     timer.EllapsedTime += delegate(Time ellapsedTime) {
         if (EllapsedTime != null)
             EllapsedTime (ellapsedTime);
     };
 }
Esempio n. 2
0
 public FakeCapturer() : base()
 {
     timer = new LiveSourceTimer();
     timer.EllapsedTime += delegate(int ellapsedTime) {
         if (EllapsedTime != null)
         {
             EllapsedTime(ellapsedTime);
         }
     };
 }
		public unsafe GstCameraCapturer (string filename) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (GstCameraCapturer)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			IntPtr error = IntPtr.Zero;
			Raw = gst_camera_capturer_new(GLib.Marshaller.StringToPtrGStrdup(filename), out error);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			
			timer = new LiveSourceTimer();	
			timer.EllapsedTime += delegate(int ellapsedTime) {
				if (EllapsedTime!= null)
					EllapsedTime(ellapsedTime);
			};			
		}
Esempio n. 4
0
        public unsafe GstCameraCapturer(string filename) : base(IntPtr.Zero)
        {
            if (GetType() != typeof(GstCameraCapturer))
            {
                throw new InvalidOperationException("Can't override this constructor.");
            }
            IntPtr error = IntPtr.Zero;

            Raw = gst_camera_capturer_new(out error);
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }

            timer = new LiveSourceTimer();
            timer.EllapsedTime += delegate(Time ellapsedTime) {
                if (EllapsedTime != null)
                {
                    EllapsedTime(ellapsedTime);
                }
            };

            this.GlibError += (o, args) => {
                if (Error != null)
                {
                    Error(this, args.Message);
                }
            };

            this.GlibDeviceChange += (o, args) => {
                if (DeviceChange != null)
                {
                    DeviceChange(args.DeviceChange);
                }
            };

            this.GlibMediaInfo += (o, args) => {
                if (MediaInfo != null)
                {
                    MediaInfo(args.Width, args.Height, args.ParN, args.ParD);
                }
            };
        }
Esempio n. 5
0
        public unsafe GstCameraCapturer(string filename) : base(IntPtr.Zero)
        {
            if (GetType() != typeof(GstCameraCapturer))
            {
                throw new InvalidOperationException("Can't override this constructor.");
            }
            IntPtr error = IntPtr.Zero;

            Raw = gst_camera_capturer_new(GLib.Marshaller.StringToPtrGStrdup(filename), out error);
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }

            timer = new LiveSourceTimer();
            timer.EllapsedTime += delegate(int ellapsedTime) {
                if (EllapsedTime != null)
                {
                    EllapsedTime(ellapsedTime);
                }
            };
        }
Esempio n. 6
0
		public unsafe GstCameraCapturer (string filename) : base (IntPtr.Zero)
		{
			if (GetType () != typeof(GstCameraCapturer)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			IntPtr error = IntPtr.Zero;
			Raw = gst_camera_capturer_new (out error);
			if (error != IntPtr.Zero)
				throw new GLib.GException (error);

			timer = new LiveSourceTimer ();
			timer.EllapsedTime += delegate(Time ellapsedTime) {
				if (EllapsedTime != null)
					EllapsedTime (ellapsedTime);
			};
			
			this.GlibError += (o, args) => {
				if (Error != null) {
					Error (this, args.Message);
				}
			};
			
			this.GlibDeviceChange += (o, args) => {
				if (DeviceChange != null) {
					DeviceChange (args.DeviceChange);
				}
			};
			
			this.GlibMediaInfo += (o, args) => {
				if (MediaInfo != null) {
					MediaInfo (args.Width, args.Height, args.ParN, args.ParD);
				}
			};
		}