Ejemplo n.º 1
0
        async public Task <bool> cropHandler(UISettings uiSettings, AxAXVLC.AxVLCPlugin2 axVLCPlugin, Point mousePosition)
        {
            Point cropPoint = await calculateCursorVideoPosition(uiSettings, axVLCPlugin, mousePosition);

            if (cropPoint.X < 0 || cropPoint.Y < 0)
            {
                return(false);                                    //cropPoint is valid and ontop of video.
            }
            if (cropPosition1.X == -1)
            {
                cropPosition1     = cropPoint;
                cropFormPosition1 = mousePosition;

                return(true);
            }
            else if (cropPosition2.X == -1)
            {
                if (cropPoint.X > cropPosition1.X && cropPoint.Y < cropPosition1.Y) //cropPoint.Y < cropPosition1.Y actually means that cropPoint has to be HIGHER. 0,0 is at top left of screen.
                {
                    cropPosition2     = cropPoint;
                    cropFormPosition2 = mousePosition;
                    generateCropSize();


                    return(true);
                }
            }
            else
            {
                Console.WriteLine("Crop has already been set. Clear crop to set a new one.");
            }

            return(false);
        }
Ejemplo n.º 2
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VlcPlayer));
     this.axVLCPlugin = new AxAXVLC.AxVLCPlugin2();
     ((System.ComponentModel.ISupportInitialize)(this.axVLCPlugin)).BeginInit();
     this.SuspendLayout();
     //
     // axVLCPlugin
     //
     this.axVLCPlugin.CausesValidation = false;
     this.axVLCPlugin.Dock             = System.Windows.Forms.DockStyle.Fill;
     this.axVLCPlugin.Enabled          = true;
     this.axVLCPlugin.Location         = new System.Drawing.Point(0, 0);
     this.axVLCPlugin.Name             = "axVLCPlugin";
     this.axVLCPlugin.OcxState         = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axVLCPlugin.OcxState")));
     this.axVLCPlugin.Size             = new System.Drawing.Size(150, 150);
     this.axVLCPlugin.TabIndex         = 0;
     this.axVLCPlugin.TabStop          = false;
     //
     // VlcPlayer
     //
     this.BackColor = System.Drawing.Color.Black;
     this.Controls.Add(this.axVLCPlugin);
     this.Name = "VlcPlayer";
     ((System.ComponentModel.ISupportInitialize)(this.axVLCPlugin)).EndInit();
     this.ResumeLayout(false);
 }
Ejemplo n.º 3
0
 public static void StopPlaying(this AxAXVLC.AxVLCPlugin2 player)
 {
     if (player.playlist.isPlaying)
     {
         player.playlist.stop();
         System.Threading.Thread.Sleep(1000);
     }
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StreamPlayer));
     this.trackBar1 = new System.Windows.Forms.TrackBar();
     this.axVLCPlugin21 = new AxAXVLC.AxVLCPlugin2();
     ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.axVLCPlugin21)).BeginInit();
     this.SuspendLayout();
     //
     // trackBar1
     //
     this.trackBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.trackBar1.Location = new System.Drawing.Point(0, 433);
     this.trackBar1.Name = "trackBar1";
     this.trackBar1.Size = new System.Drawing.Size(695, 45);
     this.trackBar1.TabIndex = 1;
     this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
     this.trackBar1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.trackBar1_KeyDown);
     //
     // axVLCPlugin21
     //
     this.axVLCPlugin21.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                 | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right)));
     this.axVLCPlugin21.Enabled = true;
     this.axVLCPlugin21.Location = new System.Drawing.Point(0, 0);
     this.axVLCPlugin21.Name = "axVLCPlugin21";
     this.axVLCPlugin21.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axVLCPlugin21.OcxState")));
     this.axVLCPlugin21.Size = new System.Drawing.Size(695, 434);
     this.axVLCPlugin21.TabIndex = 0;
     this.axVLCPlugin21.MediaPlayerPlaying += new System.EventHandler(this.axVLCPlugin21_MediaPlayerPlaying);
     this.axVLCPlugin21.MediaPlayerEndReached += new System.EventHandler(this.axVLCPlugin21_MediaPlayerEndReached);
     this.axVLCPlugin21.MediaPlayerBuffering += new System.EventHandler(this.axVLCPlugin21_MediaPlayerBuffering);
     this.axVLCPlugin21.MediaPlayerTimeChanged += new AxAXVLC.DVLCEvents_MediaPlayerTimeChangedEventHandler(this.axVLCPlugin21_MediaPlayerTimeChanged);
     this.axVLCPlugin21.MediaPlayerPositionChanged += new AxAXVLC.DVLCEvents_MediaPlayerPositionChangedEventHandler(this.axVLCPlugin21_MediaPlayerPositionChanged);
     this.axVLCPlugin21.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.axVLCPlugin21_PreviewKeyDown);
     this.axVLCPlugin21.MediaPlayerOpening += new System.EventHandler(this.axVLCPlugin21_MediaPlayerOpening);
     //
     // StreamPlayer
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(695, 478);
     this.Controls.Add(this.trackBar1);
     this.Controls.Add(this.axVLCPlugin21);
     this.Name = "StreamPlayer";
     this.Text = "StreamPlayer";
     this.Load += new System.EventHandler(this.StreamPlayer_Load);
     this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.StreamPlayer_KeyPress);
     this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.StreamPlayer_KeyDown);
     ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.axVLCPlugin21)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Ejemplo n.º 5
0
        async static public Task <Point> calculateUIPosition(Form1 form, AxAXVLC.AxVLCPlugin2 axVLCPlugin)
        {
            //Task 1. Get video location of (50, 80)
            //boxPosition = (50, 80) example
            //use vlc media player position and aspect ratio.
            //form.currentVideo.PrimaryVideoStream.Width
            //Video_Clip_Sharer.Form1.ActiveForm.axVLC
            //form.axVLC
            Size  size     = axVLCPlugin.Size;
            Point location = axVLCPlugin.Location;

            Console.WriteLine(size);
            Console.WriteLine(location);
            return(new Point(0, 0));
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
     this.osdChannelList1 = new com.CouchPotato.UserControls.OSDChannelList();
     this.axVLCPlugin21 = new AxAXVLC.AxVLCPlugin2();
     ((System.ComponentModel.ISupportInitialize)(this.axVLCPlugin21)).BeginInit();
     this.SuspendLayout();
     //
     // osdChannelList1
     //
     this.osdChannelList1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     this.osdChannelList1.Location = new System.Drawing.Point(20, 20);
     this.osdChannelList1.Name = "osdChannelList1";
     this.osdChannelList1.Size = new System.Drawing.Size(300, 38);
     this.osdChannelList1.Visible = false;
     //
     // axVLCPlugin21
     //
     this.axVLCPlugin21.Enabled = true;
     this.axVLCPlugin21.Location = new System.Drawing.Point(0, 0);
     this.axVLCPlugin21.Name = "axVLCPlugin21";
     this.axVLCPlugin21.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axVLCPlugin21.OcxState")));
     this.axVLCPlugin21.Size = new System.Drawing.Size(320, 240);
     this.axVLCPlugin21.TabIndex = 1;
     //
     // MainForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(549, 398);
     this.Controls.Add(this.osdChannelList1);
     this.Controls.Add(this.axVLCPlugin21);
     this.DoubleBuffered = true;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.KeyPreview = true;
     this.Name = "MainForm";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "CouchPotato";
     this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
     this.Load += new System.EventHandler(this.MainForm_Load);
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
     ((System.ComponentModel.ISupportInitialize)(this.axVLCPlugin21)).EndInit();
     this.ResumeLayout(false);
 }
Ejemplo n.º 7
0
    public Test(Form toCover, AxAXVLC.AxVLCPlugin2 ply)
    {
        InitializeComponent();
        WinEventDelegate = new Hook.WinEventDelegate(WinEventCallback);
        this.SetTopLevel(true);
        this.TopMost       = true;
        this.ControlBox    = false;
        this.ShowInTaskbar = false;
        this.StartPosition = FormStartPosition.Manual;
        this.AutoScaleMode = AutoScaleMode.None;
        this.Show(toCover);
        toCover.Focus();

        try
        {
            Target = Process.GetProcessesByName("TestPlayer").FirstOrDefault(p => p != null);
            if (Target != null)
            {
                testPic = Target.MainWindowHandle;
                uint TargetThreadId = Hook.GetWindowThread(testPic);
                if (testPic != IntPtr.Zero)
                {
                    hWinEventHook = Hook.WinEventHookOne(Hook.SWEH_Events.EVENT_OBJECT_LOCATIONCHANGE,
                                                         WinEventDelegate,
                                                         (uint)Target.Id,
                                                         TargetThreadId);
                    rect = Hook.GetWindowRect(testPic);
                }
                if (ply.video.fullscreen == true)
                {
                    Debug.WriteLine("yes is ");
                    this.WindowState = FormWindowState.Maximized;
                }
            }
        }
        catch (Exception e)
        {
            throw e;
        }
    }
Ejemplo n.º 8
0
        public static void PlayFile(this AxAXVLC.AxVLCPlugin2 player, string videoFilePath)
        {
            if (player == null)
            {
                throw new ArgumentNullException("player");
            }
            if (videoFilePath == null)
            {
                throw new ArgumentNullException("videoFilePath");
            }

            if (player.playlist.isPlaying)
            {
                player.playlist.stop();
            }
            player.playlist.items.clear();


            int idx = player.playlist.add(videoFilePath, null, null);

            player.playlist.playItem(idx);
        }
Ejemplo n.º 9
0
        //private void InitInThread(object sender) { }
        private void InitializeComponent()
        {
            vlc1 = new AxAXVLC.AxVLCPlugin2();
            ((System.ComponentModel.ISupportInitialize)(vlc1)).BeginInit();
            //try { ((System.ComponentModel.ISupportInitialize)(vlc1)).BeginInit(); }
            //catch { };
            //ThreadPool.QueueUserWorkItem(InitInThread, new object[] { this });
            //Thread.Sleep(1000);
            //InitInThread(this);

            this.SuspendLayout();
            vlc1.Enabled = false;
            vlc1.Dock    = DockStyle.Fill;
            vlc1.MediaPlayerPositionChanged += (sender, args) => Vlc1PositionChanged();
            vlc1.MediaPlayerBuffering       += (sender, args) => Vlc1Buffering();
            this.Controls.Add(vlc1);
            lostTimer       = new System.Windows.Forms.Timer();
            lostTimer.Tick += new EventHandler(this.LostRtsp1Timer_Tick);
            ((System.ComponentModel.ISupportInitialize)(vlc1)).EndInit(); //no vlc: System.IO.FileNotFoundException: 'Не найден указанный модуль. (Исключение из HRESULT: 0x8007007E)'
            //try { ((System.ComponentModel.ISupportInitialize)(vlc1)).EndInit(); }
            //catch { };
            this.ResumeLayout(false);
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PicQueryForm));
     this.queryBtn = new System.Windows.Forms.Button();
     this.label1 = new System.Windows.Forms.Label();
     this.label2 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.comboBox1 = new System.Windows.Forms.ComboBox();
     this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
     this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
     this.timeEdit1 = new DevExpress.XtraEditors.TimeEdit();
     this.timeEdit2 = new DevExpress.XtraEditors.TimeEdit();
     this.imageList1 = new System.Windows.Forms.ImageList(this.components);
     this.imageList2 = new System.Windows.Forms.ImageList(this.components);
     this.bestPicListView = new System.Windows.Forms.ListView();
     this.groupBox3 = new System.Windows.Forms.GroupBox();
     this.groupBox4 = new System.Windows.Forms.GroupBox();
     this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
     this.pictureBoxFace = new System.Windows.Forms.PictureBox();
     this.labelCaptureLoc = new System.Windows.Forms.Label();
     this.labelCaptureTime = new System.Windows.Forms.Label();
     this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
     this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
     this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
     this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     this.splitContainer2 = new System.Windows.Forms.SplitContainer();
     this.groupBox2 = new System.Windows.Forms.GroupBox();
     this.axVLCPlugin21 = new AxAXVLC.AxVLCPlugin2();
     this.splitter1 = new System.Windows.Forms.Splitter();
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.pictureBoxWholeImg = new System.Windows.Forms.PictureBox();
     this.toolStrip1 = new System.Windows.Forms.ToolStrip();
     this.toolStripButtonFirstPage = new System.Windows.Forms.ToolStripButton();
     this.toolStripButtonPrePage = new System.Windows.Forms.ToolStripButton();
     this.toolStripButtonNextPage = new System.Windows.Forms.ToolStripButton();
     this.toolStripButtonLastPage = new System.Windows.Forms.ToolStripButton();
     this.toolStripLabelCurPage = new System.Windows.Forms.ToolStripLabel();
     this.toolStripComboBoxPageSize = new System.Windows.Forms.ToolStripComboBox();
     this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
     this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
     this.toolStripButtonPlayVideo = new System.Windows.Forms.ToolStripButton();
     this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
     this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
     ((System.ComponentModel.ISupportInitialize)(this.timeEdit1.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.timeEdit2.Properties)).BeginInit();
     this.groupBox3.SuspendLayout();
     this.groupBox4.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
     this.layoutControl1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBoxFace)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     this.splitContainer2.Panel1.SuspendLayout();
     this.splitContainer2.Panel2.SuspendLayout();
     this.splitContainer2.SuspendLayout();
     this.groupBox2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.axVLCPlugin21)).BeginInit();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWholeImg)).BeginInit();
     this.toolStrip1.SuspendLayout();
     this.SuspendLayout();
     //
     // queryBtn
     //
     this.queryBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.queryBtn.Location = new System.Drawing.Point(724, 26);
     this.queryBtn.Name = "queryBtn";
     this.queryBtn.Size = new System.Drawing.Size(86, 23);
     this.queryBtn.TabIndex = 0;
     this.queryBtn.Text = "查询";
     this.queryBtn.UseVisualStyleBackColor = true;
     this.queryBtn.Click += new System.EventHandler(this.queryBtn_Click);
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(12, 31);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(41, 12);
     this.label1.TabIndex = 1;
     this.label1.Text = "监控点";
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(184, 31);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(23, 12);
     this.label2.TabIndex = 2;
     this.label2.Text = "从:";
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(470, 31);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(23, 12);
     this.label3.TabIndex = 3;
     this.label3.Text = "到:";
     //
     // comboBox1
     //
     this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.comboBox1.FormattingEnabled = true;
     this.comboBox1.Location = new System.Drawing.Point(85, 27);
     this.comboBox1.Name = "comboBox1";
     this.comboBox1.Size = new System.Drawing.Size(73, 20);
     this.comboBox1.TabIndex = 4;
     //
     // dateTimePicker1
     //
     this.dateTimePicker1.Location = new System.Drawing.Point(209, 27);
     this.dateTimePicker1.Name = "dateTimePicker1";
     this.dateTimePicker1.Size = new System.Drawing.Size(129, 21);
     this.dateTimePicker1.TabIndex = 5;
     //
     // dateTimePicker2
     //
     this.dateTimePicker2.Location = new System.Drawing.Point(498, 27);
     this.dateTimePicker2.Name = "dateTimePicker2";
     this.dateTimePicker2.Size = new System.Drawing.Size(129, 21);
     this.dateTimePicker2.TabIndex = 6;
     //
     // timeEdit1
     //
     this.timeEdit1.EditValue = new System.DateTime(2009, 5, 7, 0, 0, 0, 0);
     this.timeEdit1.Location = new System.Drawing.Point(344, 27);
     this.timeEdit1.Name = "timeEdit1";
     this.timeEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
     new DevExpress.XtraEditors.Controls.EditorButton()});
     this.timeEdit1.Size = new System.Drawing.Size(75, 23);
     this.timeEdit1.TabIndex = 7;
     //
     // timeEdit2
     //
     this.timeEdit2.EditValue = new System.DateTime(2009, 5, 7, 0, 0, 0, 0);
     this.timeEdit2.Location = new System.Drawing.Point(633, 27);
     this.timeEdit2.Name = "timeEdit2";
     this.timeEdit2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
     new DevExpress.XtraEditors.Controls.EditorButton()});
     this.timeEdit2.Size = new System.Drawing.Size(71, 23);
     this.timeEdit2.TabIndex = 8;
     //
     // imageList1
     //
     this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
     this.imageList1.ImageSize = new System.Drawing.Size(80, 60);
     this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
     //
     // imageList2
     //
     this.imageList2.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
     this.imageList2.ImageSize = new System.Drawing.Size(80, 60);
     this.imageList2.TransparentColor = System.Drawing.Color.Transparent;
     //
     // bestPicListView
     //
     this.bestPicListView.Activation = System.Windows.Forms.ItemActivation.OneClick;
     this.bestPicListView.AutoArrange = false;
     this.bestPicListView.Dock = System.Windows.Forms.DockStyle.Fill;
     this.bestPicListView.HideSelection = false;
     this.bestPicListView.Location = new System.Drawing.Point(0, 27);
     this.bestPicListView.MultiSelect = false;
     this.bestPicListView.Name = "bestPicListView";
     this.bestPicListView.RightToLeft = System.Windows.Forms.RightToLeft.No;
     this.bestPicListView.Size = new System.Drawing.Size(840, 256);
     this.bestPicListView.TabIndex = 10;
     this.bestPicListView.UseCompatibleStateImageBehavior = false;
     this.bestPicListView.ItemActivate += new System.EventHandler(this.bestPicListView_ItemActivate);
     //
     // groupBox3
     //
     this.groupBox3.Controls.Add(this.label2);
     this.groupBox3.Controls.Add(this.label1);
     this.groupBox3.Controls.Add(this.label3);
     this.groupBox3.Controls.Add(this.comboBox1);
     this.groupBox3.Controls.Add(this.queryBtn);
     this.groupBox3.Controls.Add(this.dateTimePicker1);
     this.groupBox3.Controls.Add(this.dateTimePicker2);
     this.groupBox3.Controls.Add(this.timeEdit1);
     this.groupBox3.Controls.Add(this.timeEdit2);
     this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top;
     this.groupBox3.Location = new System.Drawing.Point(0, 0);
     this.groupBox3.Name = "groupBox3";
     this.groupBox3.Size = new System.Drawing.Size(840, 70);
     this.groupBox3.TabIndex = 17;
     this.groupBox3.TabStop = false;
     this.groupBox3.Text = "查询条件";
     //
     // groupBox4
     //
     this.groupBox4.Controls.Add(this.layoutControl1);
     this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
     this.groupBox4.Location = new System.Drawing.Point(0, 0);
     this.groupBox4.Name = "groupBox4";
     this.groupBox4.Size = new System.Drawing.Size(184, 185);
     this.groupBox4.TabIndex = 19;
     this.groupBox4.TabStop = false;
     this.groupBox4.Text = "放大显示";
     //
     // layoutControl1
     //
     this.layoutControl1.Controls.Add(this.pictureBoxFace);
     this.layoutControl1.Controls.Add(this.labelCaptureLoc);
     this.layoutControl1.Controls.Add(this.labelCaptureTime);
     this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.layoutControl1.Location = new System.Drawing.Point(3, 17);
     this.layoutControl1.Name = "layoutControl1";
     this.layoutControl1.Root = this.layoutControlGroup1;
     this.layoutControl1.Size = new System.Drawing.Size(178, 165);
     this.layoutControl1.TabIndex = 0;
     this.layoutControl1.Text = "layoutControl1";
     //
     // pictureBoxFace
     //
     this.pictureBoxFace.Location = new System.Drawing.Point(7, 7);
     this.pictureBoxFace.Name = "pictureBoxFace";
     this.pictureBoxFace.Size = new System.Drawing.Size(164, 86);
     this.pictureBoxFace.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
     this.pictureBoxFace.TabIndex = 19;
     this.pictureBoxFace.TabStop = false;
     //
     // labelCaptureLoc
     //
     this.labelCaptureLoc.Location = new System.Drawing.Point(7, 103);
     this.labelCaptureLoc.Name = "labelCaptureLoc";
     this.labelCaptureLoc.Size = new System.Drawing.Size(164, 22);
     this.labelCaptureLoc.TabIndex = 17;
     this.labelCaptureLoc.Text = "抓拍地点:";
     this.labelCaptureLoc.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // labelCaptureTime
     //
     this.labelCaptureTime.Location = new System.Drawing.Point(7, 135);
     this.labelCaptureTime.Name = "labelCaptureTime";
     this.labelCaptureTime.Size = new System.Drawing.Size(164, 23);
     this.labelCaptureTime.TabIndex = 18;
     this.labelCaptureTime.Text = "抓拍时间:";
     this.labelCaptureTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // layoutControlGroup1
     //
     this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
     this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
     this.layoutControlItem1,
     this.layoutControlItem2,
     this.layoutControlItem3});
     this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
     this.layoutControlGroup1.Name = "layoutControlGroup1";
     this.layoutControlGroup1.OptionsItemText.TextToControlDistance = 5;
     this.layoutControlGroup1.Size = new System.Drawing.Size(178, 165);
     this.layoutControlGroup1.Text = "layoutControlGroup1";
     this.layoutControlGroup1.TextVisible = false;
     //
     // layoutControlItem1
     //
     this.layoutControlItem1.Control = this.labelCaptureTime;
     this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
     this.layoutControlItem1.Location = new System.Drawing.Point(0, 128);
     this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 33);
     this.layoutControlItem1.MinSize = new System.Drawing.Size(31, 33);
     this.layoutControlItem1.Name = "layoutControlItem1";
     this.layoutControlItem1.Size = new System.Drawing.Size(174, 33);
     this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
     this.layoutControlItem1.Text = "layoutControlItem1";
     this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
     this.layoutControlItem1.TextToControlDistance = 0;
     this.layoutControlItem1.TextVisible = false;
     //
     // layoutControlItem2
     //
     this.layoutControlItem2.Control = this.labelCaptureLoc;
     this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
     this.layoutControlItem2.Location = new System.Drawing.Point(0, 96);
     this.layoutControlItem2.MaxSize = new System.Drawing.Size(0, 32);
     this.layoutControlItem2.MinSize = new System.Drawing.Size(31, 32);
     this.layoutControlItem2.Name = "layoutControlItem2";
     this.layoutControlItem2.Size = new System.Drawing.Size(174, 32);
     this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
     this.layoutControlItem2.Text = "layoutControlItem2";
     this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
     this.layoutControlItem2.TextToControlDistance = 0;
     this.layoutControlItem2.TextVisible = false;
     //
     // layoutControlItem3
     //
     this.layoutControlItem3.Control = this.pictureBoxFace;
     this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
     this.layoutControlItem3.Location = new System.Drawing.Point(0, 0);
     this.layoutControlItem3.Name = "layoutControlItem3";
     this.layoutControlItem3.Size = new System.Drawing.Size(174, 96);
     this.layoutControlItem3.Text = "layoutControlItem3";
     this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
     this.layoutControlItem3.TextToControlDistance = 0;
     this.layoutControlItem3.TextVisible = false;
     //
     // splitContainer1
     //
     this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer1.Location = new System.Drawing.Point(0, 70);
     this.splitContainer1.Name = "splitContainer1";
     this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // splitContainer1.Panel1
     //
     this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
     //
     // splitContainer1.Panel2
     //
     this.splitContainer1.Panel2.Controls.Add(this.bestPicListView);
     this.splitContainer1.Panel2.Controls.Add(this.toolStrip1);
     this.splitContainer1.Size = new System.Drawing.Size(840, 472);
     this.splitContainer1.SplitterDistance = 185;
     this.splitContainer1.TabIndex = 20;
     //
     // splitContainer2
     //
     this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer2.Location = new System.Drawing.Point(0, 0);
     this.splitContainer2.Name = "splitContainer2";
     //
     // splitContainer2.Panel1
     //
     this.splitContainer2.Panel1.Controls.Add(this.groupBox4);
     //
     // splitContainer2.Panel2
     //
     this.splitContainer2.Panel2.Controls.Add(this.groupBox2);
     this.splitContainer2.Panel2.Controls.Add(this.splitter1);
     this.splitContainer2.Panel2.Controls.Add(this.groupBox1);
     this.splitContainer2.Size = new System.Drawing.Size(840, 185);
     this.splitContainer2.SplitterDistance = 184;
     this.splitContainer2.TabIndex = 21;
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.axVLCPlugin21);
     this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
     this.groupBox2.Location = new System.Drawing.Point(442, 0);
     this.groupBox2.Name = "groupBox2";
     this.groupBox2.Size = new System.Drawing.Size(210, 185);
     this.groupBox2.TabIndex = 19;
     this.groupBox2.TabStop = false;
     this.groupBox2.Text = "视频";
     //
     // axVLCPlugin21
     //
     this.axVLCPlugin21.Dock = System.Windows.Forms.DockStyle.Fill;
     this.axVLCPlugin21.Enabled = true;
     this.axVLCPlugin21.Location = new System.Drawing.Point(3, 17);
     this.axVLCPlugin21.Name = "axVLCPlugin21";
     this.axVLCPlugin21.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axVLCPlugin21.OcxState")));
     this.axVLCPlugin21.Size = new System.Drawing.Size(204, 165);
     this.axVLCPlugin21.TabIndex = 31;
     //
     // splitter1
     //
     this.splitter1.Location = new System.Drawing.Point(439, 0);
     this.splitter1.Name = "splitter1";
     this.splitter1.Size = new System.Drawing.Size(3, 185);
     this.splitter1.TabIndex = 18;
     this.splitter1.TabStop = false;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.pictureBoxWholeImg);
     this.groupBox1.Dock = System.Windows.Forms.DockStyle.Left;
     this.groupBox1.Location = new System.Drawing.Point(0, 0);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(439, 185);
     this.groupBox1.TabIndex = 17;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "全身像";
     //
     // pictureBoxWholeImg
     //
     this.pictureBoxWholeImg.Dock = System.Windows.Forms.DockStyle.Fill;
     this.pictureBoxWholeImg.Location = new System.Drawing.Point(3, 17);
     this.pictureBoxWholeImg.Name = "pictureBoxWholeImg";
     this.pictureBoxWholeImg.Size = new System.Drawing.Size(433, 165);
     this.pictureBoxWholeImg.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
     this.pictureBoxWholeImg.TabIndex = 16;
     this.pictureBoxWholeImg.TabStop = false;
     //
     // toolStrip1
     //
     this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.toolStripButtonFirstPage,
     this.toolStripButtonPrePage,
     this.toolStripButtonNextPage,
     this.toolStripButtonLastPage,
     this.toolStripLabelCurPage,
     this.toolStripComboBoxPageSize,
     this.toolStripLabel1,
     this.toolStripSeparator2,
     this.toolStripButtonPlayVideo,
     this.toolStripSeparator1,
     this.saveToolStripButton});
     this.toolStrip1.Location = new System.Drawing.Point(0, 0);
     this.toolStrip1.Name = "toolStrip1";
     this.toolStrip1.Size = new System.Drawing.Size(840, 27);
     this.toolStrip1.TabIndex = 13;
     this.toolStrip1.Text = "toolStrip1";
     //
     // toolStripButtonFirstPage
     //
     this.toolStripButtonFirstPage.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonFirstPage.Image")));
     this.toolStripButtonFirstPage.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonFirstPage.Name = "toolStripButtonFirstPage";
     this.toolStripButtonFirstPage.Size = new System.Drawing.Size(55, 24);
     this.toolStripButtonFirstPage.Text = "首页";
     this.toolStripButtonFirstPage.Click += new System.EventHandler(this.toolStripButtonFirstPage_Click);
     //
     // toolStripButtonPrePage
     //
     this.toolStripButtonPrePage.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonPrePage.Image")));
     this.toolStripButtonPrePage.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonPrePage.Name = "toolStripButtonPrePage";
     this.toolStripButtonPrePage.Size = new System.Drawing.Size(55, 24);
     this.toolStripButtonPrePage.Text = "上页";
     this.toolStripButtonPrePage.Click += new System.EventHandler(this.toolStripButtonPrePage_Click);
     //
     // toolStripButtonNextPage
     //
     this.toolStripButtonNextPage.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonNextPage.Image")));
     this.toolStripButtonNextPage.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonNextPage.Name = "toolStripButtonNextPage";
     this.toolStripButtonNextPage.Size = new System.Drawing.Size(55, 24);
     this.toolStripButtonNextPage.Text = "下页";
     this.toolStripButtonNextPage.Click += new System.EventHandler(this.toolStripButtonNextPage_Click);
     //
     // toolStripButtonLastPage
     //
     this.toolStripButtonLastPage.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonLastPage.Image")));
     this.toolStripButtonLastPage.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonLastPage.Name = "toolStripButtonLastPage";
     this.toolStripButtonLastPage.Size = new System.Drawing.Size(55, 24);
     this.toolStripButtonLastPage.Text = "末页";
     this.toolStripButtonLastPage.Click += new System.EventHandler(this.toolStripButtonLastPage_Click);
     //
     // toolStripLabelCurPage
     //
     this.toolStripLabelCurPage.Name = "toolStripLabelCurPage";
     this.toolStripLabelCurPage.Size = new System.Drawing.Size(57, 24);
     this.toolStripLabelCurPage.Text = "第1/1页";
     //
     // toolStripComboBoxPageSize
     //
     this.toolStripComboBoxPageSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.toolStripComboBoxPageSize.Items.AddRange(new object[] {
     "20",
     "30",
     "40",
     "50"});
     this.toolStripComboBoxPageSize.Name = "toolStripComboBoxPageSize";
     this.toolStripComboBoxPageSize.Size = new System.Drawing.Size(121, 27);
     this.toolStripComboBoxPageSize.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxPageSize_SelectedIndexChanged);
     //
     // toolStripLabel1
     //
     this.toolStripLabel1.Name = "toolStripLabel1";
     this.toolStripLabel1.Size = new System.Drawing.Size(41, 24);
     this.toolStripLabel1.Text = "张/页";
     //
     // toolStripSeparator2
     //
     this.toolStripSeparator2.Name = "toolStripSeparator2";
     this.toolStripSeparator2.Size = new System.Drawing.Size(6, 27);
     //
     // toolStripButtonPlayVideo
     //
     this.toolStripButtonPlayVideo.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonPlayVideo.Image")));
     this.toolStripButtonPlayVideo.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonPlayVideo.Name = "toolStripButtonPlayVideo";
     this.toolStripButtonPlayVideo.Size = new System.Drawing.Size(81, 24);
     this.toolStripButtonPlayVideo.Text = "相关视频";
     this.toolStripButtonPlayVideo.Click += new System.EventHandler(this.toolStripButtonPlayVideo_Click);
     //
     // toolStripSeparator1
     //
     this.toolStripSeparator1.Name = "toolStripSeparator1";
     this.toolStripSeparator1.Size = new System.Drawing.Size(6, 27);
     //
     // saveToolStripButton
     //
     this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image")));
     this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.saveToolStripButton.Name = "saveToolStripButton";
     this.saveToolStripButton.Size = new System.Drawing.Size(97, 24);
     this.saveToolStripButton.Text = "保存图片(&S)";
     this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripButton_Click);
     //
     // PicQueryForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(840, 542);
     this.Controls.Add(this.splitContainer1);
     this.Controls.Add(this.groupBox3);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name = "PicQueryForm";
     this.ShowInTaskbar = false;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text = "搜索图片";
     this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
     this.Load += new System.EventHandler(this.PicQueryForm_Load);
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PicQueryForm_FormClosing);
     ((System.ComponentModel.ISupportInitialize)(this.timeEdit1.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.timeEdit2.Properties)).EndInit();
     this.groupBox3.ResumeLayout(false);
     this.groupBox3.PerformLayout();
     this.groupBox4.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
     this.layoutControl1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.pictureBoxFace)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.Panel2.PerformLayout();
     this.splitContainer1.ResumeLayout(false);
     this.splitContainer2.Panel1.ResumeLayout(false);
     this.splitContainer2.Panel2.ResumeLayout(false);
     this.splitContainer2.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.axVLCPlugin21)).EndInit();
     this.groupBox1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWholeImg)).EndInit();
     this.toolStrip1.ResumeLayout(false);
     this.toolStrip1.PerformLayout();
     this.ResumeLayout(false);
 }
Ejemplo n.º 11
0
        async static public Task <Point> calculateCursorVideoPosition(UISettings uiSettings, AxAXVLC.AxVLCPlugin2 axVLCPlugin, Point mousePosition)
        {
            Point relativeMousePosition = await calculateRelativeMouse(uiSettings, axVLCPlugin, mousePosition);

            Point bestFitVideoSize = await calculateBestFitVideoSize(uiSettings, axVLCPlugin, mousePosition);

            double scale = (double)uiSettings.exportSettings.videoData.PrimaryVideoStream.Width / (double)bestFitVideoSize.X;

            Point absoluteMousePosition = new Point((int)Math.Floor((double)relativeMousePosition.X * scale), /*uiSettings.exportSettings.videoData.PrimaryVideoStream.Height -*/ (int)Math.Floor((double)relativeMousePosition.Y * scale));

            //Do quick doublecheck to make sure we are within bounds of the original video.
            if (absoluteMousePosition.X < 0 || absoluteMousePosition.X > (int)uiSettings.exportSettings.videoData.PrimaryVideoStream.Width ||
                absoluteMousePosition.Y < 0 || absoluteMousePosition.Y > (int)uiSettings.exportSettings.videoData.PrimaryVideoStream.Height)
            {
                return(new Point(-1, -1));
            }

            return(absoluteMousePosition);
        }
Ejemplo n.º 12
0
        //Calculates the approximated BestFitVideoSize that VLC will default to when placing the imported video onto the VLC frame. Necessary because will be different for videos with different aspec ratios than 16x9.
        async public static Task <Point> calculateBestFitVideoSize(UISettings uiSettings, AxAXVLC.AxVLCPlugin2 axVLCPlugin, Point mousePosition)
        {
            Point frameAspectRatio = new Point((int)(axVLCPlugin.Width / greatestCommonDivisor(axVLCPlugin.Size.Width, axVLCPlugin.Size.Height)), (int)(axVLCPlugin.Height / (greatestCommonDivisor(axVLCPlugin.Size.Width, axVLCPlugin.Size.Height))));
            Point videoAspectRatio = new Point((int)((int)uiSettings.exportSettings.videoData.PrimaryVideoStream.Width / greatestCommonDivisor((int)uiSettings.exportSettings.videoData.PrimaryVideoStream.Width, (int)uiSettings.exportSettings.videoData.PrimaryVideoStream.Height)), (int)(uiSettings.exportSettings.videoData.PrimaryVideoStream.Height / (greatestCommonDivisor((int)uiSettings.exportSettings.videoData.PrimaryVideoStream.Width, (int)uiSettings.exportSettings.videoData.PrimaryVideoStream.Height))));

            if (((double)frameAspectRatio.X / (double)frameAspectRatio.Y) == ((double)videoAspectRatio.X / (double)videoAspectRatio.Y)) //Perfect aspect ratio that fits frame.

            {
                return(new Point(axVLCPlugin.Size.Width, axVLCPlugin.Size.Height));
            }
            else if (((double)frameAspectRatio.X / (double)frameAspectRatio.Y) > ((double)videoAspectRatio.X / (double)videoAspectRatio.Y)) //Vertical video. Taller than frame
            {
                //640x360frame 1000x1000video

                //360 = 1000 * z
                //             360x360
                return(new Point((int)Math.Floor((((double)axVLCPlugin.Size.Height * (double)videoAspectRatio.X) / (double)videoAspectRatio.Y)), axVLCPlugin.Size.Height));
            }
            else if (((double)frameAspectRatio.X / (double)frameAspectRatio.Y) < ((double)videoAspectRatio.X / (double)videoAspectRatio.Y)) //Horizontal video. Longer than frame
            {
                return(new Point(axVLCPlugin.Size.Width, (int)Math.Floor((((double)axVLCPlugin.Size.Width * (double)videoAspectRatio.Y) / (double)videoAspectRatio.X))));
            }
            else
            {
                return(new Point(-1, -1));
            }
        }
Ejemplo n.º 13
0
        async public static Task <Point> calculateRelativeMouse(UISettings uiSettings, AxAXVLC.AxVLCPlugin2 axVLCPlugin, Point mousePosition)
        {
            //use vlc media player position and aspect ratio.
            if (uiSettings.exportSettings.videoData == null)
            {
                return(new Point(-1, -1));
            }
            Size  size     = axVLCPlugin.Size;
            Point location = axVLCPlugin.Location;

            //get greatest common divisor and get both to their lowest aspect ratios


            /* Test cases:
             * If frameAspectRatio solved out is > videoAspectRatio solved out, then
             * 16x9 1x1 fits to the Y 1.78 - 1
             * 16x9 16x10 fits to the Y 1.78 - 1.6
             * 16x9 16x8 fits to the X 1.78 - 2
             * 16x9 16x9 fit to both. 1.78 - 1.78
             * 1X1 16.9 fit to the X 1 - 1.78
             */
            Point bestFitVideoSize = await calculateBestFitVideoSize(uiSettings, axVLCPlugin, mousePosition);

            //Generates the size of the black bars that would be displayed on the VLC. Lets us know where the video position actually starts.
            int horizontalBlackBars = (int)Math.Floor(((double)axVLCPlugin.Size.Width - (double)bestFitVideoSize.X) / 2);

            if (horizontalBlackBars < 0)
            {
                horizontalBlackBars = 0;
            }
            int verticalBlackBars = (int)Math.Floor(((double)axVLCPlugin.Size.Height - (double)bestFitVideoSize.Y) / 2);

            if (verticalBlackBars < 0)
            {
                verticalBlackBars = 0;
            }

            Point videoPosition = new Point(axVLCPlugin.Location.X + horizontalBlackBars, axVLCPlugin.Location.Y + verticalBlackBars);

            //Now use all of this info to generate the mousePosition on the REAL video.
            //Mouse not in bounds of the UI video.
            if (mousePosition.X < (axVLCPlugin.Location.X + horizontalBlackBars) || mousePosition.X > (axVLCPlugin.Location.X + bestFitVideoSize.X + horizontalBlackBars))
            {
                return(new Point(-1, -1));
            }
            if (mousePosition.Y < (axVLCPlugin.Location.Y + verticalBlackBars) || mousePosition.Y > (axVLCPlugin.Location.Y + bestFitVideoSize.Y + verticalBlackBars))
            {
                return(new Point(-1, -1));
            }
            //This relativeMousePosition is the mouse positioning by pixel on the video frame.
            return(new Point(mousePosition.X - videoPosition.X, mousePosition.Y - videoPosition.Y));
        }