summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/util/syncClock.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch)
tree9047cf9e6b5c43878d5bf82660adae77ceee097a /mpeglib/lib/util/syncClock.h
downloadtdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz
tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mpeglib/lib/util/syncClock.h')
-rw-r--r--mpeglib/lib/util/syncClock.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/mpeglib/lib/util/syncClock.h b/mpeglib/lib/util/syncClock.h
new file mode 100644
index 00000000..4b6bc2bb
--- /dev/null
+++ b/mpeglib/lib/util/syncClock.h
@@ -0,0 +1,61 @@
+/*
+ basic synchronisation Classs
+ Copyright (C) 2000 Martin Vogt
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation.
+
+ For more information look at the file COPYRIGHT in this package
+
+ */
+
+
+
+#ifndef __SYNCCLOCK_H
+#define __SYNCCLOCK_H
+
+#include "timeWrapper.h"
+#include "abstract/abs_thread.h"
+#include "timeStamp.h"
+#include <errno.h>
+
+#define __SYNC_NONE 0
+#define __SYNC_AUDIO 1
+#define __SYNC_VIDEO 2
+#define __SYNC_BOTH 3
+
+
+/**
+ The idea is similar to this:
+ We start a clock and selext a synchronisation mode.
+ (AUDIO,VIDEO,BOTH,NONE)
+ Assume we select AUDIO. When the audio thread delivers an SCR
+ and an PTS, we set the SCR from this set, as the new
+ time reference fo rthis clock.
+ If a video thread enters the class, with an SCR,PTS we wait,
+ or directly return if the PTS is in time or out of time,
+ but we never set the SCR.
+*/
+
+class SyncClock {
+
+
+ public:
+ SyncClock();
+ virtual ~SyncClock();
+
+ virtual int getSyncMode();
+ virtual void setSyncMode(int syncMode);
+
+
+ virtual int syncAudio(double pts,double scr);
+ virtual int syncVideo(double pts,double scr,
+ class TimeStamp* earlyTime,
+ class TimeStamp* waitTime);
+
+ virtual void print(char* text);
+
+
+};
+#endif