xs/DVBT-init.c

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 28 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xs/DVBT-init-c.c ↑ Summary xs/DVBT-record.c »
1  
2  
3 # /*---------------------------------------------------------------------------------------------------*/
4  
5 HV *
6 dvb_device_probe(unsigned adap, unsigned fe, unsigned debug=0)
7  
8 INIT:
9  
10 struct devinfo *info ;
11  
12 HV *results ;
13  
14 CODE:
15  
16 /* get info */
17 0 info = dvb_probe_frontend(adap, fe, debug) ;
18  
19 0 ▶ if (info)
Branch: 1 branch
BranchTrueFalseTotal
if (info) 0 0 0
20 {
21 0 results = device_info_hv(info) ;
22  
23 /* free info */
24 0 free(info) ;
25 }
26 else
27 {
28 0 results = (HV *)sv_2mortal((SV *)newHV());
29 }
30  
31 0 RETVAL = results ;
32  
33 OUTPUT:
34 RETVAL
35  
36  
37  
38 # /*---------------------------------------------------------------------------------------------------*/
39  
40 SV *
41 dvb_device_names(DVB *dvb)
42 INIT:
43 HV * results;
44  
45 CODE:
46 0 results = (HV *)sv_2mortal((SV *)newHV());
47  
48 /* get device names from dvb struct */
49 0 HVS(results, fe_name, newSVpv(dvb->frontend, 0)) ;
50 0 HVS(results, demux_name, newSVpv(dvb->demux, 0)) ;
51 0 HVS(results, dvr_name, newSVpv(dvb->dvr, 0)) ;
52  
53 0 RETVAL = newRV((SV *)results);
54 OUTPUT:
55 RETVAL
56  
57  
58 # /*---------------------------------------------------------------------------------------------------*/
59  
60 DVB *
61 dvb_init(char *adapter, int frontend)
62 CODE:
63 0 RETVAL = dvb_init(adapter, frontend) ;
64 OUTPUT:
65 RETVAL
66  
67  
68 # /*---------------------------------------------------------------------------------------------------*/
69  
70 DVB *
71 dvb_init_nr(int adapter_num, int frontend_num)
72 CODE:
73 0 RETVAL = dvb_init_nr(adapter_num, frontend_num) ;
74 OUTPUT:
75 RETVAL
76  
77 # /*---------------------------------------------------------------------------------------------------*/
78  
79 void
80 dvb_fini(DVB *dvb);
81 CODE:
82 0 dvb_fini(dvb) ;
83  
84  
85 # /*---------------------------------------------------------------------------------------------------*/
86  
87 void
88 dvb_set_debug(int debug);
89 CODE:
90 0 dvb_debug = debug ;
91 0 DVBT_DEBUG = debug ;
92  
93 # /*---------------------------------------------------------------------------------------------------*/
94 # /* Return error string */
95  
96 SV *
97 dvb_error_str()
98 INIT:
99 SV *str;
100 char *error_str ;
101  
102 CODE:
103 0 error_str = dvb_error_str(dvb_error_code) ;
104 0 RETVAL = newSVpv(error_str, 0) ;
105  
106 OUTPUT:
107 RETVAL
108  
109 # /*---------------------------------------------------------------------------------------------------*/
110 # /* Get file flags */
111  
112 void
113 dvb_file_flags()
114  
115 CODE:
116 0 fprintf(stderr, "O_LARGEFILE 0x%08x\n", O_LARGEFILE) ;
117 0 fprintf(stderr, "O_WRONLY 0x%08x\n", O_WRONLY) ;
118 0 fprintf(stderr, "O_TRUNC 0x%08x\n", O_TRUNC) ;
119 0 fprintf(stderr, "O_CREAT 0x%08x\n", O_CREAT) ;
120  
121  
122 # /*---------------------------------------------------------------------------------------------------*/
123 # /* Get amount of free disk space for specified path */
124  
125 float
126 dvb_free_disk(char *path)
127  
128 INIT:
129 unsigned long long free_space ;
130  
131 CODE:
132 0 free_space = get_free_space(path) ;
133 //fprintf(stderr, "free_space(%s) %llu\n", path, free_space) ;
134 0 ▶ RETVAL = (float)free_space ;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = (float)free_space ; 0 0 0
135 //fprintf(stderr, " + space %.2f\n", RETVAL) ;
136  
137 OUTPUT:
138 RETVAL
139  
« xs/DVBT-init-c.c ↑ Summary xs/DVBT-record.c »