blob: 0a3a5ef47c1c18d5be6299564f2c95c028a185ae [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[20]; //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
int type; //device type 1:atsc 2:qam 3:dvb
int cc_tuner; //cable card 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_device( struct hdhr_tuner_t *ht, int max_ht_num );
//get unit name of a tuner, one unit contains 1-6 tuners
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 tuner_input_sharing( struct hdhr_tuner_t *ht1, struct hdhr_tuner_t *ht2 );
int tune_channel( void* device, char *channel, char *program, char* stream_target );
int tune_vchannel(void *device, unsigned int channel,
unsigned int vchannel_major, unsigned int vchannel_minor,
char *stream_target);
int stop_channel( void* device );
int scan_vchannel( void* device, int vchannel, struct channel_entry_t *ce );
int tuner_input_sharing( struct hdhr_tuner_t *ht1, struct hdhr_tuner_t *ht2 );
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