Ejemplo n.º 1
0
        public VideoPlayer(IWindow parent, string text, int port, int x, int y, int width, int height) : base(parent, x, Application.Screen.Height - y - height, width, height)
        {
            var label = new TextArea(this, 0, height / 2 - 20, width, 40)
            {
                Text = text
            };

            label.SetFont(Palette.White, 35);
            label.SetAlign(Align.Center, new GfxPoint(0, 5));


            mPath = new VGPath(null, new VGSolidColor(new Color(0x2c2d2eff)));
            //VGU.vguRect(mPath.GetPath(), 0, 0, width, height);
            VGU.vguRoundRect(mPath.GetPath(), 0, 0, width - 12, height - 12, 10, 10);
            mPath.Move(6, 7);

            mArgs = string.Format("tcpclientsrc host=127.0.0.1 port={0} ! multipartdemux boundary=\"boundary\" ! vpudec ! mfw_isink axis-left={1} axis-top={2} disp-width={3} disp-height={4}",
                                  port,
                                  x, y,
                                  width, height);

            Environment.SetEnvironmentVariable("VSALPHA", "1");

            mThread = new Thread(Processing);
            mThread.Start();
        }
Ejemplo n.º 2
0
        protected ModalWindow() : base(null, Application.Screen.Width, Application.Screen.Height)
        {
            Hide();

            if (mPath == null)
            {
                mPath = new VGPath(null, new VGSolidColor(new Color {
                    R = 0.0f, G = 0.0f, B = 0.0f, A = 0.8f
                }));
                VGU.vguRect(mPath.GetPath(), 0, 0, Width, Height);
            }

            mCounter++;
        }