[vlc-commits] sout: chromecast: request status on timeout
Francois Cartegnie
git at videolan.org
Thu Oct 2 17:37:46 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 2 15:33:41 2014 +0200| [2d319620b1d244454a6445d57e9f0420909e5815] | committer: Francois Cartegnie
sout: chromecast: request status on timeout
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d319620b1d244454a6445d57e9f0420909e5815
---
modules/stream_out/chromecast/cast.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 6407997..069bd31 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -121,6 +121,7 @@ static void msgConnect(sout_stream_t *p_stream, std::string destinationId);
static void msgClose(sout_stream_t *p_stream, std::string destinationId);
static void msgLaunch(sout_stream_t *p_stream);
static void msgLoad(sout_stream_t *p_stream);
+static void msgStatus(sout_stream_t *p_stream);
static void *chromecastThread(void *data);
@@ -778,6 +779,18 @@ static void msgClose(sout_stream_t *p_stream, std::string destinationId)
p_sys->messagesToSend.push(msg);
}
+static void msgStatus(sout_stream_t *p_stream)
+{
+ sout_stream_sys_t *p_sys = p_stream->p_sys;
+
+ std::stringstream ss;
+ ss << "{\"type\":\"GET_STATUS\"}";
+
+ castchannel::CastMessage msg = buildMessage("urn:x-cast:com.google.cast.receiver",
+ castchannel::CastMessage_PayloadType_STRING, ss.str());
+
+ p_sys->messagesToSend.push(msg);
+}
static void msgLaunch(sout_stream_t *p_stream)
{
@@ -859,7 +872,10 @@ static void* chromecastThread(void* p_data)
}
if (b_pingTimeout)
+ {
msgPing(p_stream);
+ msgStatus(p_stream);
+ }
if (b_msgReceived)
{
More information about the vlc-commits
mailing list