Example #1
0
        public VideoWindow()
        {
            this.Build();

            frame        = new AspectFrame(null, 0.5f, 0.5f, 1f, false);
            frame.Shadow = ShadowType.None;

            messageLabel.NoShowAll = true;

            drawingWindow = new DrawingArea();
            drawingWindow.DoubleBuffered      = false;
            drawingWindow.ExposeEvent        += HandleExposeEvent;
            drawingWindow.MotionNotifyEvent  += HandleMotionNotifyEvent;
            drawingWindow.ButtonPressEvent   += HandleButtonPressEvent;
            drawingWindow.ButtonReleaseEvent += HandleButtonReleaseEvent;
            drawingWindow.AddEvents((int)(Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask | Gdk.EventMask.ScrollMask));

            videoeventbox.ButtonPressEvent   += HandleButtonPressEvent;
            videoeventbox.ButtonReleaseEvent += HandleButtonReleaseEvent;
            videoeventbox.ScrollEvent        += HandleScrollEvent;
            videoeventbox.BorderWidth         = 0;
            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                // Workaround for GTK bugs on Windows not showing the video window
                videoeventbox.VisibilityNotifyEvent += HandleVisibilityNotifyEvent;
            }

            frame.Add(drawingWindow);
            videoeventbox.Add(frame);
            videoeventbox.ShowAll();

            MessageVisible = false;
        }
Example #2
0
        public Player(AspectFrame aspectFrame)
        {
            this.frame = aspectFrame;

            //InitializeSocket();
            InitializePositionWatcher();
            InitializePlaybin();
        }
Example #3
0
        private void InitializeVideoFrame()
        {
            /* Create frame */
            frame            = new AspectFrame(null, 0.5f, 0.5f, 1.6f, false);
            frame.ShadowType = ShadowType.None;     //Otherwise we have a border around the frame

            /* Create event box */
            EventBox videoFrameEventBox = new EventBox();

            videoFrameEventBox.Add(frame);
            RGBA black = new RGBA();

            black.Red   = 0;
            black.Green = 0;
            black.Blue  = 0;
            black.Alpha = 1;
            videoFrameEventBox.OverrideBackgroundColor(StateFlags.Normal, black);     //So the area outside the video is also black

            Bin bin = Base.GetWidget(WidgetNames.VideoImageOverlay) as Bin;

            bin.Add(videoFrameEventBox);
            bin.ShowAll();
        }
Example #4
0
        public Player(AspectFrame aspectFrame)
        {
            this.frame = aspectFrame;

            InitializePositionWatcher();
        }