Exemple #1
0
 public VlcPlayer(AxVLCPlugin2 axVLCPlugin21)
 {
     this.axVLCPlugin2 = axVLCPlugin21;
     this.Width        = axVLCPlugin21.Width;
     this.Height       = axVLCPlugin21.Height;
     this.rtspPlayer   = new VlcPlayer.playVideoCallBackHandler(this.playVideo);
 }
Exemple #2
0
 public VlcPlayer(AxVLCPlugin2 axVLCPlugin21, int width, int height)
 {
     this.axVLCPlugin2 = axVLCPlugin21;
     this.Width        = width;
     this.Height       = height;
     this.rtspPlayer   = new VlcPlayer.playVideoCallBackHandler(this.startPlay);
 }
Exemple #3
0
        public VideoWindow(GestureDirection direction, GestureType type)
        {
            InitializeComponent();
            this.Title = type + " " + direction;

            vlc            = new AxVLCPlugin2();
            formHost.Child = vlc;
            vlc.CreateControl();


            var videoPath = CreateUriTo(type, direction);

            MoveScreen(true);
            GestureParser.Pause(true);
            vlc.playlist.add(videoPath);
            vlc.playlist.play();

            EventHandler handler = null;

            handler = (sender, e) => {
                vlc.MediaPlayerEndReached -= handler;
                GestureParser.Pause(false);
                MoveScreen(false);
                canvasWindow.Activate();
                vlc.playlist.play();
                vlc.MediaPlayerEndReached += (senderI, eI) => {
                    vlc.playlist.play();
                };
            };

            vlc.MediaPlayerEndReached += handler;
        }
Exemple #4
0
        public MainWindow()
        {
            InitializeComponent();

            this.KeyDown += new KeyEventHandler(KeyEventHandler);
            this.KeyUp   += new KeyEventHandler(KeyEventHandler);

            // VLC player
            vlc = new AxVLCPlugin2();
            vlc.CreateControl();
            vlc.AutoPlay = false;

            FormsHost.Child = vlc;

            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;

                getVideoFromPhone();
            }).Start();

            // povezava do telefona
            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;

                connectToPhoneForBT();
            }).Start();
        }
Exemple #5
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext       = this;
     vlc               = new AxVLCPlugin2();
     WinFormHost.Child = vlc;
 }
Exemple #6
0
 public vlcwpf()
 {
     InitializeComponent();
     this.Topmost         = true;
     vlc                  = new AxVLCPlugin2();
     winformhostvlc.Child = vlc;
     conditionss          = false;
 }
Exemple #7
0
 public user()
 {
     InitializeComponent();
     vlc  = new AxVLCPlugin();
     vlc2 = new AxVLCPlugin2();
     windowsFormHostMain.Child = vlc;
     windowsFormHost2.Child    = vlc2;
 }
Exemple #8
0
        public void FSOut(AxVLCPlugin2 vlc)
        {
            this.vlc = vlc;

            vlcPlayer.Child = vlc;
            vlc.CreateControl();

            vlc.Toolbar = false;
        }
Exemple #9
0
        public FSPCTV(AxVLCPlugin2 vlc, AppPCTV app)
        {
            InitializeComponent();

            this.vlc = vlc;
            this.app = app;

            vlcPlayer.Child = this.vlc;
            this.vlc.CreateControl();
        }
        public MainWindow()
        {
            InitializeComponent();
            _vlcPlugin    = new AxVLCPlugin2();
            VlcHost.Child = _vlcPlugin;
            _vlcPlugin.MediaPlayerPositionChanged += _vlcPlugin_MediaPlayerPositionChanged;
            _vlcPlugin.MediaPlayerTimeChanged     += _vlcPlugin_MediaPlayerTimeChanged;
            Position.AddHandler(MouseLeftButtonUpEvent, new MouseButtonEventHandler(Position_MouseLeftButtonUp), true);

            Loaded += MainWindow_Loaded;
        }
        public VideoComponent(LiveSplitState state, AxVLCPlugin2 vlc)
            : base(state, vlc, ex => ErrorCallback(state.Form, ex))
        {
            Settings = new VideoSettings();
            State    = state;
            VLC      = vlc;

            state.OnReset  += state_OnReset;
            state.OnStart  += state_OnStart;
            state.OnPause  += state_OnPause;
            state.OnResume += state_OnResume;
        }
        private static AxVLCPlugin2 CreateVLCControl()
        {
            var vlc = new AxVLCPlugin2();

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ComponentHostForm));
            ((System.ComponentModel.ISupportInitialize)(vlc)).BeginInit();
            vlc.Enabled  = true;
            vlc.Name     = "vlc";
            vlc.OcxState = ((AxHost.State)(resources.GetObject("axVLCPlugin21.OcxState")));
            ((System.ComponentModel.ISupportInitialize)(vlc)).EndInit();

            return(vlc);
        }
Exemple #13
0
        public VideoComponent(LiveSplitState state, AxVLCPlugin2 vlc)
            : base(state, vlc, ex => ErrorCallback(state.Form, ex))
        {
            Settings = new VideoSettings();
            Settings.txtVideoPath.TextChanged += txtMRL_TextChanged;
            State = state;
            VLC   = vlc;
            //Control.Visible = false;

            state.OnReset  += state_OnReset;
            state.OnStart  += state_OnStart;
            state.OnPause  += state_OnPause;
            state.OnResume += state_OnResume;
        }
Exemple #14
0
        public AppPCTV()
        {
            InitializeComponent();

            ChargeChannels();

            // Create Player
            vlc = new AxVLCPlugin2();

            vlcPlayer.Child = vlc;
            vlc.CreateControl();

            vlc.Toolbar = false;

            IsPlaying = false;
        }
        internal void ValidateMovies(IEnumerable <string> moviePaths, HashSet <string> badMovies)
        {
            UpdateStatusText(@"Validating Movies");
            var player = new AxVLCPlugin2
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Enabled  = true,
                Location = new Point(305, 42),
                Name     = "TestVideoPlayer",
                Size     = new Size(589, 359),
                TabIndex = 3
            };

            player.CreateControl();
            player.audio.mute = true;
            player.Visible    = false;
            foreach (var path in moviePaths)
            {
                try
                {
                    var playlist = player.playlist;
                    if (playlist.isPlaying)
                    {
                        playlist.stop();
                    }
                    playlist.clear();
                    playlist.add(new Uri(ExternalGameDataPath + path).AbsoluteUri);
                    //playlist.play(); //HIGH: Is this required for validation? If so, should immediately stop playback after starting
                }
                catch (ArgumentException e)
                {
                    Debug.WriteLine(e.GetType());
                    badMovies.Add(ExternalGameDataPath + path);
                }
                catch (Exception e) //HIGH: Find out what exception invalid video files throw and filter
                {
                    Debug.WriteLine(e.GetType());
                    badMovies.Add(ExternalGameDataPath + path);
                }
                finally
                {
                    FileValidated();
                }
            }
            player.Dispose();
        }
Exemple #16
0
 public override void Load()
 {
     Control = new AxVLCPlugin2();
     if (Control == null)
     {
         throw new FailedToInitializeException("Failed to retrieve control.");
     }
     if (!Control.Created)
     {
         VideoControl.CreateControl();
     }
     VideoControl.playlist.add(Content.Path);
     VideoControl.MediaPlayerStopped += (sender, args) =>
     {
         VideoControl.Visible = false;
         //TODO: Unload??
     };
 }
Exemple #17
0
        public MainWindow()
        {
            vlc = new AxVLCPlugin2();
            InitializeComponent();
            WinFormsHost.Child = vlc;
            login_thread       = new BackgroundWorker();
            login_thread.RunWorkerCompleted += login_thread_RunWorkerCompleted;
            login_thread.DoWork             += login_thread_DoWork;

            loadchannel_thread = new BackgroundWorker();
            loadchannel_thread.RunWorkerCompleted += loadchannel_RunWorkerCompleted;
            loadchannel_thread.DoWork             += loadchannel_DoWork;

            loadfav_thread = new BackgroundWorker();
            loadfav_thread.RunWorkerCompleted += loadfav_RunWorkerCompleted;
            loadfav_thread.DoWork             += loadfav_DoWork;

            updatelist_thread = new BackgroundWorker();
            updatelist_thread.RunWorkerCompleted += updatelist_thread_RunWorkerCompleted;
            updatelist_thread.DoWork             += updatelist_thread_DoWork;

            login_thread.RunWorkerAsync();
        }
Exemple #18
0
 public AxVLCPlugin2EventMulticaster(AxVLCPlugin2 parent)
 {
     this.parent = parent;
 }
Exemple #19
0
 private void VLCForm_Load(object sender, EventArgs e)
 {
     axVLCPlugin21      = new AxVLCPlugin2();
     axVLCPlugin21.Dock = DockStyle.Fill;
     this.Controls.Add(axVLCPlugin21);
 }