Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / tunerserver.h
blobba6e05f18bad0ee6b21d3b34b349a91f98bccbe2
1 #ifndef TUNERSERVER_H
2 #define TUNERSERVER_H
6 #include "renderfarmclient.inc"
7 #include "thread.h"
8 #include "tunerserver.inc"
10 #include <stdint.h>
14 /**
15 * Inherited by all network tuners.
16 **/
18 class TunerServer
20 public:
21 TunerServer(RenderFarmClientThread *client);
22 virtual ~TunerServer();
25 /**
26 * User calls this to initialize and run the server
27 **/
28 void main_loop();
30 /**
31 * These are overridden. Returns of 1 are considered errors.
32 **/
33 virtual int open_tuner();
34 virtual int close_tuner();
35 virtual int get_signal_strength(int *current_power, int *current_lock);
36 /**
37 * Should return the number of bytes read.
38 **/
39 virtual int read_data(unsigned char *data, int size);
42 int get_table();
43 int get_channel();
44 int get_audio_pid();
45 int get_video_pid();
46 int get_device_number();
48 private:
50 int is_busy;
51 RenderFarmClientThread *client;
52 int port;
53 // Channel number
54 int channel;
55 // Channel table
56 int table;
57 int audio_pid;
58 int video_pid;
59 int device_number;
60 unsigned char *temp;
61 int temp_allocated;
62 int connection_closed;
68 #endif
70 // Local Variables:
71 // mode: C++
72 // c-file-style: "linux"
73 // End: