2
This class can waits for input on different istreams
3
Copyright (C) 1998 Martin Vogt
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation.
9
For more information look at the file COPYRIGHT in this package
16
#ifndef __MULTIREADER_H
17
#define __MULTIREADER_H
21
#include "lineStack.h"
26
#include <sys/types.h>
34
The purpose of this class is to have a thread safe input method
37
Sometime the decoder thread must send data to the control thread.
38
E.g. the Stream has ended. The decoder thread must inform the
39
control thread that the player should go into the "off" state.
40
A direct call is not thread safe and this is why the decoder
41
thread must use this class. For the control thread it looks
42
like the user has typed "off".
49
LineStack* tmpLineStack; // owned by class
50
int fd; // filedescriptor for input
58
LineInput* lineInputArray[_MAX_INPUT];
66
void add(LineStack* aScript);
67
void add(Buffer* aScript);
71
void poll(struct timeval* timeout);
74
void getLine(Buffer* buffer);
78
void doSelect(struct timeval *timeout);