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
34 #include "threadwin.h"
51 struct PLTVInstruction
53 UCHAR instruction; // 1 = setChannel, 2 = stop
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() {};
101 MessageQueue* messageQueue;
102 void* messageReceiver;
110 ChannelList* chanList;
112 queue<PLTVInstruction> instructions;
113 queue<StreamChunk> streamChunks;
118 const static UCHAR S_STOP = 1;
119 const static UCHAR S_VIDEOSTARTUP = 2;
120 const static UCHAR S_PREBUFFERING = 3;
121 const static UCHAR S_PLAY = 4;
122 void switchState(UCHAR newState);
127 int videoStartup2Counter;
130 void clearStreamChunks();
131 void chunkToDemuxer();