Example #1
0
        public void Cleanup()
        {
            _probe = null;

            _vp?.Dispose();
            _vp = null;
        }
Example #2
0
        public void Cleanup()
        {
            _vp?.Dispose();
            _vp = null;

            _mediaInfo?.Dispose();
            _mediaInfo = null;

            _context = null;
        }
Example #3
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context);

            context.ViewerContent = _vp;

            context.Title = $"{Path.GetFileName(path)}";

            _vp.LoadAndPlay(path, _mediaInfo);
        }
Example #4
0
        public void Cleanup()
        {
            _vp?.Dispose();
            _vp = null;

            _det?.Dispose();
            _det = null;

            _context = null;
        }
Example #5
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context, probe.HasVideo());

            context.ViewerContent = _vp;

            _vp.mediaElement.MediaOpened += MediaElement_MediaOpened;
            _vp.LoadAndPlay(path);

            context.Title = $"{Path.GetFileName(path)}";
        }
Example #6
0
        public void Cleanup()
        {
            if (_vp != null)
            {
                _vp.mediaElement.VlcMediaPlayer.Opening -= MarkReady;
            }
            _vp?.Dispose();
            _vp = null;

            _context = null;
        }
Example #7
0
        public void Cleanup()
        {
            if (_vp?.mediaElement != null)
            {
                _vp.mediaElement.MediaOpened -= MediaElement_MediaOpened;
            }

            _vp?.Dispose();
            _vp = null;

            _context = null;
        }
Example #8
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context);

            context.ViewerContent = _vp;

            _vp.mediaElement.VlcMediaPlayer.Opening += MarkReady;

            _vp.LoadAndPlay(path);

            context.Title = $"{Path.GetFileName(path)}";
        }
Example #9
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context);

            context.ViewerContent = _vp;

            _vp.LoadAndPlay(path);

            context.Title =
                $"{Path.GetFileName(path)} ({_vp.mediaElement.NaturalVideoWidth}×{_vp.mediaElement.NaturalVideoHeight})";
            context.IsBusy = false;
        }
Example #10
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context);

            context.ViewerContent = _vp;

            _vp.mediaElement.VlcMediaPlayer.Opening += (sender, e) => context.IsBusy = false;

            _vp.LoadAndPlay(path);

            var info = _mediaSize == Size.Empty ? "Audio" : $"{_mediaSize.Width}×{_mediaSize.Height}";

            context.Title =
                $"{Path.GetFileName(path)} ({info})";
        }