[vlc-devel] [PATCH 06/10] chromecast: send the volume and mute values when about to start playback
Steve Lhomme
robux4 at videolabs.io
Mon May 9 13:18:58 CEST 2016
---
modules/stream_out/chromecast/chromecast_ctrl.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 4bf1e41..ee1ab38 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -582,6 +582,11 @@ void intf_sys_t::processMessage(const castchannel::CastMessage &msg)
msg_Dbg( p_module, "Playback pending with an offset of %" PRId64, m_chromecast_start_time);
}
m_time_playback_started = VLC_TS_INVALID;
+ if (!mediaSessionId.empty())
+ {
+ msgPlayerSetMute( var_InheritBool( p_module, "mute" ) );
+ msgPlayerSetVolume( var_InheritFloat( p_module, "volume" ) );
+ }
break;
case RECEIVER_PLAYING:
@@ -598,6 +603,12 @@ void intf_sys_t::processMessage(const castchannel::CastMessage &msg)
break;
case RECEIVER_PAUSED:
+ if (!mediaSessionId.empty())
+ {
+ msgPlayerSetMute( var_InheritBool( p_module, "mute" ) );
+ msgPlayerSetVolume( var_InheritFloat( p_module, "volume" ) );
+ }
+
m_chromecast_start_time = (1 + mtime_t( double( status[0]["currentTime"] ) ) ) * 1000000L;
#ifndef NDEBUG
msg_Dbg( p_module, "Playback paused with an offset of %" PRId64 " date_play_start:%" PRId64, m_chromecast_start_time, m_time_playback_started);
--
2.7.0
More information about the vlc-devel
mailing list