summaryrefslogtreecommitdiff
path: root/amldevice.h
diff options
context:
space:
mode:
authorThomas Reufer <thomas@reufer.ch>2016-03-20 21:42:51 +0100
committerThomas Reufer <thomas@reufer.ch>2016-03-20 21:42:51 +0100
commitb0fe61c70c862afcb5defb2cede3dac32587f475 (patch)
treecebb2b673d55f020b6143bd2c8e7fac6385a4f3a /amldevice.h
parent10cf387b03d2431e7e152aee08fef0b91c9b7de1 (diff)
downloadvdr-plugin-amlhddevice-master.tar.gz
vdr-plugin-amlhddevice-master.tar.bz2
switched back to ES mode and fixed replayHEADmaster
Diffstat (limited to 'amldevice.h')
-rw-r--r--amldevice.h67
1 files changed, 60 insertions, 7 deletions
diff --git a/amldevice.h b/amldevice.h
index 35f38dc..6554392 100644
--- a/amldevice.h
+++ b/amldevice.h
@@ -8,10 +8,48 @@
#define AML_DEVICE_H
#include <vdr/device.h>
-
#include "tools.h"
-class cAmlDecoder;
+extern "C" {
+#include <codec.h>
+}
+
+class cScheduler
+{
+
+public:
+
+ cScheduler();
+ virtual ~cScheduler() { }
+
+ void SetSpeed(int speed, bool forward);
+ void Reset();
+
+ bool Check(int64_t pts);
+ int64_t GetPts(void);
+
+ enum eSpeed {
+ ePause,
+ eSlowest,
+ eSlower,
+ eSlow,
+ eNormal,
+ eFast,
+ eFaster,
+ eFastest,
+ eNumSpeeds
+ };
+
+private:
+
+ int64_t m_pts;
+ cTimeMs m_timestamp;
+
+ eSpeed m_speed;
+ bool m_forward;
+
+ static const int s_speeds[eNumSpeeds];
+};
class cAmlDevice : cDevice
{
@@ -35,21 +73,36 @@ public:
virtual void GetOsdSize(int &Width, int &Height, double &PixelAspect);
+ virtual int64_t GetSTC(void);
+
protected:
virtual void MakePrimaryDevice(bool On);
- virtual int PlayTsVideo(const uchar *Data, int Length);
- virtual int PlayTsAudio(const uchar *Data, int Length);
+ virtual int PlayVideo(const uchar *Data, int Length);
+ virtual int PlayAudio(const uchar *Data, int Length, uchar Id);
+
+ void StillPicture(const uchar *Data, int Length);
+
+ virtual void Clear(void);
+ virtual void Play(void);
+ virtual void Freeze(void);
+
+ virtual void TrickSpeed(int Speed, bool Forward);
+
+ virtual void SetVolumeDevice(int Volume);
private:
void (*m_onPrimaryDevice)(void);
- cAmlDecoder *m_decoder;
+ codec_para_t m_videoCodec;
+ codec_para_t m_audioCodec;
+
+ uchar m_audioId;
+ bool m_trickMode;
- int m_audioPid;
- int m_videoPid;
+ cScheduler m_scheduler;
};
#endif