vicon placement tweak, bclistbox select fixes, new ctrl-a/s shortcuts
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / tunerserver.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program 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.
10  *
11  * This program 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.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef TUNERSERVER_H
23 #define TUNERSERVER_H
24
25
26
27 #include "renderfarmclient.inc"
28 #include "thread.h"
29 #include "tunerserver.inc"
30
31 #include <stdint.h>
32
33
34
35 /**
36  * Inherited by all network tuners.
37  **/
38
39 class TunerServer
40 {
41 public:
42         TunerServer(RenderFarmClientThread *client);
43         virtual ~TunerServer();
44
45
46 /**
47  * User calls this to initialize and run the server
48  **/
49         void main_loop();
50
51 /**
52  * These are overridden.  Returns of 1 are considered errors.
53  **/
54         virtual int open_tuner();
55         virtual int close_tuner();
56         virtual int get_signal_strength(int *current_power, int *current_lock);
57 /**
58  * Should return the number of bytes read.
59  **/
60         virtual int read_data(unsigned char *data, int size);
61
62
63         int get_table();
64         int get_channel();
65         int get_audio_pid();
66         int get_video_pid();
67         int get_device_number();
68
69 private:
70
71         int is_busy;
72         RenderFarmClientThread *client;
73         int port;
74 // Channel number
75         int channel;
76 // Channel table
77         int table;
78         int audio_pid;
79         int video_pid;
80         int device_number;
81         unsigned char *temp;
82         int temp_allocated;
83         int connection_closed;
84 };
85
86
87
88
89 #endif