summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-01-16 20:11:19 +0000
committerphintuka <phintuka>2010-01-16 20:11:19 +0000
commit30e286978b65869b0d7f293d9b93aabeec136116 (patch)
tree7e31027892f5c41fb694f31f7de3f20c04a69baa
parent9fcb9265af3350d440321d81a803f38716a9749a (diff)
downloadxineliboutput-30e286978b65869b0d7f293d9b93aabeec136116.tar.gz
xineliboutput-30e286978b65869b0d7f293d9b93aabeec136116.tar.bz2
Added Backwards flag to TrickSpeed() RPC
-rw-r--r--frontend.c7
-rw-r--r--frontend.h6
-rw-r--r--frontend_svr.c6
-rw-r--r--frontend_svr.h4
4 files changed, 13 insertions, 10 deletions
diff --git a/frontend.c b/frontend.c
index 9c8da413..fb361014 100644
--- a/frontend.c
+++ b/frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend.c,v 1.76 2009-09-05 21:27:25 rofafor Exp $
+ * $Id: frontend.c,v 1.77 2010-01-16 20:11:19 phintuka Exp $
*
*/
@@ -270,11 +270,12 @@ void cXinelibThread::SetVolume(int NewVolume)
Xine_Control(str);
}
-void cXinelibThread::TrickSpeed(int Speed)
+void cXinelibThread::TrickSpeed(int Speed, bool Backwards)
{
TRACEF("cXinelibThread::TrickSpeed");
- Xine_Control("TRICKSPEED", Speed);
+ cString str = cString::sprintf("TRICKSPEED %d%s", Speed, Backwards ? " Backwards" : "");
+ Xine_Control(str);
}
void cXinelibThread::SetLiveMode(bool LiveModeOn)
diff --git a/frontend.h b/frontend.h
index f7ae9804..9d3c2e8b 100644
--- a/frontend.h
+++ b/frontend.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend.h,v 1.31 2009-08-18 12:53:42 phintuka Exp $
+ * $Id: frontend.h,v 1.32 2010-01-16 20:11:19 phintuka Exp $
*
*/
@@ -42,7 +42,7 @@ class cXinelibThread : public cThread, public cListObject
public:
void PauseOutput(void) { TrickSpeed(0); }
void ResumeOutput(void) { TrickSpeed(1); }
- virtual void TrickSpeed(int Speed);
+ void TrickSpeed(int Speed) { TrickSpeed(Speed, false); }
void SetVolume(int NewVolume);
void SetLiveMode(bool);
void SetStillMode(bool);
@@ -50,6 +50,8 @@ class cXinelibThread : public cThread, public cListObject
void AudioStreamChanged(bool ac3, int StreamId);
void SetSubtitleTrack(eTrackType Track);
+ virtual void TrickSpeed(int Speed, bool Backwards);
+
protected:
int Xine_Control(const char *cmd, const char *p1);
int Xine_Control(const char *cmd, int p1);
diff --git a/frontend_svr.c b/frontend_svr.c
index 1abfdbf9..cd7d494d 100644
--- a/frontend_svr.c
+++ b/frontend_svr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend_svr.c,v 1.83 2010-01-16 20:07:13 phintuka Exp $
+ * $Id: frontend_svr.c,v 1.84 2010-01-16 20:11:19 phintuka Exp $
*
*/
@@ -623,7 +623,7 @@ int cXinelibServer::Xine_Control_Sync(const char *cmd)
return 1;
}
-void cXinelibServer::TrickSpeed(int Speed)
+void cXinelibServer::TrickSpeed(int Speed, bool Backwards)
{
if(Speed == 0) {
m_Scheduler->Pause(true);
@@ -632,7 +632,7 @@ void cXinelibServer::TrickSpeed(int Speed)
m_Scheduler->TrickSpeed(Speed == -1 ? 1 : Speed);
}
- cXinelibThread::TrickSpeed(Speed);
+ cXinelibThread::TrickSpeed(Speed, Backwards);
}
bool cXinelibServer::EndOfStreamReached(void)
diff --git a/frontend_svr.h b/frontend_svr.h
index 1c657f42..7eb96f4b 100644
--- a/frontend_svr.h
+++ b/frontend_svr.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend_svr.h,v 1.24 2009-08-18 12:30:34 phintuka Exp $
+ * $Id: frontend_svr.h,v 1.25 2010-01-16 20:11:19 phintuka Exp $
*
*/
@@ -39,7 +39,7 @@ class cXinelibServer : public cXinelibThread
public:
// Playback control
- virtual void TrickSpeed(int Speed);
+ virtual void TrickSpeed(int Speed, bool Backwards);
// Data transfer
virtual int Poll(cPoller &Poller, int TimeoutMs);