From 1e72e33a9739544b64c1d52980ef5f8e43e7f8c1 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 14 Sep 2001 14:19:37 +0200 Subject: Fixed direct switching between fast/slow forward and back --- dvbapi.c | 68 +++++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/dvbapi.c b/dvbapi.c index bdb2d271..b8d46cf8 100644 --- a/dvbapi.c +++ b/dvbapi.c @@ -7,7 +7,7 @@ * DVD support initially written by Andreas Schultz * based on dvdplayer-0.5 by Matjaz Thaler * - * $Id: dvbapi.c 1.115 2001/09/14 13:23:21 kls Exp $ + * $Id: dvbapi.c 1.116 2001/09/14 14:19:37 kls Exp $ */ //#define DVDDEBUG 1 @@ -873,6 +873,16 @@ void cPlayBuffer::Forward(void) { if (canDoTrickMode) { switch (playMode) { + case pmFast: + if (Setup.MultiSpeedMode) { + TrickSpeed(playDir == pdForward ? 1 : -1); + break; + } + else if (playDir == pdForward) { + Play(); + break; + } + // run into pmPlay case pmPlay: Empty(true); CHECK(ioctl(audioDev, AUDIO_SET_AV_SYNC, false)); @@ -882,6 +892,16 @@ void cPlayBuffer::Forward(void) TrickSpeed(Setup.MultiSpeedMode ? 1 : MAX_SPEEDS); Empty(false); break; + case pmSlow: + if (Setup.MultiSpeedMode) { + TrickSpeed(playDir == pdForward ? -1 : 1); + break; + } + else if (playDir == pdForward) { + Pause(); + break; + } + // run into pmPause case pmStill: case pmPause: CHECK(ioctl(audioDev, AUDIO_SET_AV_SYNC, false)); @@ -890,26 +910,24 @@ void cPlayBuffer::Forward(void) trickSpeed = NORMAL_SPEED; TrickSpeed(Setup.MultiSpeedMode ? -1 : -MAX_SPEEDS); break; - case pmFast: - if (Setup.MultiSpeedMode) - TrickSpeed(playDir == pdForward ? 1 : -1); - else if (playDir == pdForward) - Play(); - break; - case pmSlow: - if (Setup.MultiSpeedMode) - TrickSpeed(playDir == pdForward ? -1 : 1); - else if (playDir == pdForward) - Pause(); - break; - } } + } } void cPlayBuffer::Backward(void) { if (canDoTrickMode) { switch (playMode) { + case pmFast: + if (Setup.MultiSpeedMode) { + TrickSpeed(playDir == pdBackward ? 1 : -1); + break; + } + else if (playDir == pdBackward) { + Play(); + break; + } + // run into pmPlay case pmPlay: Empty(true); CHECK(ioctl(audioDev, AUDIO_SET_AV_SYNC, false)); @@ -919,6 +937,16 @@ void cPlayBuffer::Backward(void) TrickSpeed(Setup.MultiSpeedMode ? 1 : MAX_SPEEDS); Empty(false); break; + case pmSlow: + if (Setup.MultiSpeedMode) { + TrickSpeed(playDir == pdBackward ? -1 : 1); + break; + } + else if (playDir == pdBackward) { + Pause(); + break; + } + // run into pmPause case pmStill: case pmPause: Empty(true); @@ -929,18 +957,6 @@ void cPlayBuffer::Backward(void) TrickSpeed(Setup.MultiSpeedMode ? -1 : -MAX_SPEEDS); Empty(false); break; - case pmFast: - if (Setup.MultiSpeedMode) - TrickSpeed(playDir == pdBackward ? 1 : -1); - else if (playDir == pdBackward) - Play(); - break; - case pmSlow: - if (Setup.MultiSpeedMode) - TrickSpeed(playDir == pdBackward ? -1 : 1); - else if (playDir == pdBackward) - Pause(); - break; } } } -- cgit v1.2.3