Beispiel #1
0
        /*
         * private void FilDevInfo()
         * {
         *  //string devInfo = "";
         *  //devInfo = vlc.Media.Metadatas.Title + Environment.NewLine;
         *
         *
         *
         *
         *  //form.txtDev.Text = devInfo + strCommon;
         * }*/

        #region real time Device Info


        //UISync.Execute(() => trackBar1.Value = (int)(e.NewPosition * 100));


        /// <summary>
        /// Event handler for "VlcControl.PositionChanged" event.
        /// Updates the label containing the playback position.
        /// </summary>
        /// <param name="sender">Event sending. </param>
        /// <param name="e">Event arguments, containing the current position. </param>
        private void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
        {
            //form.ControlTextUpdate(lblVlcNotifications, "Pozitie(doar pentru video local) : " + (e.Data * 100).ToString("000") + " %");
            //form.ControlTextUpdate(lblVlcNotifications, "FPS: " + vlc.FPS);

            if (_mMedia == null || _mPlayer == null || !_mPlayer.IsPlaying)
            {
                return;
            }

            UiSync.Execute(() => TextUpdate(_form.lblVlcNotify,
                                            @"Timp de functionare: " + _mPlayer.Time / 60000 + @" minute si " +
                                            (_mPlayer.Time / 1000) % 60 + @" secunde " +
                                            @", DecodedVideo: " + _mMedia.Statistics.DecodedVideo +
                                            @", InputBitrate: " + _mMedia.Statistics.InputBitrate +
                                            @", DemuxBitrate: " + _mMedia.Statistics.DemuxBitrate +
                                            @", DisplayedPictures: " + _mMedia.Statistics.DisplayedPictures +
                                            @", LostPictures: " + _mMedia.Statistics.LostPictures
                                            , false, false, false));

            //form.Log("Poze = " + vlc.GetCurrentMedia().Statistics.DisplayedPictures);

            if (!_info.Cam.Data.IsVideoComplete &&
                _info.Cam.Data.ImgCount < _mMedia.Statistics.DisplayedPictures)
            {
                _info.Cam.Data.ImgCount        = _mMedia.Statistics.DisplayedPictures;
                _info.Cam.Data.IsVideoComplete = true;
                UiSync.Execute(() => SetBtnsVisibilityOnPlay(true));
            }
            //form.Log("Poze = " + media.Statistics.DisplayedPictures);
            UiSync.Execute(UpdateEventsLabel);
        }
Beispiel #2
0
 /* for some reason, it continues past the end and errors out here....   */
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     if (e.NewPosition <= 1)
     {
         UISync.Execute(() => trackBar1.Value = (int)(e.NewPosition * 1000));
     }
 }
Beispiel #3
0
 /// <summary>
 /// player position changed.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void _disk_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     if (_player != null)
     {
         UISync.Execute(() => trackBarMain.Value = (int)(e.NewPosition * 100));
     }
 }
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     if (OnPlayerEvent != null)
     {
         OnPlayerEvent(this, PlayerState.PlayerPositionChanged);
     }
 }
Beispiel #5
0
 // Player Events
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     this.BeginInvoke((Action) delegate()
     {
         Player_ProgressTrackBar.ProgressBarValue = (int)(e.NewPosition * 100);
         Player_ProgressTrackBar.TrackBarValue    = (int)(e.NewPosition * 100);
     });
 }
Beispiel #6
0
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     this.Dispatcher.BeginInvoke(new Action(delegate
     {
         if (!m_isDrag)
         {
         }
     }));
 }
Beispiel #7
0
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     this.Dispatcher.BeginInvoke(new Action(delegate
     {
         if (!m_isDrag)
         {
             slider1.Value = (double)e.NewPosition;
         }
     }));
 }
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     this.Dispatcher.BeginInvoke(new Action(delegate
     {
         if (!seekIsPending)
         {
             elapsedSlider.Value = (double)e.NewPosition;
         }
     }));
 }
Beispiel #9
0
 private void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     UISync.Execute(() => {
         int newPos = (int)(e.NewPosition * 100);
         if (newPos > trkPosition.Maximum)
         {
             return;
         }
         trkPosition.Value = newPos;
     });
 }
Beispiel #10
0
 private void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     _currentPosition = (int)(e.NewPosition * 100);
     if (_currentPosition > 100)
     {
         _currentPosition = 100;                         // vlc进度数据保护
     }
     if (_currentPosition == 100)
     {
         _videoPlayState = false; // 结束播放
     }
 }
Beispiel #11
0
        /*
         * private void FilDevInfo()
         * {
         *  //string devInfo = "";
         *  //devInfo = vlc.Media.Metadatas.Title + Environment.NewLine;
         *
         *
         *
         *
         *  //form.txtDev.Text = devInfo + strCommon;
         * }*/

        #region real time Device Info


        //UISync.Execute(() => trackBar1.Value = (int)(e.NewPosition * 100));


        /// <summary>
        /// Event handler for "VlcControl.PositionChanged" event.
        /// Updates the label containing the playback position.
        /// </summary>
        /// <param name="sender">Event sending. </param>
        /// <param name="e">Event arguments, containing the current position. </param>
        private void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
        {
            //form.ControlTextUpdate(lblVlcNotifications, "Pozitie(doar pentru video local) : " + (e.Data * 100).ToString("000") + " %");
            //form.ControlTextUpdate(lblVlcNotifications, "FPS: " + vlc.FPS);

            if (_mPlayer == null || !_mPlayer.IsPlaying)
            {
                return;
            }

            _form.BeginInvoke((Action)(() => StatsUpdate()));
        }
Beispiel #12
0
        private void EventsPlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
        {
            Size size = _player.GetVideoSize(0);

            if (!size.IsEmpty)
            {
                _player.Events.PlayerPositionChanged  -= EventsPlayerPositionChanged;
                _player.Events.PlayerEncounteredError -= EventsPlayerEncounteredError;
                UISync.Execute(() => SetVideoSize(size));
                UISync.Execute(StopPlayer);
            }
        }
Beispiel #13
0
 private void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     if (startToPlay)
     {
         try
         {
             //form.BeginInvoke((Action)(() => form.label1.Text = ("PendingFramesCount = " + gs.GetBase().InputMedia.PendingFramesCount.ToString())));
         }
         catch (Exception ex) { }
     }
     else
     {
         _mPlayer.Play();
         startToPlay = true;
         //form.BeginInvoke((Action)(() => form.label1.Text = ("Inainte de pendingFrames ... ")));
     }
 }
Beispiel #14
0
        void EventsPlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
        {
            var newpos = (int)(e.NewPosition * 100);

            if (newpos < 0)
            {
                newpos = 0;
            }
            if (newpos > 100)
            {
                newpos = 100;
            }
            UISync.Execute(() => vNav.Value = newpos);
            if (_needsSize)
            {
                Size sz = _mPlayer.GetVideoSize(0);
                if (sz.Width > 0)
                {
                    if (sz.Width < 320)
                    {
                        sz.Width = 320;
                    }
                    if (sz.Height < 240)
                    {
                        sz.Height = 240;
                    }

                    if (Width != sz.Width)
                    {
                        UISync.Execute(() => Width = sz.Width);
                    }
                    if (Height != sz.Height + tableLayoutPanel1.Height)
                    {
                        UISync.Execute(() => Height = sz.Height + tableLayoutPanel1.Height);
                    }
                    _needsSize = false;
                }
            }
        }
Beispiel #15
0
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     PlayerPosition = e.NewPosition;// (int)(e.NewPosition * 100);
 }
Beispiel #16
0
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
 }