[vlc-commits] chromecast: add isStateError() method

Thomas Guillem git at videolan.org
Fri Feb 23 08:29:32 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 20 17:06:41 2018 +0100| [fea344d5936a325cde5db91629492a25a286073a] | committer: Thomas Guillem

chromecast: add isStateError() method

(cherry picked from commit baa9eaaf55d087843e434f3fa7f306a8e70d0f05)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/stream_out/chromecast/chromecast.h        |  1 +
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/modules/stream_out/chromecast/chromecast.h b/modules/stream_out/chromecast/chromecast.h
index 423154cbf8..5ed77cdff5 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -193,6 +193,7 @@ private:
     void queueMessage( QueueableMessages msg );
 
     void setPauseState(bool paused);
+    bool isStateError() const;
     bool isStatePlaying() const;
     bool isStateReady() const;
     void tryLoad();
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index e98b171300..d9ebb771a1 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -353,6 +353,19 @@ void intf_sys_t::setHasInput( const std::string mime_type )
     vlc_cond_signal( &m_stateChangedCond );
 }
 
+bool intf_sys_t::isStateError() const
+{
+    switch( m_state )
+    {
+        case LoadFailed:
+        case Dead:
+        case TakenOver:
+            return true;
+        default:
+            return false;
+    }
+}
+
 bool intf_sys_t::isStatePlaying() const
 {
     switch( m_state )



More information about the vlc-commits mailing list