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
21 #ifndef PLAYERLIVETV_H
22 #define PLAYERLIVETV_H
34 #include "threadwin.h"
51 struct PLTVInstruction
63 class PlayerLiveTV : public Thread_TYPE, public Callback, public StreamReceiver
66 PlayerLiveTV(MessageQueue* messageQueue, void* messageReceiver, ChannelList* chanList);
67 virtual ~PlayerLiveTV();
73 void setChannel(ULONG index);
75 void setAudioChannel(int newChannel);
77 bool* getDemuxerMpegAudioChannels();
78 bool* getDemuxerAc3AudioChannels();
79 int getCurrentAudioChannel();
81 void call(void*); // for callback interface
83 virtual void streamReceive(void*, ULONG); // stream receiver interface
87 // FIXME so far this just duplicates the old system + the wss
89 const static UCHAR CONNECTION_LOST = 1;
90 const static UCHAR STOP_PLAYBACK = 2;
91 const static UCHAR STREAM_END = 3;
92 const static UCHAR ASPECT43 = 4;
93 const static UCHAR ASPECT169 = 5;
97 void threadPostStopCleanup() {};
100 MessageQueue* messageQueue;
101 void* messageReceiver;
109 ChannelList* chanList;
111 queue<PLTVInstruction> instructions;
112 const static UCHAR I_SETCHANNEL = 1;
113 const static UCHAR I_STOP = 2;
115 queue<StreamChunk> streamChunks;
120 const static UCHAR S_STOP = 1;
121 const static UCHAR S_VIDEOSTARTUP = 2;
122 const static UCHAR S_PREBUFFERING = 3;
123 const static UCHAR S_PLAY = 4;
124 void switchState(UCHAR newState);
129 const static int preBufferAmount = 3;
131 void clearStreamChunks();
132 void chunkToDemuxer();
133 void optimizeInstructionQueue();