[vlc-commits] chromecast: Remove write only member variable

Hugo Beauzée-Luyssen git at videolan.org
Mon Jul 17 17:30:19 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jul  5 15:25:11 2017 +0200| [fc29e0a487e8946e0f3cd716464a853b1a9ce42c] | committer: Hugo Beauzée-Luyssen

chromecast: Remove write only member variable

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc29e0a487e8946e0f3cd716464a853b1a9ce42c
---

 modules/stream_out/chromecast/chromecast.h        |  3 ---
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 14 +++-----------
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h b/modules/stream_out/chromecast/chromecast.h
index 7e488bf403..dcd705b9ca 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -221,9 +221,6 @@ private:
     mtime_t           m_ts_local_start;
     mtime_t           m_length;
 
-    /* playback time reported by the receiver, used to wait for seeking point */
-    mtime_t           m_chromecast_start_time;
-
     /* shared structure with the demux-filter */
     chromecast_common      m_common;
 
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 5fc7c73c7e..3b6603f146 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -86,7 +86,6 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int port, std::string device
  , m_time_playback_started( VLC_TS_INVALID )
  , m_ts_local_start( VLC_TS_INVALID )
  , m_length( VLC_TS_INVALID )
- , m_chromecast_start_time( VLC_TS_INVALID )
  , m_pingRetriesLeft( PING_WAIT_RETRIES )
 {
     vlc_mutex_init(&m_lock);
@@ -406,15 +405,11 @@ void intf_sys_t::processMediaMessage( const castchannel::CastMessage& msg )
 
             if (newPlayerState == "PLAYING")
             {
-                msg_Dbg( m_module, "Playback started with an offset of %" PRId64 " now:%" PRId64 " i_ts_local_start:%" PRId64,
-                         m_chromecast_start_time, m_time_playback_started, m_ts_local_start);
+                msg_Dbg( m_module, "Playback started now:%" PRId64 " i_ts_local_start:%" PRId64,
+                         m_time_playback_started, m_ts_local_start);
                 if ( m_state != Playing )
                 {
                     /* TODO reset demux PCR ? */
-                    if (unlikely(m_chromecast_start_time == VLC_TS_INVALID)) {
-                        msg_Warn( m_module, "start playing without buffering" );
-                        m_chromecast_start_time = (1 + mtime_t( double( status[0]["currentTime"] ) ) ) * 1000000L;
-                    }
                     m_time_playback_started = mdate();
                     setState( Playing );
                 }
@@ -423,8 +418,6 @@ void intf_sys_t::processMediaMessage( const castchannel::CastMessage& msg )
             {
                 if ( m_state != Buffering )
                 {
-                    m_chromecast_start_time = (1 + mtime_t( double( status[0]["currentTime"] ) ) ) * 1000000L;
-                    msg_Dbg( m_module, "Playback pending with an offset of %" PRId64, m_chromecast_start_time);
                     m_time_playback_started = VLC_TS_INVALID;
                     setState( Buffering );
                 }
@@ -433,9 +426,8 @@ void intf_sys_t::processMediaMessage( const castchannel::CastMessage& msg )
             {
                 if ( m_state != Paused )
                 {
-                    m_chromecast_start_time = (1 + mtime_t( double( status[0]["currentTime"] ) ) ) * 1000000L;
     #ifndef NDEBUG
-                    msg_Dbg( m_module, "Playback paused with an offset of %" PRId64 " date_play_start:%" PRId64, m_chromecast_start_time, m_time_playback_started);
+                    msg_Dbg( m_module, "Playback paused: date_play_start: %" PRId64, m_time_playback_started);
     #endif
 
                     if ( m_time_playback_started != VLC_TS_INVALID && m_state == Playing )



More information about the vlc-commits mailing list