[vlc-commits] chromecast: remove unneeded getConnectionStatus()

Steve Lhomme git at videolan.org
Tue May 3 13:22:59 CEST 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Apr 28 14:20:54 2016 +0200| [ba6d024375b4806130a21e673c3cd3258db2eb23] | committer: Thomas Guillem

chromecast: remove unneeded getConnectionStatus()

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/stream_out/chromecast/chromecast.h        |    5 -----
 modules/stream_out/chromecast/chromecast_ctrl.cpp |    8 ++++----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h b/modules/stream_out/chromecast/chromecast.h
index a76cc56..82ce9fe 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -108,11 +108,6 @@ private:
 
     bool handleMessages();
 
-    connection_status getConnectionStatus() const
-    {
-        return conn_status;
-    }
-
     void setConnectionStatus(connection_status status)
     {
         if (conn_status != status)
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index de0e6d1..bb61410 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -123,7 +123,7 @@ intf_sys_t::~intf_sys_t()
 {
     setHasInput( false );
 
-    switch (getConnectionStatus())
+    switch ( conn_status )
     {
     case CHROMECAST_APP_STARTED:
         // Generate the close messages.
@@ -423,7 +423,7 @@ void intf_sys_t::processMessage(const castchannel::CastMessage &msg)
             if ( p_app )
             {
                 if (!appTransportId.empty()
-                        && getConnectionStatus() == CHROMECAST_AUTHENTICATED)
+                        && conn_status == CHROMECAST_AUTHENTICATED)
                 {
                     msgConnect(appTransportId);
                     setConnectionStatus(CHROMECAST_APP_STARTED);
@@ -435,7 +435,7 @@ void intf_sys_t::processMessage(const castchannel::CastMessage &msg)
             }
             else
             {
-                switch(getConnectionStatus())
+                switch( conn_status )
                 {
                 /* If the app is no longer present */
                 case CHROMECAST_APP_STARTED:
@@ -553,7 +553,7 @@ void intf_sys_t::processMessage(const castchannel::CastMessage &msg)
             msg_Err( p_module, "Media load failed");
             vlc_mutex_locker locker(&lock);
             /* close the app to restart it */
-            if (getConnectionStatus() == CHROMECAST_APP_STARTED)
+            if ( conn_status == CHROMECAST_APP_STARTED )
                 msgReceiverClose(appTransportId);
             else
                 msgReceiverGetStatus();



More information about the vlc-commits mailing list