2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #include "demuxervdr.h"
35 #include "messagequeue.h"
38 #include "threadwin.h"
43 class Player : public Thread_TYPE, public Callback
46 Player(MessageQueue* messageQueue, bool isRecording, bool isRadio);
51 void setStartFrame(ULONG frameNum);
52 void setLengthBytes(ULLONG length);
53 void setLengthFrames(ULONG length);
58 void toggleFastForward();
59 void toggleFastBackward();
60 void jumpToPercent(int percent);
61 void skipForward(int seconds);
62 void skipBackward(int seconds);
64 UCHAR getState() { return state; }
65 ULONG getCurrentFrameNum();
66 ULONG getLengthFrames();
68 void call(void*); // for callback interface
70 const static UCHAR S_PLAY = 1;
71 const static UCHAR S_PAUSE = 2;
72 const static UCHAR S_FFWD = 3;
73 const static UCHAR S_FBWD = 4;
74 const static UCHAR S_STOP = 5;
75 const static UCHAR S_JUMP = 6;
84 void threadPostStopCleanup();
87 void switchState(UCHAR newState, ULONG jumpFrame=0);
89 void threadFeedLive();
90 void threadFeedPlay();
91 void threadFeedScan();
94 void doConnectionLost();
95 void restartAtFrame(ULONG newFrame);
97 MessageQueue* commandMessageQueue;
114 pthread_mutex_t mutex;
123 ULONG currentFrameNumber;
125 UINT startupBlockSize;
137 Play, Pause, FFwd, FBwd, (Stop), [Jump]
147 From prev.play / prev.fast