blob: b239f7d17a1830f31107631c23cd5f3ed13a8ff7 [file] [log] [blame]
#ifndef _HDHOMERUN_TUNER_H_
#define _HDHOMERUN_TUNER_H_
struct hdhr_tuner_t {
void *hd;
int tuner_id; // unique id in a channel service
char tuner_name[32]; // external name used by plugin in a channel service
char name[16]; // internal used by hdhomerun device
char ip[16]; // device unit ip
char model[16]; // device model
char firmware[32]; // device firmware
int type; // device type 1:atsc 2:qam 3:dvb
int cc_tuner; // cable card tuner
int transcode_tuner; // transcoding tuner
void *channel_table; // channel scan private data
};
struct vchan_t {
int guide_id;
char guide_name[32];
};
struct vchan_tbl_t {
struct hdhr_tuner_t ht;
int channel_num;
int channel_size;
struct vchan_t *vchan;
};
struct channel_entry_t;
int discover_devices(struct hdhr_tuner_t *ht, int max_ht_num);
void *open_hdhr(char *name);
void close_hdhr(void *device);
char *get_unit_name(struct hdhr_tuner_t *ht, char *name, int size);
int scan_all(void *device, struct channel_entry_t *ce, int ce_num);
int tune_channel(void *device, char *channel, char *program,
char *stream_target);
int tune_atsc_vchannel(void *device, unsigned int channel,
unsigned int vchannel_major, unsigned int vchannel_minor,
char *stream_target);
int tune_cable_vchannel(void *device, unsigned int channel,
char *stream_target);
int stop_channel(void *device);
int scan_vchannel(void *device, int vchannel, struct channel_entry_t *ce);
struct vchan_tbl_t *create_vchan_tbl(struct hdhr_tuner_t *ht);
void release_vchan_tbl(struct vchan_tbl_t *vt);
int grow_vhcan_tbl(struct vchan_tbl_t *vt);
#endif