hdhomerun_device.c File Reference

Go to the source code of this file.

Classes

struct  hdhomerun_device_t

Functions

static int hdhomerun_device_set_device_normal (struct hdhomerun_device_t *hd, uint32_t device_id, uint32_t device_ip)
static int hdhomerun_device_set_device_multicast (struct hdhomerun_device_t *hd, uint32_t multicast_ip)
int hdhomerun_device_set_device (struct hdhomerun_device_t *hd, uint32_t device_id, uint32_t device_ip)
int hdhomerun_device_set_tuner (struct hdhomerun_device_t *hd, unsigned int tuner)
struct hdhomerun_device_thdhomerun_device_create (uint32_t device_id, uint32_t device_ip, unsigned int tuner, struct hdhomerun_debug_t *dbg)
void hdhomerun_device_destroy (struct hdhomerun_device_t *hd)
static bool_t is_hex_char (char c)
static struct hdhomerun_device_thdhomerun_device_create_from_str_device_id (const char *device_str, struct hdhomerun_debug_t *dbg)
static struct hdhomerun_device_thdhomerun_device_create_from_str_ip_result (unsigned long a[4], unsigned int port, unsigned int tuner, struct hdhomerun_debug_t *dbg)
static struct hdhomerun_device_thdhomerun_device_create_from_str_ip (const char *device_str, struct hdhomerun_debug_t *dbg)
static struct hdhomerun_device_thdhomerun_device_create_from_str_dns (const char *device_str, struct hdhomerun_debug_t *dbg)
struct hdhomerun_device_thdhomerun_device_create_from_str (const char *device_str, struct hdhomerun_debug_t *dbg)
int hdhomerun_device_set_tuner_from_str (struct hdhomerun_device_t *hd, const char *tuner_str)
const char * hdhomerun_device_get_name (struct hdhomerun_device_t *hd)
uint32_t hdhomerun_device_get_device_id (struct hdhomerun_device_t *hd)
uint32_t hdhomerun_device_get_device_ip (struct hdhomerun_device_t *hd)
uint32_t hdhomerun_device_get_device_id_requested (struct hdhomerun_device_t *hd)
uint32_t hdhomerun_device_get_device_ip_requested (struct hdhomerun_device_t *hd)
unsigned int hdhomerun_device_get_tuner (struct hdhomerun_device_t *hd)
struct hdhomerun_control_sock_thdhomerun_device_get_control_sock (struct hdhomerun_device_t *hd)
struct hdhomerun_video_sock_thdhomerun_device_get_video_sock (struct hdhomerun_device_t *hd)
uint32_t hdhomerun_device_get_local_machine_addr (struct hdhomerun_device_t *hd)
static uint32_t hdhomerun_device_get_status_parse (const char *status_str, const char *tag)
static bool_t hdhomerun_device_get_tuner_status_lock_is_bcast (struct hdhomerun_tuner_status_t *status)
uint32_t hdhomerun_device_get_tuner_status_ss_color (struct hdhomerun_tuner_status_t *status)
uint32_t hdhomerun_device_get_tuner_status_snq_color (struct hdhomerun_tuner_status_t *status)
uint32_t hdhomerun_device_get_tuner_status_seq_color (struct hdhomerun_tuner_status_t *status)
int hdhomerun_device_get_tuner_status (struct hdhomerun_device_t *hd, char **pstatus_str, struct hdhomerun_tuner_status_t *status)
int hdhomerun_device_get_oob_status (struct hdhomerun_device_t *hd, char **pstatus_str, struct hdhomerun_tuner_status_t *status)
int hdhomerun_device_get_tuner_vstatus (struct hdhomerun_device_t *hd, char **pvstatus_str, struct hdhomerun_tuner_vstatus_t *vstatus)
int hdhomerun_device_get_tuner_streaminfo (struct hdhomerun_device_t *hd, char **pstreaminfo)
int hdhomerun_device_get_tuner_channel (struct hdhomerun_device_t *hd, char **pchannel)
int hdhomerun_device_get_tuner_vchannel (struct hdhomerun_device_t *hd, char **pvchannel)
int hdhomerun_device_get_tuner_channelmap (struct hdhomerun_device_t *hd, char **pchannelmap)
int hdhomerun_device_get_tuner_filter (struct hdhomerun_device_t *hd, char **pfilter)
int hdhomerun_device_get_tuner_program (struct hdhomerun_device_t *hd, char **pprogram)
int hdhomerun_device_get_tuner_target (struct hdhomerun_device_t *hd, char **ptarget)
static int hdhomerun_device_get_tuner_plotsample_internal (struct hdhomerun_device_t *hd, const char *name, struct hdhomerun_plotsample_t **psamples, size_t *pcount)
int hdhomerun_device_get_tuner_plotsample (struct hdhomerun_device_t *hd, struct hdhomerun_plotsample_t **psamples, size_t *pcount)
int hdhomerun_device_get_oob_plotsample (struct hdhomerun_device_t *hd, struct hdhomerun_plotsample_t **psamples, size_t *pcount)
int hdhomerun_device_get_tuner_lockkey_owner (struct hdhomerun_device_t *hd, char **powner)
int hdhomerun_device_get_ir_target (struct hdhomerun_device_t *hd, char **ptarget)
int hdhomerun_device_get_lineup_location (struct hdhomerun_device_t *hd, char **plocation)
int hdhomerun_device_get_version (struct hdhomerun_device_t *hd, char **pversion_str, uint32_t *pversion_num)
int hdhomerun_device_get_supported (struct hdhomerun_device_t *hd, char *prefix, char **pstr)
int hdhomerun_device_set_tuner_channel (struct hdhomerun_device_t *hd, const char *channel)
int hdhomerun_device_set_tuner_vchannel (struct hdhomerun_device_t *hd, const char *vchannel)
int hdhomerun_device_set_tuner_channelmap (struct hdhomerun_device_t *hd, const char *channelmap)
int hdhomerun_device_set_tuner_filter (struct hdhomerun_device_t *hd, const char *filter)
static int hdhomerun_device_set_tuner_filter_by_array_append (char **pptr, char *end, uint16_t range_begin, uint16_t range_end)
int hdhomerun_device_set_tuner_filter_by_array (struct hdhomerun_device_t *hd, unsigned char filter_array[0x2000])
int hdhomerun_device_set_tuner_program (struct hdhomerun_device_t *hd, const char *program)
int hdhomerun_device_set_tuner_target (struct hdhomerun_device_t *hd, const char *target)
static int hdhomerun_device_set_tuner_target_to_local (struct hdhomerun_device_t *hd, const char *protocol)
int hdhomerun_device_set_ir_target (struct hdhomerun_device_t *hd, const char *target)
int hdhomerun_device_set_lineup_location (struct hdhomerun_device_t *hd, const char *location)
int hdhomerun_device_set_sys_dvbc_modulation (struct hdhomerun_device_t *hd, const char *modulation_list)
int hdhomerun_device_get_var (struct hdhomerun_device_t *hd, const char *name, char **pvalue, char **perror)
int hdhomerun_device_set_var (struct hdhomerun_device_t *hd, const char *name, const char *value, char **pvalue, char **perror)
int hdhomerun_device_tuner_lockkey_request (struct hdhomerun_device_t *hd, char **perror)
int hdhomerun_device_tuner_lockkey_release (struct hdhomerun_device_t *hd)
int hdhomerun_device_tuner_lockkey_force (struct hdhomerun_device_t *hd)
void hdhomerun_device_tuner_lockkey_use_value (struct hdhomerun_device_t *hd, uint32_t lockkey)
int hdhomerun_device_wait_for_lock (struct hdhomerun_device_t *hd, struct hdhomerun_tuner_status_t *status)
int hdhomerun_device_stream_start (struct hdhomerun_device_t *hd)
uint8_thdhomerun_device_stream_recv (struct hdhomerun_device_t *hd, size_t max_size, size_t *pactual_size)
void hdhomerun_device_stream_flush (struct hdhomerun_device_t *hd)
void hdhomerun_device_stream_stop (struct hdhomerun_device_t *hd)
int hdhomerun_device_channelscan_init (struct hdhomerun_device_t *hd, const char *channelmap)
int hdhomerun_device_channelscan_advance (struct hdhomerun_device_t *hd, struct hdhomerun_channelscan_result_t *result)
int hdhomerun_device_channelscan_detect (struct hdhomerun_device_t *hd, struct hdhomerun_channelscan_result_t *result)
uint8_t hdhomerun_device_channelscan_get_progress (struct hdhomerun_device_t *hd)
const char * hdhomerun_device_get_model_str (struct hdhomerun_device_t *hd)
int hdhomerun_device_upgrade (struct hdhomerun_device_t *hd, FILE *upgrade_file)
void hdhomerun_device_debug_print_video_stats (struct hdhomerun_device_t *hd)
void hdhomerun_device_get_video_stats (struct hdhomerun_device_t *hd, struct hdhomerun_video_stats_t *stats)

Function Documentation

static int hdhomerun_device_set_device_normal ( struct hdhomerun_device_t hd,
uint32_t  device_id,
uint32_t  device_ip 
) [static]

Definition at line 49 of file hdhomerun_device.c.

Referenced by hdhomerun_device_set_device().

static int hdhomerun_device_set_device_multicast ( struct hdhomerun_device_t hd,
uint32_t  multicast_ip 
) [static]

Definition at line 77 of file hdhomerun_device.c.

Referenced by hdhomerun_device_set_device().

int hdhomerun_device_set_device ( struct hdhomerun_device_t hd,
uint32_t  device_id,
uint32_t  device_ip 
)

Definition at line 97 of file hdhomerun_device.c.

Referenced by hdhomerun_device_create().

int hdhomerun_device_set_tuner ( struct hdhomerun_device_t hd,
unsigned int  tuner 
)
struct hdhomerun_device_t* hdhomerun_device_create ( uint32_t  device_id,
uint32_t  device_ip,
unsigned int  tuner,
struct hdhomerun_debug_t dbg 
) [read]
void hdhomerun_device_destroy ( struct hdhomerun_device_t hd  ) 
static bool_t is_hex_char ( char  c  )  [static]

Definition at line 171 of file hdhomerun_device.c.

Referenced by hdhomerun_device_create_from_str_device_id().

static struct hdhomerun_device_t* hdhomerun_device_create_from_str_device_id ( const char *  device_str,
struct hdhomerun_debug_t dbg 
) [static, read]

Definition at line 185 of file hdhomerun_device.c.

Referenced by hdhomerun_device_create_from_str().

static struct hdhomerun_device_t* hdhomerun_device_create_from_str_ip_result ( unsigned long  a[4],
unsigned int  port,
unsigned int  tuner,
struct hdhomerun_debug_t dbg 
) [static, read]

Definition at line 215 of file hdhomerun_device.c.

Referenced by hdhomerun_device_create_from_str_ip().

static struct hdhomerun_device_t* hdhomerun_device_create_from_str_ip ( const char *  device_str,
struct hdhomerun_debug_t dbg 
) [static, read]

Definition at line 230 of file hdhomerun_device.c.

Referenced by hdhomerun_device_create_from_str().

static struct hdhomerun_device_t* hdhomerun_device_create_from_str_dns ( const char *  device_str,
struct hdhomerun_debug_t dbg 
) [static, read]

Definition at line 249 of file hdhomerun_device.c.

Referenced by hdhomerun_device_create_from_str().

struct hdhomerun_device_t* hdhomerun_device_create_from_str ( const char *  device_str,
struct hdhomerun_debug_t dbg 
) [read]
int hdhomerun_device_set_tuner_from_str ( struct hdhomerun_device_t hd,
const char *  tuner_str 
)

Definition at line 297 of file hdhomerun_device.c.

Referenced by cmd_save(), and cmd_scan().

const char* hdhomerun_device_get_name ( struct hdhomerun_device_t hd  ) 

Definition at line 312 of file hdhomerun_device.c.

Referenced by hdhomerun_device_selector_choose_test().

uint32_t hdhomerun_device_get_device_id ( struct hdhomerun_device_t hd  ) 
uint32_t hdhomerun_device_get_device_ip ( struct hdhomerun_device_t hd  ) 

Definition at line 322 of file hdhomerun_device.c.

Referenced by HDHomeRunConfigurationGroup::ProbeCard().

uint32_t hdhomerun_device_get_device_id_requested ( struct hdhomerun_device_t hd  ) 

Definition at line 334 of file hdhomerun_device.c.

Referenced by main_internal().

uint32_t hdhomerun_device_get_device_ip_requested ( struct hdhomerun_device_t hd  ) 

Definition at line 346 of file hdhomerun_device.c.

unsigned int hdhomerun_device_get_tuner ( struct hdhomerun_device_t hd  ) 
struct hdhomerun_control_sock_t* hdhomerun_device_get_control_sock ( struct hdhomerun_device_t hd  )  [read]

Definition at line 363 of file hdhomerun_device.c.

struct hdhomerun_video_sock_t* hdhomerun_device_get_video_sock ( struct hdhomerun_device_t hd  )  [read]

Definition at line 368 of file hdhomerun_device.c.

Referenced by hdhomerun_device_stream_start().

uint32_t hdhomerun_device_get_local_machine_addr ( struct hdhomerun_device_t hd  ) 
static uint32_t hdhomerun_device_get_status_parse ( const char *  status_str,
const char *  tag 
) [static]
static bool_t hdhomerun_device_get_tuner_status_lock_is_bcast ( struct hdhomerun_tuner_status_t status  )  [static]

Definition at line 407 of file hdhomerun_device.c.

Referenced by hdhomerun_device_get_tuner_status_ss_color().

uint32_t hdhomerun_device_get_tuner_status_ss_color ( struct hdhomerun_tuner_status_t status  ) 

Definition at line 425 of file hdhomerun_device.c.

uint32_t hdhomerun_device_get_tuner_status_snq_color ( struct hdhomerun_tuner_status_t status  ) 

Definition at line 452 of file hdhomerun_device.c.

uint32_t hdhomerun_device_get_tuner_status_seq_color ( struct hdhomerun_tuner_status_t status  ) 

Definition at line 464 of file hdhomerun_device.c.

int hdhomerun_device_get_tuner_status ( struct hdhomerun_device_t hd,
char **  pstatus_str,
struct hdhomerun_tuner_status_t status 
)
int hdhomerun_device_get_oob_status ( struct hdhomerun_device_t hd,
char **  pstatus_str,
struct hdhomerun_tuner_status_t status 
)

Definition at line 526 of file hdhomerun_device.c.

Referenced by CardUtil::IsCableCardPresent().

int hdhomerun_device_get_tuner_vstatus ( struct hdhomerun_device_t hd,
char **  pvstatus_str,
struct hdhomerun_tuner_vstatus_t vstatus 
)

Definition at line 565 of file hdhomerun_device.c.

int hdhomerun_device_get_tuner_streaminfo ( struct hdhomerun_device_t hd,
char **  pstreaminfo 
)

Definition at line 635 of file hdhomerun_device.c.

Referenced by channelscan_detect_programs().

int hdhomerun_device_get_tuner_channel ( struct hdhomerun_device_t hd,
char **  pchannel 
)

Definition at line 647 of file hdhomerun_device.c.

int hdhomerun_device_get_tuner_vchannel ( struct hdhomerun_device_t hd,
char **  pvchannel 
)

Definition at line 659 of file hdhomerun_device.c.

int hdhomerun_device_get_tuner_channelmap ( struct hdhomerun_device_t hd,
char **  pchannelmap 
)

Definition at line 671 of file hdhomerun_device.c.

Referenced by cmd_scan().

int hdhomerun_device_get_tuner_filter ( struct hdhomerun_device_t hd,
char **  pfilter 
)

Definition at line 683 of file hdhomerun_device.c.

int hdhomerun_device_get_tuner_program ( struct hdhomerun_device_t hd,
char **  pprogram 
)

Definition at line 695 of file hdhomerun_device.c.

int hdhomerun_device_get_tuner_target ( struct hdhomerun_device_t hd,
char **  ptarget 
)

Definition at line 707 of file hdhomerun_device.c.

Referenced by hdhomerun_device_selector_choose_test().

static int hdhomerun_device_get_tuner_plotsample_internal ( struct hdhomerun_device_t hd,
const char *  name,
struct hdhomerun_plotsample_t **  psamples,
size_t *  pcount 
) [static]
int hdhomerun_device_get_tuner_plotsample ( struct hdhomerun_device_t hd,
struct hdhomerun_plotsample_t **  psamples,
size_t *  pcount 
)

Definition at line 765 of file hdhomerun_device.c.

int hdhomerun_device_get_oob_plotsample ( struct hdhomerun_device_t hd,
struct hdhomerun_plotsample_t **  psamples,
size_t *  pcount 
)

Definition at line 777 of file hdhomerun_device.c.

int hdhomerun_device_get_tuner_lockkey_owner ( struct hdhomerun_device_t hd,
char **  powner 
)

Definition at line 787 of file hdhomerun_device.c.

int hdhomerun_device_get_ir_target ( struct hdhomerun_device_t hd,
char **  ptarget 
)

Definition at line 799 of file hdhomerun_device.c.

int hdhomerun_device_get_lineup_location ( struct hdhomerun_device_t hd,
char **  plocation 
)

Definition at line 809 of file hdhomerun_device.c.

int hdhomerun_device_get_version ( struct hdhomerun_device_t hd,
char **  pversion_str,
uint32_t pversion_num 
)

Definition at line 819 of file hdhomerun_device.c.

Referenced by cmd_upgrade(), and CardUtil::GetHDHRdesc().

int hdhomerun_device_get_supported ( struct hdhomerun_device_t hd,
char *  prefix,
char **  pstr 
)

Definition at line 848 of file hdhomerun_device.c.

int hdhomerun_device_set_tuner_channel ( struct hdhomerun_device_t hd,
const char *  channel 
)

Definition at line 882 of file hdhomerun_device.c.

Referenced by channelscan_find_lock().

int hdhomerun_device_set_tuner_vchannel ( struct hdhomerun_device_t hd,
const char *  vchannel 
)

Definition at line 894 of file hdhomerun_device.c.

int hdhomerun_device_set_tuner_channelmap ( struct hdhomerun_device_t hd,
const char *  channelmap 
)

Definition at line 906 of file hdhomerun_device.c.

int hdhomerun_device_set_tuner_filter ( struct hdhomerun_device_t hd,
const char *  filter 
)

Definition at line 918 of file hdhomerun_device.c.

Referenced by hdhomerun_device_set_tuner_filter_by_array().

static int hdhomerun_device_set_tuner_filter_by_array_append ( char **  pptr,
char *  end,
uint16_t  range_begin,
uint16_t  range_end 
) [static]

Definition at line 930 of file hdhomerun_device.c.

Referenced by hdhomerun_device_set_tuner_filter_by_array().

int hdhomerun_device_set_tuner_filter_by_array ( struct hdhomerun_device_t hd,
unsigned char  filter_array[0x2000] 
)

Definition at line 951 of file hdhomerun_device.c.

int hdhomerun_device_set_tuner_program ( struct hdhomerun_device_t hd,
const char *  program 
)

Definition at line 998 of file hdhomerun_device.c.

int hdhomerun_device_set_tuner_target ( struct hdhomerun_device_t hd,
const char *  target 
)
static int hdhomerun_device_set_tuner_target_to_local ( struct hdhomerun_device_t hd,
const char *  protocol 
) [static]

Definition at line 1022 of file hdhomerun_device.c.

Referenced by hdhomerun_device_stream_start().

int hdhomerun_device_set_ir_target ( struct hdhomerun_device_t hd,
const char *  target 
)

Definition at line 1047 of file hdhomerun_device.c.

int hdhomerun_device_set_lineup_location ( struct hdhomerun_device_t hd,
const char *  location 
)

Definition at line 1057 of file hdhomerun_device.c.

int hdhomerun_device_set_sys_dvbc_modulation ( struct hdhomerun_device_t hd,
const char *  modulation_list 
)

Definition at line 1067 of file hdhomerun_device.c.

int hdhomerun_device_get_var ( struct hdhomerun_device_t hd,
const char *  name,
char **  pvalue,
char **  perror 
)

Definition at line 1077 of file hdhomerun_device.c.

Referenced by cmd_execute(), cmd_get(), and HDHRStreamHandler::TunerGet().

int hdhomerun_device_set_var ( struct hdhomerun_device_t hd,
const char *  name,
const char *  value,
char **  pvalue,
char **  perror 
)

Definition at line 1087 of file hdhomerun_device.c.

Referenced by cmd_set_internal(), and HDHRStreamHandler::TunerSet().

int hdhomerun_device_tuner_lockkey_request ( struct hdhomerun_device_t hd,
char **  perror 
)

Definition at line 1097 of file hdhomerun_device.c.

Referenced by cmd_scan(), and hdhomerun_device_selector_choose_test().

int hdhomerun_device_tuner_lockkey_release ( struct hdhomerun_device_t hd  ) 

Definition at line 1125 of file hdhomerun_device.c.

Referenced by cmd_scan().

int hdhomerun_device_tuner_lockkey_force ( struct hdhomerun_device_t hd  ) 

Definition at line 1147 of file hdhomerun_device.c.

Referenced by hdhomerun_device_selector_choose_test().

void hdhomerun_device_tuner_lockkey_use_value ( struct hdhomerun_device_t hd,
uint32_t  lockkey 
)

Definition at line 1165 of file hdhomerun_device.c.

Referenced by main_cmd().

int hdhomerun_device_wait_for_lock ( struct hdhomerun_device_t hd,
struct hdhomerun_tuner_status_t status 
)

Definition at line 1174 of file hdhomerun_device.c.

Referenced by channelscan_find_lock().

int hdhomerun_device_stream_start ( struct hdhomerun_device_t hd  ) 

Definition at line 1203 of file hdhomerun_device.c.

Referenced by cmd_save(), and HDHRStreamHandler::run().

uint8_t* hdhomerun_device_stream_recv ( struct hdhomerun_device_t hd,
size_t  max_size,
size_t *  pactual_size 
)

Definition at line 1234 of file hdhomerun_device.c.

Referenced by cmd_save(), and HDHRStreamHandler::run().

void hdhomerun_device_stream_flush ( struct hdhomerun_device_t hd  ) 

Definition at line 1244 of file hdhomerun_device.c.

Referenced by HDHRStreamHandler::run().

void hdhomerun_device_stream_stop ( struct hdhomerun_device_t hd  ) 

Definition at line 1254 of file hdhomerun_device.c.

Referenced by cmd_save(), and HDHRStreamHandler::run().

int hdhomerun_device_channelscan_init ( struct hdhomerun_device_t hd,
const char *  channelmap 
)

Definition at line 1268 of file hdhomerun_device.c.

Referenced by cmd_scan().

int hdhomerun_device_channelscan_advance ( struct hdhomerun_device_t hd,
struct hdhomerun_channelscan_result_t result 
)

Definition at line 1283 of file hdhomerun_device.c.

Referenced by cmd_scan().

int hdhomerun_device_channelscan_detect ( struct hdhomerun_device_t hd,
struct hdhomerun_channelscan_result_t result 
)

Definition at line 1299 of file hdhomerun_device.c.

Referenced by cmd_scan().

uint8_t hdhomerun_device_channelscan_get_progress ( struct hdhomerun_device_t hd  ) 

Definition at line 1315 of file hdhomerun_device.c.

const char* hdhomerun_device_get_model_str ( struct hdhomerun_device_t hd  ) 
int hdhomerun_device_upgrade ( struct hdhomerun_device_t hd,
FILE *  upgrade_file 
)

Definition at line 1352 of file hdhomerun_device.c.

Referenced by cmd_upgrade().

void hdhomerun_device_debug_print_video_stats ( struct hdhomerun_device_t hd  ) 

Definition at line 1368 of file hdhomerun_device.c.

void hdhomerun_device_get_video_stats ( struct hdhomerun_device_t hd,
struct hdhomerun_video_stats_t stats 
)

Definition at line 1398 of file hdhomerun_device.c.

Referenced by cmd_save(), and cmd_save_print_stats().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Sat May 26 06:41:48 2012 for MythTV by  doxygen 1.6.3