diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-09-14 14:06:43 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-09-14 14:06:43 +0200 |
commit | 55135294197254a1b95e9552f3d465ef18fc7de4 (patch) | |
tree | f5169b4780c966a0194f623db08c3a08e0900f89 /dvbapi.c | |
parent | b47ce65b0354c0626b4a9650d96f83122f798b55 (diff) | |
download | vdr-55135294197254a1b95e9552f3d465ef18fc7de4.tar.gz vdr-55135294197254a1b95e9552f3d465ef18fc7de4.tar.bz2 |
Implemented replay mode display
Diffstat (limited to 'dvbapi.c')
-rw-r--r-- | dvbapi.c | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -7,7 +7,7 @@ * DVD support initially written by Andreas Schultz <aschultz@warp10.net> * based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si> * - * $Id: dvbapi.c 1.114 2001/09/09 13:34:41 kls Exp $ + * $Id: dvbapi.c 1.115 2001/09/14 13:23:21 kls Exp $ */ //#define DVDDEBUG 1 @@ -720,6 +720,7 @@ public: virtual void SkipSeconds(int Seconds) {} virtual void Goto(int Position, bool Still = false) {} virtual void GetIndex(int &Current, int &Total, bool SnapToIFrame = false) { Current = Total = -1; } + bool GetReplayMode(bool &Play, bool &Forward, int &Speed); bool CanToggleAudioTrack(void) { return canToggleAudioTrack; }; virtual void ToggleAudioTrack(void); }; @@ -944,6 +945,17 @@ void cPlayBuffer::Backward(void) } } +bool cPlayBuffer::GetReplayMode(bool &Play, bool &Forward, int &Speed) +{ + Play = (playMode == pmPlay || playMode == pmFast); + Forward = (playDir == pdForward); + if (playMode == pmFast || playMode == pmSlow) + Speed = Setup.MultiSpeedMode ? abs(trickSpeed - NORMAL_SPEED) : 0; + else + Speed = -1; + return true; +} + void cPlayBuffer::ToggleAudioTrack(void) { if (CanToggleAudioTrack()) { @@ -2912,7 +2924,7 @@ void cDvbApi::Open(int w, int h) cols = w; rows = h; #ifdef DEBUG_OSD - window = subwin(stdscr, h, w, d, 0); + window = subwin(stdscr, h, w, d, (Setup.OSDwidth - w) / 2); syncok(window, true); #define B2C(b) (((b) * 1000) / 255) #define SETCOLOR(n, r, g, b, o) init_color(n, B2C(r), B2C(g), B2C(b)) @@ -2930,7 +2942,7 @@ void cDvbApi::Open(int w, int h) w *= charWidth; h *= lineHeight; d *= lineHeight; - int x = (720 - (Setup.OSDwidth - 1) * charWidth) / 2; //TODO PAL vs. NTSC??? + int x = (720 - w + charWidth) / 2; //TODO PAL vs. NTSC??? int y = (576 - Setup.OSDheight * lineHeight) / 2 + d; //XXX osd = new cDvbOsd(fd_osd, x, y); @@ -3557,6 +3569,11 @@ bool cDvbApi::GetIndex(int &Current, int &Total, bool SnapToIFrame) return false; } +bool cDvbApi::GetReplayMode(bool &Play, bool &Forward, int &Speed) +{ + return replayBuffer && replayBuffer->GetReplayMode(Play, Forward, Speed); +} + void cDvbApi::Goto(int Position, bool Still) { if (replayBuffer) |