コード例 #1
0
ファイル: FakeCapturer.cs プロジェクト: GNOME/longomatch
 public FakeCapturer()
 {
     timer = new LiveSourceTimer ();
     timer.EllapsedTime += delegate(Time ellapsedTime) {
         if (EllapsedTime != null)
             EllapsedTime (ellapsedTime);
     };
 }
コード例 #2
0
ファイル: FakeCapturer.cs プロジェクト: youmery/longomatch-1
 public FakeCapturer() : base()
 {
     timer = new LiveSourceTimer();
     timer.EllapsedTime += delegate(int ellapsedTime) {
         if (EllapsedTime != null)
         {
             EllapsedTime(ellapsedTime);
         }
     };
 }
コード例 #3
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);
			};			
		}
コード例 #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);
                }
            };
        }
コード例 #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);
                }
            };
        }
コード例 #6
0
ファイル: GstCameraCapturer.cs プロジェクト: GNOME/longomatch
		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);
				}
			};
		}