From 1b942dd8aab5eed24ef5196a8dffdb645f2ff227 Mon Sep 17 00:00:00 2001 From: zwer Date: Sun, 18 Feb 2007 21:57:59 +0000 Subject: =?UTF-8?q?-=20vor-=20und=20zur=C3=BCckspulen=20mit=20versch.=20Ge?= =?UTF-8?q?schwindigkeiten,=20Pause=20-=20DVD-Wedergabe=20macht=20Probleme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.berlios.de/ffnetdev/trunk@29 1f4bef6d-8e0a-0410-8695-e467da8aaccf --- streamdevice.c | 55 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 24 deletions(-) (limited to 'streamdevice.c') diff --git a/streamdevice.c b/streamdevice.c index d15b66a..17b33f2 100644 --- a/streamdevice.c +++ b/streamdevice.c @@ -75,16 +75,18 @@ bool cStreamDevice::SetPlayMode(ePlayMode PlayMode) cControl *pControl = cControl::Control(); if (pControl) { - bool Forward; - int Speed; - pControl->GetReplayMode(m_Playing, Forward, Speed); - if (!cClientControl::SendPlayState(PlayMode, m_Playing, Forward, Speed)) + pControl->GetReplayMode(m_Playing, m_Forward, m_Speed); + if (m_Speed == -1) + m_Speed = 0; + if (!cClientControl::SendPlayState(PlayMode, m_Playing, m_Forward, m_Speed)) m_PlayState = psPlay; } else { m_Playing = false; - if (!cClientControl::SendPlayState(PlayMode, false, false, 0)) + m_Forward = true; + m_Speed = 0; + if (!cClientControl::SendPlayState(PlayMode, m_Playing, m_Forward, m_Speed)) m_PlayState = psPlay; } return true; @@ -93,15 +95,14 @@ bool cStreamDevice::SetPlayMode(ePlayMode PlayMode) void cStreamDevice::TrickSpeed(int Speed) { dsyslog("[ffnetdev] Device: Trickspeed. Speed: %d\n", Speed); + cControl *pControl = cControl::Control(); if (pControl) - { - bool Forward; - int Speed; - pControl->GetReplayMode(m_Playing, Forward, Speed); - if (!cClientControl::SendPlayState(m_PlayMode, m_Playing, Forward, Speed)) - m_PlayState = psPlay; - } + pControl->GetReplayMode(m_Playing, m_Forward, m_Speed); + + m_Speed = Speed; + if (!cClientControl::SendPlayState(m_PlayMode, m_Playing, m_Forward, m_Speed)) + m_PlayState = psPlay; } void cStreamDevice::Clear(void) @@ -113,28 +114,34 @@ void cStreamDevice::Play(void) { dsyslog("[ffnetdev] Device: Play.\n"); - cControl *pControl = cControl::Control(); - if (pControl) - { - bool Forward; - int Speed; - pControl->GetReplayMode(m_Playing, Forward, Speed); - if (!cClientControl::SendPlayState(m_PlayMode, m_Playing, Forward, Speed)) - m_PlayState = psPlay; - } - + m_PlayMode = pmAudioVideo; + m_Playing = true; + m_Forward = true; + m_Speed = 0; + if (!cClientControl::SendPlayState(m_PlayMode, m_Playing, m_Forward, m_Speed)) + m_PlayState = psPlay; + // cDevice::Play(); } void cStreamDevice::Freeze(void) { - dsyslog("[ffnetdev] Device: Freeze(not implemented).\n"); + dsyslog("[ffnetdev] Device: Freeze.\n"); + + m_Playing = false; + cClientControl::SendSFreeze(); + // cDevice::Freeze(); } void cStreamDevice::Mute(void) { - dsyslog("[ffnetdev] Device: Mute(not implemented).\n"); + dsyslog("[ffnetdev] Device: Mute.\n"); + + m_PlayMode = pmVideoOnly; + if (!cClientControl::SendPlayState(m_PlayMode, m_Playing, m_Forward, m_Speed)) + m_PlayState = psPlay; + // cDevice::Mute(); } -- cgit v1.2.3