private void btUpdateRect_Click(object sender, EventArgs e)
        {
            int index = lbSourceFiles.SelectedIndex;

            if (index >= 0)
            {
                int left   = Convert.ToInt32(edPIPFileLeft.Text);
                int top    = Convert.ToInt32(edPIPFileTop.Text);
                int width  = Convert.ToInt32(edPIPFileWidth.Text);
                int height = Convert.ToInt32(edPIPFileHeight.Text);
                _pipInfos[index].Rect = new Rectangle(left, top, width, height);

                _pipInfos[index].ZOrder = Convert.ToInt32(edZOrder.Text);
                _pipInfos[index].Alpha  = tbStreamTransparency.Value / 100.0f;

                if (left == 0 && top == 0 && width == 0 && height == 0)
                {
                    lbSourceFiles.Items[index] = $@"{_pipInfos[index].Filename} (entire screen)";
                }
                else
                {
                    lbSourceFiles.Items[index] = $@"{_pipInfos[index].Filename} ({left}.{top}px, width: {width}px, height: {height}px)";
                }

                MediaPlayer1.PIP_Sources_SetSourcePosition(index, _pipInfos[index].Rect, tbStreamTransparency.Value / 100.0f);
                MediaPlayer1.PIP_Sources_SetSourceOrder(index, _pipInfos[index].ZOrder);
            }
        }
Exemple #2
0
        private void btStart_Click(object sender, EventArgs e)
        {
            MediaPlayer1.Debug_Mode = cbDebugMode.Checked;

            mmLog.Clear();

            MediaPlayer1.Video_Renderer.Zoom_Ratio  = 0;
            MediaPlayer1.Video_Renderer.Zoom_ShiftX = 0;
            MediaPlayer1.Video_Renderer.Zoom_ShiftY = 0;

            MediaPlayer1.Video_Renderer.Video_Renderer = VFVideoRenderer.VMR9;
            MediaPlayer1.Source_Mode = VFMediaPlayerSource.LAV;

            MediaPlayer1.Play();

            MediaPlayer1.PIP_Sources_SetSourcePosition(0, _pipInfos[0].Rect, 1.0f);

            lbSourceFiles.SelectedIndex = 0;

            timer1.Start();
        }