rtvlib.c File Reference

#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <sys/utsname.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include "rtv.h"
#include "rtvlib.h"

Go to the source code of this file.

Functions

rtv_device_trtv_get_device_struct (const char *ipaddr, int *new)
int rtv_free_devices (void)
void rtv_print_device_list (void)
void rtv_set_32k_chunks_to_merge (int chunks)
void rtv_set_dbgmask (__u32 mask)
__u32 rtv_get_dbgmask (void)
int rtv_set_discover_options (int timeout, int maxnum_rtv, rtv_vintage_t dva_mode)
char * rtv_format_ts_sec32_hms (__u32 ts, char *time_str)
char * rtv_format_ts_ms32_min_sec_ms (__u32 ts, char *time_str)
char * rtv_format_datetime_sec32 (__u32 t)
char * rtv_format_datetime_sec32_2 (__u32 t)
char * rtv_format_datetime_ms64_1 (__u64 ttk)
char * rtv_format_datetime_ms64_2 (__u64 ttk)
char * rtv_format_nsec64 (__u64 nsec)
char * rtv_sec_to_hr_mn_str (unsigned int seconds)
int rtv_init_lib (void)
void rtv_convert_22_ndx_rec (rtv_ndx_22_record_t *rec)
void rtv_convert_30_ndx_rec (rtv_ndx_30_record_t *rec)
void rtv_convert_evt_rec (rtv_evt_record_t *rec)
void rtv_hex_dump (char *tag, unsigned long address, unsigned char *buf, size_t sz, int ascii_decode_bool)

Variables

char local_ip_address [INET_ADDRSTRLEN] = ""
char local_hostname [255] = "NoHostName"
rtv_device_list_t rtv_devices


Function Documentation

void rtv_convert_22_ndx_rec rtv_ndx_22_record_t rec  ) 
 

Definition at line 349 of file rtvlib.c.

References rtv_ndx_22_record_t::audio_offset, rtv_ndx_22_record_t::macrovision_count, rtv_ndx_22_record_t::stream_position, rtv_ndx_22_record_t::timestamp, and rtv_ndx_22_record_t::video_offset.

Referenced by rtv_get_ndx22_rec().

void rtv_convert_30_ndx_rec rtv_ndx_30_record_t rec  ) 
 

Definition at line 361 of file rtvlib.c.

References rtv_ndx_30_record_t::filepos_iframe, rtv_ndx_30_record_t::iframe_size, and rtv_ndx_30_record_t::timestamp.

Referenced by process_mpg(), process_ndx_30(), and rtv_get_ndx30_rec().

void rtv_convert_evt_rec rtv_evt_record_t rec  ) 
 

Definition at line 371 of file rtvlib.c.

References rtv_evt_record_t::audiopower, rtv_evt_record_t::blacklevel, rtv_evt_record_t::data_type, and rtv_evt_record_t::timestamp.

Referenced by convert_evtbuf_recs().

char* rtv_format_datetime_ms64_1 __u64  ttk  ) 
 

Definition at line 193 of file rtvlib.c.

char* rtv_format_datetime_ms64_2 __u64  ttk  ) 
 

Definition at line 213 of file rtvlib.c.

char* rtv_format_datetime_sec32 __u32  t  ) 
 

Definition at line 165 of file rtvlib.c.

Referenced by parse_show().

char* rtv_format_datetime_sec32_2 __u32  t  ) 
 

Definition at line 179 of file rtvlib.c.

Referenced by parse_show().

char* rtv_format_nsec64 __u64  nsec  ) 
 

Definition at line 233 of file rtvlib.c.

Referenced by rtv_print_22_ndx_rec(), and rtv_print_30_ndx_rec().

char* rtv_format_ts_ms32_min_sec_ms __u32  ts,
char *  time_str
 

Definition at line 149 of file rtvlib.c.

References min.

Referenced by print_fadepoints(), rtv_get_ndx22_rec(), and rtv_print_comm_blks().

char* rtv_format_ts_sec32_hms __u32  ts,
char *  time_str
 

Definition at line 135 of file rtvlib.c.

int rtv_free_devices void   ) 
 

Definition at line 65 of file rtvlib.c.

References rtv_device_t::device, rtv_device_t::guide, rtv_device_info_t::ipaddr, MAX_RTVS, rtv_device_list_t::rtv, rtv_devices, rtv_free_device_info(), rtv_free_guide(), and x.

Referenced by ciFree(), and replaytv_device_update().

__u32 rtv_get_dbgmask void   ) 
 

Definition at line 106 of file rtvlib.c.

References rtv_globals_t::rtv_debug, and rtv_globals.

Referenced by ciSetDbgLevel().

rtv_device_t* rtv_get_device_struct const char *  ipaddr,
int *  new
 

Definition at line 38 of file rtvlib.c.

References rtv_device_t::device, rtv_device_info_t::ipaddr, MAX_RTVS, rtv_device_list_t::rtv, rtv_devices, and x.

Referenced by ciDeleteShow(), ciGetGuide(), ciGetPlayPosition(), ciHttpFsGetFile(), ciHttpFsListFiles(), ciHttpFsStatus(), ciHttpFsVolinfo(), rtv_get_device_info(), and server_process_connection().

void rtv_hex_dump char *  tag,
unsigned long  address,
unsigned char *  buf,
size_t  sz,
int  ascii_decode_bool
 

Definition at line 383 of file rtvlib.c.

References RTV_PRT.

Referenced by parse_show(), print_evt_recs(), and rtv_open_ndx_file().

int rtv_init_lib void   ) 
 

Definition at line 304 of file rtvlib.c.

References rtv_globals_t::discover_tmo, local_hostname, local_ip_address, rtv_globals_t::log_fd, rtv_globals_t::max_num_rtv, MAX_RTVS, rtv_globals_t::merge_chunk_sz, rtv_device_list_t::num_rtvs, rtv_device_list_t::rtv, rtv_globals_t::rtv_debug, RTV_DEVICE_5K, rtv_devices, rtv_globals_t::rtv_emulate_mode, RTV_ERRLOG, rtv_globals, and RTV_PRT.

Referenced by main(), and replaytv_init().

void rtv_print_device_list void   ) 
 

Definition at line 80 of file rtvlib.c.

References rtv_device_t::device, rtv_device_info_t::ipaddr, MAX_RTVS, rtv_device_info_t::modelNumber, rtv_device_info_t::name, rtv_device_list_t::num_rtvs, rtv_device_list_t::rtv, rtv_devices, RTV_PRT, and x.

Referenced by ciDeviceList(), ciDiscoverDevices(), and replaytv_device_update().

char* rtv_sec_to_hr_mn_str unsigned int  seconds  ) 
 

Definition at line 262 of file rtvlib.c.

Referenced by parse_show().

void rtv_set_32k_chunks_to_merge int  chunks  ) 
 

Definition at line 94 of file rtvlib.c.

References rtv_globals_t::merge_chunk_sz, and rtv_globals.

Referenced by replaytv_init().

void rtv_set_dbgmask __u32  mask  ) 
 

Definition at line 102 of file rtvlib.c.

References rtv_globals_t::rtv_debug, and rtv_globals.

Referenced by ciSetDbgLevel(), process_evt(), and replaytv_init().

int rtv_set_discover_options int  timeout,
int  maxnum_rtv,
rtv_vintage_t  dva_mode
 

Definition at line 114 of file rtvlib.c.

References rtv_globals_t::discover_tmo, rtv_globals_t::max_num_rtv, RTV_DEVICE_4K, rtv_globals_t::rtv_emulate_mode, rtv_globals, and RTV_PRT.

Referenced by replaytv_init().


Variable Documentation

char local_hostname[255] = "NoHostName"
 

Definition at line 31 of file rtvlib.c.

Referenced by rtv_init_lib(), and server_process_connection().

char local_ip_address[INET_ADDRSTRLEN] = ""
 

Definition at line 30 of file rtvlib.c.

Referenced by rtv_init_lib(), and server_process_connection().

rtv_device_list_t rtv_devices
 

Definition at line 34 of file rtvlib.c.

Referenced by replaytv_device_update(), rtv_discover(), rtv_free_devices(), rtv_get_device_info(), rtv_get_device_struct(), rtv_init_lib(), and rtv_print_device_list().


Generated on Wed Sep 8 03:13:23 2010 for mvpmc by  doxygen 1.4.6