| 1 | /********************************* |
|---|
| 2 | * |
|---|
| 3 | * This file is autogenerated. Do not modify. |
|---|
| 4 | * |
|---|
| 5 | *********************************/ |
|---|
| 6 | bdisplay_t bdisplay_open( |
|---|
| 7 | bobject_t display_id |
|---|
| 8 | ) |
|---|
| 9 | { |
|---|
| 10 | int rc; |
|---|
| 11 | ioctl_settopapi_struct_bdisplay_open st; |
|---|
| 12 | st.display_id = display_id; |
|---|
| 13 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_open, (void*)&st); |
|---|
| 14 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 15 | return st.__retval; |
|---|
| 16 | } |
|---|
| 17 | |
|---|
| 18 | void bdisplay_close( |
|---|
| 19 | bdisplay_t display |
|---|
| 20 | ) |
|---|
| 21 | { |
|---|
| 22 | int rc; |
|---|
| 23 | ioctl_settopapi_struct_bdisplay_close st; |
|---|
| 24 | st.display = display; |
|---|
| 25 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_close, (void*)&st); |
|---|
| 26 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | bresult boutput_rf_set(boutput_rf_t rf, |
|---|
| 30 | const boutput_rf_settings *settings) |
|---|
| 31 | { |
|---|
| 32 | int rc; |
|---|
| 33 | ioctl_settopapi_struct_boutput_rf_set st; |
|---|
| 34 | st.rf = rf; |
|---|
| 35 | st.settings = settings; |
|---|
| 36 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_rf_set, (void*)&st); |
|---|
| 37 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 38 | return st.__retval; |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | void boutput_rf_get(boutput_rf_t rf, |
|---|
| 42 | boutput_rf_settings *settings |
|---|
| 43 | ) |
|---|
| 44 | { |
|---|
| 45 | int rc; |
|---|
| 46 | ioctl_settopapi_struct_boutput_rf_get st; |
|---|
| 47 | st.rf = rf; |
|---|
| 48 | st.settings = settings; |
|---|
| 49 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_rf_get, (void*)&st); |
|---|
| 50 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 51 | } |
|---|
| 52 | |
|---|
| 53 | bresult boutput_hdmi_set(boutput_hdmi_t dvi, |
|---|
| 54 | const boutput_hdmi_settings *settings) |
|---|
| 55 | { |
|---|
| 56 | int rc; |
|---|
| 57 | ioctl_settopapi_struct_boutput_hdmi_set st; |
|---|
| 58 | st.dvi = dvi; |
|---|
| 59 | st.settings = settings; |
|---|
| 60 | b_register_callback(ioctl_settopapi_boutput_dvi_settings_hdmi_hotplug_callback, (void*)dvi, settings->hdmi_hotplug_callback, (void*)settings->callback_context); |
|---|
| 61 | b_register_callback(ioctl_settopapi_boutput_dvi_settings_hdmi_disconnect_callback, (void*)dvi, settings->hdmi_disconnect_callback, (void*)settings->callback_context); |
|---|
| 62 | b_register_callback(ioctl_settopapi_boutput_dvi_settings_hdmi_hdcp_status_callback, (void*)dvi, settings->hdmi_hdcp_status_callback, (void*)settings->callback_context); |
|---|
| 63 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_set, (void*)&st); |
|---|
| 64 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 65 | return st.__retval; |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | void boutput_hdmi_get(boutput_hdmi_t dvi, |
|---|
| 69 | boutput_hdmi_settings *settings |
|---|
| 70 | ) |
|---|
| 71 | { |
|---|
| 72 | int rc; |
|---|
| 73 | ioctl_settopapi_struct_boutput_hdmi_get st; |
|---|
| 74 | st.dvi = dvi; |
|---|
| 75 | st.settings = settings; |
|---|
| 76 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_get, (void*)&st); |
|---|
| 77 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 78 | settings->hdmi_hotplug_callback = b_lookup_callback(ioctl_settopapi_boutput_dvi_settings_hdmi_hotplug_callback, (void*)dvi); |
|---|
| 79 | settings->hdmi_disconnect_callback = b_lookup_callback(ioctl_settopapi_boutput_dvi_settings_hdmi_disconnect_callback, (void*)dvi); |
|---|
| 80 | settings->hdmi_hdcp_status_callback = b_lookup_callback(ioctl_settopapi_boutput_dvi_settings_hdmi_hdcp_status_callback, (void*)dvi); |
|---|
| 81 | } |
|---|
| 82 | |
|---|
| 83 | bresult boutput_hdmi_get_capabilities(boutput_hdmi_t dvi, |
|---|
| 84 | boutput_hdmi_capabilities *caps |
|---|
| 85 | ) |
|---|
| 86 | { |
|---|
| 87 | int rc; |
|---|
| 88 | ioctl_settopapi_struct_boutput_hdmi_get_capabilities st; |
|---|
| 89 | st.dvi = dvi; |
|---|
| 90 | st.caps = caps; |
|---|
| 91 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_get_capabilities, (void*)&st); |
|---|
| 92 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 93 | return st.__retval; |
|---|
| 94 | } |
|---|
| 95 | |
|---|
| 96 | bresult boutput_hdmi_get_status(boutput_hdmi_t dvi, |
|---|
| 97 | boutput_hdmi_status *status |
|---|
| 98 | ) |
|---|
| 99 | { |
|---|
| 100 | int rc; |
|---|
| 101 | ioctl_settopapi_struct_boutput_hdmi_get_status st; |
|---|
| 102 | st.dvi = dvi; |
|---|
| 103 | st.status = status; |
|---|
| 104 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_get_status, (void*)&st); |
|---|
| 105 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 106 | return st.__retval; |
|---|
| 107 | } |
|---|
| 108 | |
|---|
| 109 | bresult boutput_hdmi_cec_get_message(boutput_hdmi_t dvi, |
|---|
| 110 | boutput_hdmi_cec_message_data *cec_message_data |
|---|
| 111 | ) |
|---|
| 112 | { |
|---|
| 113 | int rc; |
|---|
| 114 | ioctl_settopapi_struct_boutput_hdmi_cec_get_message st; |
|---|
| 115 | st.dvi = dvi; |
|---|
| 116 | st.cec_message_data = cec_message_data; |
|---|
| 117 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_cec_get_message, (void*)&st); |
|---|
| 118 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 119 | return st.__retval; |
|---|
| 120 | } |
|---|
| 121 | |
|---|
| 122 | bresult boutput_hdmi_cec_send_message(boutput_hdmi_t dvi, |
|---|
| 123 | const boutput_hdmi_cec_message_data *cec_message_data |
|---|
| 124 | ) |
|---|
| 125 | { |
|---|
| 126 | int rc; |
|---|
| 127 | ioctl_settopapi_struct_boutput_hdmi_cec_send_message st; |
|---|
| 128 | st.dvi = dvi; |
|---|
| 129 | st.cec_message_data = cec_message_data; |
|---|
| 130 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_cec_send_message, (void*)&st); |
|---|
| 131 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 132 | return st.__retval; |
|---|
| 133 | } |
|---|
| 134 | |
|---|
| 135 | bresult boutput_hdmi_cec_get_configuration(boutput_hdmi_t dvi, |
|---|
| 136 | boutput_hdmi_cec_configuration *cec_configuration |
|---|
| 137 | ) |
|---|
| 138 | { |
|---|
| 139 | int rc; |
|---|
| 140 | ioctl_settopapi_struct_boutput_hdmi_cec_get_configuration st; |
|---|
| 141 | st.dvi = dvi; |
|---|
| 142 | st.cec_configuration = cec_configuration; |
|---|
| 143 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_cec_get_configuration, (void*)&st); |
|---|
| 144 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 145 | return st.__retval; |
|---|
| 146 | } |
|---|
| 147 | |
|---|
| 148 | bool boutput_hdmi_cec_is_device_ready(boutput_hdmi_t dvi) |
|---|
| 149 | { |
|---|
| 150 | int rc; |
|---|
| 151 | ioctl_settopapi_struct_boutput_hdmi_cec_is_device_ready st; |
|---|
| 152 | st.dvi = dvi; |
|---|
| 153 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_cec_is_device_ready, (void*)&st); |
|---|
| 154 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 155 | return st.__retval; |
|---|
| 156 | } |
|---|
| 157 | |
|---|
| 158 | bresult boutput_hdmi_cec_enable_receive(boutput_hdmi_t dvi) |
|---|
| 159 | { |
|---|
| 160 | int rc; |
|---|
| 161 | ioctl_settopapi_struct_boutput_hdmi_cec_enable_receive st; |
|---|
| 162 | st.dvi = dvi; |
|---|
| 163 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_cec_enable_receive, (void*)&st); |
|---|
| 164 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 165 | return st.__retval; |
|---|
| 166 | } |
|---|
| 167 | |
|---|
| 168 | bresult boutput_component_set(boutput_component_t component, |
|---|
| 169 | const boutput_component_settings *settings) |
|---|
| 170 | { |
|---|
| 171 | int rc; |
|---|
| 172 | ioctl_settopapi_struct_boutput_component_set st; |
|---|
| 173 | st.component = component; |
|---|
| 174 | st.settings = settings; |
|---|
| 175 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_component_set, (void*)&st); |
|---|
| 176 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 177 | return st.__retval; |
|---|
| 178 | } |
|---|
| 179 | |
|---|
| 180 | void boutput_component_get(boutput_component_t component, |
|---|
| 181 | boutput_component_settings *settings |
|---|
| 182 | ) |
|---|
| 183 | { |
|---|
| 184 | int rc; |
|---|
| 185 | ioctl_settopapi_struct_boutput_component_get st; |
|---|
| 186 | st.component = component; |
|---|
| 187 | st.settings = settings; |
|---|
| 188 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_component_get, (void*)&st); |
|---|
| 189 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 190 | } |
|---|
| 191 | |
|---|
| 192 | bresult boutput_spdif_set(boutput_spdif_t spdif, |
|---|
| 193 | const boutput_spdif_settings *settings) |
|---|
| 194 | { |
|---|
| 195 | int rc; |
|---|
| 196 | ioctl_settopapi_struct_boutput_spdif_set st; |
|---|
| 197 | st.spdif = spdif; |
|---|
| 198 | st.settings = settings; |
|---|
| 199 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_spdif_set, (void*)&st); |
|---|
| 200 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 201 | return st.__retval; |
|---|
| 202 | } |
|---|
| 203 | |
|---|
| 204 | void boutput_spdif_get(boutput_spdif_t spdif, |
|---|
| 205 | boutput_spdif_settings *settings |
|---|
| 206 | ) |
|---|
| 207 | { |
|---|
| 208 | int rc; |
|---|
| 209 | ioctl_settopapi_struct_boutput_spdif_get st; |
|---|
| 210 | st.spdif = spdif; |
|---|
| 211 | st.settings = settings; |
|---|
| 212 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_spdif_get, (void*)&st); |
|---|
| 213 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 214 | } |
|---|
| 215 | |
|---|
| 216 | boutput_spdif_t |
|---|
| 217 | boutput_spdif_open(bobject_t spdif_id) |
|---|
| 218 | { |
|---|
| 219 | int rc; |
|---|
| 220 | ioctl_settopapi_struct_boutput_spdif_open st; |
|---|
| 221 | st.spdif_id = spdif_id; |
|---|
| 222 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_spdif_open, (void*)&st); |
|---|
| 223 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 224 | return st.__retval; |
|---|
| 225 | } |
|---|
| 226 | |
|---|
| 227 | boutput_rf_t |
|---|
| 228 | boutput_rf_open(bobject_t rfmod_id) |
|---|
| 229 | { |
|---|
| 230 | int rc; |
|---|
| 231 | ioctl_settopapi_struct_boutput_rf_open st; |
|---|
| 232 | st.rfmod_id = rfmod_id; |
|---|
| 233 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_rf_open, (void*)&st); |
|---|
| 234 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 235 | return st.__retval; |
|---|
| 236 | } |
|---|
| 237 | |
|---|
| 238 | boutput_composite_t |
|---|
| 239 | boutput_composite_open(bobject_t composite_id) |
|---|
| 240 | { |
|---|
| 241 | int rc; |
|---|
| 242 | ioctl_settopapi_struct_boutput_composite_open st; |
|---|
| 243 | st.composite_id = composite_id; |
|---|
| 244 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_composite_open, (void*)&st); |
|---|
| 245 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 246 | return st.__retval; |
|---|
| 247 | } |
|---|
| 248 | |
|---|
| 249 | boutput_svideo_t |
|---|
| 250 | boutput_svideo_open(bobject_t svideo_id) |
|---|
| 251 | { |
|---|
| 252 | int rc; |
|---|
| 253 | ioctl_settopapi_struct_boutput_svideo_open st; |
|---|
| 254 | st.svideo_id = svideo_id; |
|---|
| 255 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_svideo_open, (void*)&st); |
|---|
| 256 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 257 | return st.__retval; |
|---|
| 258 | } |
|---|
| 259 | |
|---|
| 260 | boutput_hdmi_t |
|---|
| 261 | boutput_hdmi_open(bobject_t dvi_id) |
|---|
| 262 | { |
|---|
| 263 | int rc; |
|---|
| 264 | ioctl_settopapi_struct_boutput_hdmi_open st; |
|---|
| 265 | st.dvi_id = dvi_id; |
|---|
| 266 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_hdmi_open, (void*)&st); |
|---|
| 267 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 268 | return st.__retval; |
|---|
| 269 | } |
|---|
| 270 | |
|---|
| 271 | boutput_component_t |
|---|
| 272 | boutput_component_open(bobject_t component_id) |
|---|
| 273 | { |
|---|
| 274 | int rc; |
|---|
| 275 | ioctl_settopapi_struct_boutput_component_open st; |
|---|
| 276 | st.component_id = component_id; |
|---|
| 277 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_component_open, (void*)&st); |
|---|
| 278 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 279 | return st.__retval; |
|---|
| 280 | } |
|---|
| 281 | |
|---|
| 282 | void bdisplay_get_video_format_settings( |
|---|
| 283 | const bdisplay_settings *settings, |
|---|
| 284 | bvideo_format_settings *format_settings |
|---|
| 285 | ) |
|---|
| 286 | { |
|---|
| 287 | int rc; |
|---|
| 288 | ioctl_settopapi_struct_bdisplay_get_video_format_settings st; |
|---|
| 289 | st.settings = settings; |
|---|
| 290 | st.format_settings = format_settings; |
|---|
| 291 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_get_video_format_settings, (void*)&st); |
|---|
| 292 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 293 | } |
|---|
| 294 | |
|---|
| 295 | void bvideo_get_format_settings( |
|---|
| 296 | bvideo_format format, |
|---|
| 297 | bvideo_format_settings *settings |
|---|
| 298 | ) |
|---|
| 299 | { |
|---|
| 300 | int rc; |
|---|
| 301 | ioctl_settopapi_struct_bvideo_get_format_settings st; |
|---|
| 302 | st.format = format; |
|---|
| 303 | st.settings = settings; |
|---|
| 304 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bvideo_get_format_settings, (void*)&st); |
|---|
| 305 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 306 | } |
|---|
| 307 | |
|---|
| 308 | bresult |
|---|
| 309 | bdisplay_set( |
|---|
| 310 | bdisplay_t display, |
|---|
| 311 | const bdisplay_settings *settings |
|---|
| 312 | ) |
|---|
| 313 | { |
|---|
| 314 | int rc; |
|---|
| 315 | ioctl_settopapi_struct_bdisplay_set st; |
|---|
| 316 | st.display = display; |
|---|
| 317 | st.settings = settings; |
|---|
| 318 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_set, (void*)&st); |
|---|
| 319 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 320 | return st.__retval; |
|---|
| 321 | } |
|---|
| 322 | |
|---|
| 323 | void |
|---|
| 324 | bdisplay_get( |
|---|
| 325 | bdisplay_t display, |
|---|
| 326 | bdisplay_settings *settings |
|---|
| 327 | ) |
|---|
| 328 | { |
|---|
| 329 | int rc; |
|---|
| 330 | ioctl_settopapi_struct_bdisplay_get st; |
|---|
| 331 | st.display = display; |
|---|
| 332 | st.settings = settings; |
|---|
| 333 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_get, (void*)&st); |
|---|
| 334 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 335 | } |
|---|
| 336 | |
|---|
| 337 | bdecode_window_t bdecode_window_open( |
|---|
| 338 | bobject_t window_id, |
|---|
| 339 | bdisplay_t display |
|---|
| 340 | ) |
|---|
| 341 | { |
|---|
| 342 | int rc; |
|---|
| 343 | ioctl_settopapi_struct_bdecode_window_open st; |
|---|
| 344 | st.window_id = window_id; |
|---|
| 345 | st.display = display; |
|---|
| 346 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_window_open, (void*)&st); |
|---|
| 347 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 348 | return st.__retval; |
|---|
| 349 | } |
|---|
| 350 | |
|---|
| 351 | bdecode_window_t bdecode_window_open_mosaic( |
|---|
| 352 | bdecode_window_t parent_window, |
|---|
| 353 | bobject_t mosaic_id |
|---|
| 354 | ) |
|---|
| 355 | { |
|---|
| 356 | int rc; |
|---|
| 357 | ioctl_settopapi_struct_bdecode_window_open_mosaic st; |
|---|
| 358 | st.parent_window = parent_window; |
|---|
| 359 | st.mosaic_id = mosaic_id; |
|---|
| 360 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_window_open_mosaic, (void*)&st); |
|---|
| 361 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 362 | return st.__retval; |
|---|
| 363 | } |
|---|
| 364 | |
|---|
| 365 | void |
|---|
| 366 | bdecode_window_close( |
|---|
| 367 | bdecode_window_t window |
|---|
| 368 | ) |
|---|
| 369 | { |
|---|
| 370 | int rc; |
|---|
| 371 | ioctl_settopapi_struct_bdecode_window_close st; |
|---|
| 372 | st.window = window; |
|---|
| 373 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_window_close, (void*)&st); |
|---|
| 374 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 375 | } |
|---|
| 376 | |
|---|
| 377 | bdecode_window_t bdecode_window_clone( |
|---|
| 378 | bdecode_window_t window, |
|---|
| 379 | bobject_t clone_window_id, |
|---|
| 380 | bdisplay_t display |
|---|
| 381 | ) |
|---|
| 382 | { |
|---|
| 383 | int rc; |
|---|
| 384 | ioctl_settopapi_struct_bdecode_window_clone st; |
|---|
| 385 | st.window = window; |
|---|
| 386 | st.clone_window_id = clone_window_id; |
|---|
| 387 | st.display = display; |
|---|
| 388 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_window_clone, (void*)&st); |
|---|
| 389 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 390 | return st.__retval; |
|---|
| 391 | } |
|---|
| 392 | |
|---|
| 393 | bresult bdisplay_set_dac_audio_volume( |
|---|
| 394 | bdisplay_t display, |
|---|
| 395 | const baudio_volume *volume |
|---|
| 396 | ) |
|---|
| 397 | { |
|---|
| 398 | int rc; |
|---|
| 399 | ioctl_settopapi_struct_bdisplay_set_dac_audio_volume st; |
|---|
| 400 | st.display = display; |
|---|
| 401 | st.volume = volume; |
|---|
| 402 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_set_dac_audio_volume, (void*)&st); |
|---|
| 403 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 404 | return st.__retval; |
|---|
| 405 | } |
|---|
| 406 | |
|---|
| 407 | bresult bdisplay_get_dac_audio_volume( |
|---|
| 408 | bdisplay_t display, |
|---|
| 409 | baudio_volume *volume |
|---|
| 410 | ) |
|---|
| 411 | { |
|---|
| 412 | int rc; |
|---|
| 413 | ioctl_settopapi_struct_bdisplay_get_dac_audio_volume st; |
|---|
| 414 | st.display = display; |
|---|
| 415 | st.volume = volume; |
|---|
| 416 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_get_dac_audio_volume, (void*)&st); |
|---|
| 417 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 418 | return st.__retval; |
|---|
| 419 | } |
|---|
| 420 | |
|---|
| 421 | bresult boutput_rf_set_audio_volume( |
|---|
| 422 | boutput_rf_t rf, |
|---|
| 423 | const baudio_volume *volume |
|---|
| 424 | ) |
|---|
| 425 | { |
|---|
| 426 | int rc; |
|---|
| 427 | ioctl_settopapi_struct_boutput_rf_set_audio_volume st; |
|---|
| 428 | st.rf = rf; |
|---|
| 429 | st.volume = volume; |
|---|
| 430 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_rf_set_audio_volume, (void*)&st); |
|---|
| 431 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 432 | return st.__retval; |
|---|
| 433 | } |
|---|
| 434 | |
|---|
| 435 | bresult boutput_spdif_set_audio_volume( |
|---|
| 436 | boutput_spdif_t spdif, |
|---|
| 437 | const baudio_volume *volume |
|---|
| 438 | ) |
|---|
| 439 | { |
|---|
| 440 | int rc; |
|---|
| 441 | ioctl_settopapi_struct_boutput_spdif_set_audio_volume st; |
|---|
| 442 | st.spdif = spdif; |
|---|
| 443 | st.volume = volume; |
|---|
| 444 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_spdif_set_audio_volume, (void*)&st); |
|---|
| 445 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 446 | return st.__retval; |
|---|
| 447 | } |
|---|
| 448 | |
|---|
| 449 | bresult boutput_spdif_get_audio_volume( |
|---|
| 450 | boutput_spdif_t spdif, |
|---|
| 451 | baudio_volume *volume |
|---|
| 452 | ) |
|---|
| 453 | { |
|---|
| 454 | int rc; |
|---|
| 455 | ioctl_settopapi_struct_boutput_spdif_get_audio_volume st; |
|---|
| 456 | st.spdif = spdif; |
|---|
| 457 | st.volume = volume; |
|---|
| 458 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_spdif_get_audio_volume, (void*)&st); |
|---|
| 459 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 460 | return st.__retval; |
|---|
| 461 | } |
|---|
| 462 | |
|---|
| 463 | bresult boutput_rf_get_audio_volume( |
|---|
| 464 | boutput_rf_t rf, |
|---|
| 465 | baudio_volume *volume |
|---|
| 466 | ) |
|---|
| 467 | { |
|---|
| 468 | int rc; |
|---|
| 469 | ioctl_settopapi_struct_boutput_rf_get_audio_volume st; |
|---|
| 470 | st.rf = rf; |
|---|
| 471 | st.volume = volume; |
|---|
| 472 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_boutput_rf_get_audio_volume, (void*)&st); |
|---|
| 473 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 474 | return st.__retval; |
|---|
| 475 | } |
|---|
| 476 | |
|---|
| 477 | bresult bdecode_window_get( |
|---|
| 478 | bdecode_window_t window, |
|---|
| 479 | bdecode_window_settings *settings |
|---|
| 480 | ) |
|---|
| 481 | { |
|---|
| 482 | int rc; |
|---|
| 483 | ioctl_settopapi_struct_bdecode_window_get st; |
|---|
| 484 | st.window = window; |
|---|
| 485 | st.settings = settings; |
|---|
| 486 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_window_get, (void*)&st); |
|---|
| 487 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 488 | return st.__retval; |
|---|
| 489 | } |
|---|
| 490 | |
|---|
| 491 | bresult bdecode_window_set( |
|---|
| 492 | bdecode_window_t window, |
|---|
| 493 | const bdecode_window_settings *settings |
|---|
| 494 | ) |
|---|
| 495 | { |
|---|
| 496 | int rc; |
|---|
| 497 | ioctl_settopapi_struct_bdecode_window_set st; |
|---|
| 498 | st.window = window; |
|---|
| 499 | st.settings = settings; |
|---|
| 500 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_window_set, (void*)&st); |
|---|
| 501 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 502 | return st.__retval; |
|---|
| 503 | } |
|---|
| 504 | |
|---|
| 505 | bmessage_stream_t bmessage_open( |
|---|
| 506 | bmessage_format format |
|---|
| 507 | ) |
|---|
| 508 | { |
|---|
| 509 | int rc; |
|---|
| 510 | ioctl_settopapi_struct_bmessage_open st; |
|---|
| 511 | st.format = format; |
|---|
| 512 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmessage_open, (void*)&st); |
|---|
| 513 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 514 | return st.__retval; |
|---|
| 515 | } |
|---|
| 516 | |
|---|
| 517 | void bmessage_stream_params_init( |
|---|
| 518 | bmessage_stream_params *params, |
|---|
| 519 | bmessage_stream_t stream) |
|---|
| 520 | { |
|---|
| 521 | int rc; |
|---|
| 522 | ioctl_settopapi_struct_bmessage_stream_params_init st; |
|---|
| 523 | st.params = params; |
|---|
| 524 | st.stream = stream; |
|---|
| 525 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmessage_stream_params_init, (void*)&st); |
|---|
| 526 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 527 | } |
|---|
| 528 | |
|---|
| 529 | bresult bmessage_start( |
|---|
| 530 | bmessage_stream_t message_stream, |
|---|
| 531 | const bmessage_stream_params *params |
|---|
| 532 | ) |
|---|
| 533 | { |
|---|
| 534 | int rc; |
|---|
| 535 | ioctl_settopapi_struct_bmessage_start st; |
|---|
| 536 | st.message_stream = message_stream; |
|---|
| 537 | st.params = params; |
|---|
| 538 | b_register_callback(ioctl_settopapi_bmessage_data_ready_callback, (void*)message_stream, params->data_ready_callback, (void*)params->callback_context); |
|---|
| 539 | b_register_callback(ioctl_settopapi_bmessage_overflow_callback, (void*)message_stream, params->overflow, (void*)params->callback_context); |
|---|
| 540 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmessage_start, (void*)&st); |
|---|
| 541 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 542 | return st.__retval; |
|---|
| 543 | } |
|---|
| 544 | |
|---|
| 545 | bresult bmessage_get_buffer( |
|---|
| 546 | bmessage_stream_t message_stream, |
|---|
| 547 | const void ** p_bfr, |
|---|
| 548 | size_t *length |
|---|
| 549 | ) |
|---|
| 550 | { |
|---|
| 551 | int rc; |
|---|
| 552 | ioctl_settopapi_struct_bmessage_get_buffer st; |
|---|
| 553 | st.message_stream = message_stream; |
|---|
| 554 | st.p_bfr = p_bfr; |
|---|
| 555 | st.length = length; |
|---|
| 556 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmessage_get_buffer, (void*)&st); |
|---|
| 557 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 558 | if (!st.__retval) { |
|---|
| 559 | *st.p_bfr = b_kernel2user((unsigned long)*st.p_bfr, true); |
|---|
| 560 | } |
|---|
| 561 | return st.__retval; |
|---|
| 562 | } |
|---|
| 563 | |
|---|
| 564 | bresult bmessage_read_complete( |
|---|
| 565 | bmessage_stream_t message_stream, |
|---|
| 566 | size_t amount_consumed |
|---|
| 567 | ) |
|---|
| 568 | { |
|---|
| 569 | int rc; |
|---|
| 570 | ioctl_settopapi_struct_bmessage_read_complete st; |
|---|
| 571 | st.message_stream = message_stream; |
|---|
| 572 | st.amount_consumed = amount_consumed; |
|---|
| 573 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmessage_read_complete, (void*)&st); |
|---|
| 574 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 575 | return st.__retval; |
|---|
| 576 | } |
|---|
| 577 | |
|---|
| 578 | void bmessage_stop( |
|---|
| 579 | bmessage_stream_t message_stream |
|---|
| 580 | ) |
|---|
| 581 | { |
|---|
| 582 | int rc; |
|---|
| 583 | ioctl_settopapi_struct_bmessage_stop st; |
|---|
| 584 | st.message_stream = message_stream; |
|---|
| 585 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmessage_stop, (void*)&st); |
|---|
| 586 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 587 | } |
|---|
| 588 | |
|---|
| 589 | void bmessage_close( |
|---|
| 590 | bmessage_stream_t message_stream |
|---|
| 591 | ) |
|---|
| 592 | { |
|---|
| 593 | int rc; |
|---|
| 594 | ioctl_settopapi_struct_bmessage_close st; |
|---|
| 595 | st.message_stream = message_stream; |
|---|
| 596 | b_unregister_callback(ioctl_settopapi_bmessage_data_ready_callback, (void*)message_stream); |
|---|
| 597 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)message_stream); |
|---|
| 598 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 599 | b_unregister_callback(ioctl_settopapi_bmessage_overflow_callback, (void*)message_stream); |
|---|
| 600 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)message_stream); |
|---|
| 601 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 602 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmessage_close, (void*)&st); |
|---|
| 603 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 604 | } |
|---|
| 605 | |
|---|
| 606 | void brecpump_get_open_params( |
|---|
| 607 | bobject_t id, |
|---|
| 608 | brecpump_open_params *open_params |
|---|
| 609 | ) |
|---|
| 610 | { |
|---|
| 611 | int rc; |
|---|
| 612 | ioctl_settopapi_struct_brecpump_get_open_params st; |
|---|
| 613 | st.id = id; |
|---|
| 614 | st.open_params = open_params; |
|---|
| 615 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_get_open_params, (void*)&st); |
|---|
| 616 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 617 | } |
|---|
| 618 | |
|---|
| 619 | brecpump_t brecpump_open( |
|---|
| 620 | bobject_t id, |
|---|
| 621 | const brecpump_open_params *open_params |
|---|
| 622 | ) |
|---|
| 623 | { |
|---|
| 624 | int rc; |
|---|
| 625 | ioctl_settopapi_struct_brecpump_open st; |
|---|
| 626 | st.id = id; |
|---|
| 627 | st.open_params = open_params; |
|---|
| 628 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_open, (void*)&st); |
|---|
| 629 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 630 | return st.__retval; |
|---|
| 631 | } |
|---|
| 632 | |
|---|
| 633 | void brecpump_close(brecpump_t recpump) |
|---|
| 634 | { |
|---|
| 635 | int rc; |
|---|
| 636 | ioctl_settopapi_struct_brecpump_close st; |
|---|
| 637 | st.recpump = recpump; |
|---|
| 638 | b_unregister_callback(ioctl_settopapi_brecpump_data_write_callback, (void*)recpump); |
|---|
| 639 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)recpump); |
|---|
| 640 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 641 | b_unregister_callback(ioctl_settopapi_brecpump_index_write_callback, (void*)recpump); |
|---|
| 642 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)recpump); |
|---|
| 643 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 644 | b_unregister_callback(ioctl_settopapi_brecpump_overflow_callback, (void*)recpump); |
|---|
| 645 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)recpump); |
|---|
| 646 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 647 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_close, (void*)&st); |
|---|
| 648 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 649 | } |
|---|
| 650 | |
|---|
| 651 | void brecpump_params_init( |
|---|
| 652 | brecpump_params *params, |
|---|
| 653 | brecpump_t recpump |
|---|
| 654 | ) |
|---|
| 655 | { |
|---|
| 656 | int rc; |
|---|
| 657 | ioctl_settopapi_struct_brecpump_params_init st; |
|---|
| 658 | st.params = params; |
|---|
| 659 | st.recpump = recpump; |
|---|
| 660 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_params_init, (void*)&st); |
|---|
| 661 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 662 | } |
|---|
| 663 | |
|---|
| 664 | bresult brecpump_start( |
|---|
| 665 | brecpump_t recpump, |
|---|
| 666 | bstream_t stream, |
|---|
| 667 | const brecpump_params *params |
|---|
| 668 | ) |
|---|
| 669 | { |
|---|
| 670 | int rc; |
|---|
| 671 | ioctl_settopapi_struct_brecpump_start st; |
|---|
| 672 | st.recpump = recpump; |
|---|
| 673 | st.stream = stream; |
|---|
| 674 | st.params = params; |
|---|
| 675 | b_register_callback(ioctl_settopapi_brecpump_data_write_callback, (void*)recpump, params->data_write_callback, (void*)params->callback_context); |
|---|
| 676 | b_register_callback(ioctl_settopapi_brecpump_index_write_callback, (void*)recpump, params->index_write_callback, (void*)params->callback_context); |
|---|
| 677 | b_register_callback(ioctl_settopapi_brecpump_overflow_callback, (void*)recpump, params->overflow, (void*)params->callback_context); |
|---|
| 678 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_start, (void*)&st); |
|---|
| 679 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 680 | return st.__retval; |
|---|
| 681 | } |
|---|
| 682 | |
|---|
| 683 | bresult brecpump_stop( |
|---|
| 684 | brecpump_t recpump |
|---|
| 685 | ) |
|---|
| 686 | { |
|---|
| 687 | int rc; |
|---|
| 688 | ioctl_settopapi_struct_brecpump_stop st; |
|---|
| 689 | st.recpump = recpump; |
|---|
| 690 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_stop, (void*)&st); |
|---|
| 691 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 692 | return st.__retval; |
|---|
| 693 | } |
|---|
| 694 | |
|---|
| 695 | void brecpump_immediate_stop( |
|---|
| 696 | brecpump_t recpump |
|---|
| 697 | ) |
|---|
| 698 | { |
|---|
| 699 | int rc; |
|---|
| 700 | ioctl_settopapi_struct_brecpump_immediate_stop st; |
|---|
| 701 | st.recpump = recpump; |
|---|
| 702 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_immediate_stop, (void*)&st); |
|---|
| 703 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 704 | } |
|---|
| 705 | |
|---|
| 706 | bresult brecpump_data_get_buffer( |
|---|
| 707 | brecpump_t recpump, |
|---|
| 708 | const void **buffer, |
|---|
| 709 | size_t *buffer_size |
|---|
| 710 | ) |
|---|
| 711 | { |
|---|
| 712 | int rc; |
|---|
| 713 | ioctl_settopapi_struct_brecpump_data_get_buffer st; |
|---|
| 714 | st.recpump = recpump; |
|---|
| 715 | st.buffer = buffer; |
|---|
| 716 | st.buffer_size = buffer_size; |
|---|
| 717 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_data_get_buffer, (void*)&st); |
|---|
| 718 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 719 | if (!st.__retval) { |
|---|
| 720 | *st.buffer = b_kernel2user((unsigned long)*st.buffer, true); |
|---|
| 721 | } |
|---|
| 722 | return st.__retval; |
|---|
| 723 | } |
|---|
| 724 | |
|---|
| 725 | bresult brecpump_index_get_buffer( |
|---|
| 726 | brecpump_t recpump, |
|---|
| 727 | const void **buffer, |
|---|
| 728 | size_t *buffer_size |
|---|
| 729 | ) |
|---|
| 730 | { |
|---|
| 731 | int rc; |
|---|
| 732 | ioctl_settopapi_struct_brecpump_index_get_buffer st; |
|---|
| 733 | st.recpump = recpump; |
|---|
| 734 | st.buffer = buffer; |
|---|
| 735 | st.buffer_size = buffer_size; |
|---|
| 736 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_index_get_buffer, (void*)&st); |
|---|
| 737 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 738 | if (!st.__retval) { |
|---|
| 739 | *st.buffer = b_kernel2user((unsigned long)*st.buffer, true); |
|---|
| 740 | } |
|---|
| 741 | return st.__retval; |
|---|
| 742 | } |
|---|
| 743 | |
|---|
| 744 | bresult brecpump_data_write_complete( |
|---|
| 745 | brecpump_t recpump, |
|---|
| 746 | size_t amount_written |
|---|
| 747 | ) |
|---|
| 748 | { |
|---|
| 749 | int rc; |
|---|
| 750 | ioctl_settopapi_struct_brecpump_data_write_complete st; |
|---|
| 751 | st.recpump = recpump; |
|---|
| 752 | st.amount_written = amount_written; |
|---|
| 753 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_data_write_complete, (void*)&st); |
|---|
| 754 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 755 | return st.__retval; |
|---|
| 756 | } |
|---|
| 757 | |
|---|
| 758 | bresult brecpump_index_write_complete( |
|---|
| 759 | brecpump_t recpump, |
|---|
| 760 | size_t amount_written |
|---|
| 761 | ) |
|---|
| 762 | { |
|---|
| 763 | int rc; |
|---|
| 764 | ioctl_settopapi_struct_brecpump_index_write_complete st; |
|---|
| 765 | st.recpump = recpump; |
|---|
| 766 | st.amount_written = amount_written; |
|---|
| 767 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_index_write_complete, (void*)&st); |
|---|
| 768 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 769 | return st.__retval; |
|---|
| 770 | } |
|---|
| 771 | |
|---|
| 772 | void brecpump_get_status( |
|---|
| 773 | brecpump_t recpump, |
|---|
| 774 | brecpump_status *status |
|---|
| 775 | ) |
|---|
| 776 | { |
|---|
| 777 | int rc; |
|---|
| 778 | ioctl_settopapi_struct_brecpump_get_status st; |
|---|
| 779 | st.recpump = recpump; |
|---|
| 780 | st.status = status; |
|---|
| 781 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_brecpump_get_status, (void*)&st); |
|---|
| 782 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 783 | } |
|---|
| 784 | |
|---|
| 785 | bcipher_t bcipher_open( |
|---|
| 786 | bobject_t id |
|---|
| 787 | ) |
|---|
| 788 | { |
|---|
| 789 | int rc; |
|---|
| 790 | ioctl_settopapi_struct_bcipher_open st; |
|---|
| 791 | st.id = id; |
|---|
| 792 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcipher_open, (void*)&st); |
|---|
| 793 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 794 | return st.__retval; |
|---|
| 795 | } |
|---|
| 796 | |
|---|
| 797 | void bcipher_close(bcipher_t encrypt) |
|---|
| 798 | { |
|---|
| 799 | int rc; |
|---|
| 800 | ioctl_settopapi_struct_bcipher_close st; |
|---|
| 801 | st.encrypt = encrypt; |
|---|
| 802 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcipher_close, (void*)&st); |
|---|
| 803 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 804 | } |
|---|
| 805 | |
|---|
| 806 | void bcipher_settings_init( |
|---|
| 807 | bcipher_settings *settings, |
|---|
| 808 | bcipher_t cipher |
|---|
| 809 | ) |
|---|
| 810 | { |
|---|
| 811 | int rc; |
|---|
| 812 | ioctl_settopapi_struct_bcipher_settings_init st; |
|---|
| 813 | st.settings = settings; |
|---|
| 814 | st.cipher = cipher; |
|---|
| 815 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcipher_settings_init, (void*)&st); |
|---|
| 816 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 817 | } |
|---|
| 818 | |
|---|
| 819 | bresult |
|---|
| 820 | bcipher_convert_data( |
|---|
| 821 | bcipher_t handle, |
|---|
| 822 | void *dest , |
|---|
| 823 | const void *source , |
|---|
| 824 | size_t datalen, |
|---|
| 825 | const bcipher_settings *settings |
|---|
| 826 | ) |
|---|
| 827 | { |
|---|
| 828 | int rc; |
|---|
| 829 | ioctl_settopapi_struct_bcipher_convert_data st; |
|---|
| 830 | st.handle = handle; |
|---|
| 831 | st.dest = dest; |
|---|
| 832 | st.source = source; |
|---|
| 833 | st.datalen = datalen; |
|---|
| 834 | st.settings = settings; |
|---|
| 835 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcipher_convert_data, (void*)&st); |
|---|
| 836 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 837 | return st.__retval; |
|---|
| 838 | } |
|---|
| 839 | |
|---|
| 840 | bencode_t bencode_open( |
|---|
| 841 | bobject_t id |
|---|
| 842 | ) |
|---|
| 843 | { |
|---|
| 844 | int rc; |
|---|
| 845 | ioctl_settopapi_struct_bencode_open st; |
|---|
| 846 | st.id = id; |
|---|
| 847 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bencode_open, (void*)&st); |
|---|
| 848 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 849 | return st.__retval; |
|---|
| 850 | } |
|---|
| 851 | |
|---|
| 852 | void bencode_close( |
|---|
| 853 | bencode_t encode |
|---|
| 854 | ) |
|---|
| 855 | { |
|---|
| 856 | int rc; |
|---|
| 857 | ioctl_settopapi_struct_bencode_close st; |
|---|
| 858 | st.encode = encode; |
|---|
| 859 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bencode_close, (void*)&st); |
|---|
| 860 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 861 | } |
|---|
| 862 | |
|---|
| 863 | void bencode_extended_settings_init( |
|---|
| 864 | bencode_settings *settings, |
|---|
| 865 | bencode_quality quality, |
|---|
| 866 | bencode_t encode, |
|---|
| 867 | bencode_vpp_mode vpp_mode |
|---|
| 868 | ) |
|---|
| 869 | { |
|---|
| 870 | int rc; |
|---|
| 871 | ioctl_settopapi_struct_bencode_extended_settings_init st; |
|---|
| 872 | st.settings = settings; |
|---|
| 873 | st.quality = quality; |
|---|
| 874 | st.encode = encode; |
|---|
| 875 | st.vpp_mode = vpp_mode; |
|---|
| 876 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bencode_extended_settings_init, (void*)&st); |
|---|
| 877 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 878 | } |
|---|
| 879 | |
|---|
| 880 | void bencode_settings_init( |
|---|
| 881 | bencode_settings *settings, |
|---|
| 882 | bencode_quality quality, |
|---|
| 883 | bencode_t encode |
|---|
| 884 | ) |
|---|
| 885 | { |
|---|
| 886 | int rc; |
|---|
| 887 | ioctl_settopapi_struct_bencode_settings_init st; |
|---|
| 888 | st.settings = settings; |
|---|
| 889 | st.quality = quality; |
|---|
| 890 | st.encode = encode; |
|---|
| 891 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bencode_settings_init, (void*)&st); |
|---|
| 892 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 893 | } |
|---|
| 894 | |
|---|
| 895 | bstream_t bencode_start( |
|---|
| 896 | bencode_t encode, |
|---|
| 897 | bstream_t stream, |
|---|
| 898 | const bencode_settings *settings |
|---|
| 899 | ) |
|---|
| 900 | { |
|---|
| 901 | int rc; |
|---|
| 902 | ioctl_settopapi_struct_bencode_start st; |
|---|
| 903 | st.encode = encode; |
|---|
| 904 | st.stream = stream; |
|---|
| 905 | st.settings = settings; |
|---|
| 906 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bencode_start, (void*)&st); |
|---|
| 907 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 908 | return st.__retval; |
|---|
| 909 | } |
|---|
| 910 | |
|---|
| 911 | void bencode_stop( |
|---|
| 912 | bencode_t encode, |
|---|
| 913 | bstream_t stream |
|---|
| 914 | ) |
|---|
| 915 | { |
|---|
| 916 | int rc; |
|---|
| 917 | ioctl_settopapi_struct_bencode_stop st; |
|---|
| 918 | st.encode = encode; |
|---|
| 919 | st.stream = stream; |
|---|
| 920 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bencode_stop, (void*)&st); |
|---|
| 921 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 922 | } |
|---|
| 923 | |
|---|
| 924 | void bpcm_play_settings_init( |
|---|
| 925 | bpcm_play_settings *settings, |
|---|
| 926 | bpcm_play_t pcmplay |
|---|
| 927 | ) |
|---|
| 928 | { |
|---|
| 929 | int rc; |
|---|
| 930 | ioctl_settopapi_struct_bpcm_play_settings_init st; |
|---|
| 931 | st.settings = settings; |
|---|
| 932 | st.pcmplay = pcmplay; |
|---|
| 933 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_settings_init, (void*)&st); |
|---|
| 934 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 935 | } |
|---|
| 936 | |
|---|
| 937 | bpcm_play_t bpcm_play_open( |
|---|
| 938 | bobject_t id |
|---|
| 939 | ) |
|---|
| 940 | { |
|---|
| 941 | int rc; |
|---|
| 942 | ioctl_settopapi_struct_bpcm_play_open st; |
|---|
| 943 | st.id = id; |
|---|
| 944 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_open, (void*)&st); |
|---|
| 945 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 946 | return st.__retval; |
|---|
| 947 | } |
|---|
| 948 | |
|---|
| 949 | void bpcm_play_close( |
|---|
| 950 | bpcm_play_t pcmplay |
|---|
| 951 | ) |
|---|
| 952 | { |
|---|
| 953 | int rc; |
|---|
| 954 | ioctl_settopapi_struct_bpcm_play_close st; |
|---|
| 955 | st.pcmplay = pcmplay; |
|---|
| 956 | b_unregister_callback(ioctl_settopapi_bpcm_play_callback, (void*)pcmplay); |
|---|
| 957 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)pcmplay); |
|---|
| 958 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 959 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_close, (void*)&st); |
|---|
| 960 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 961 | } |
|---|
| 962 | |
|---|
| 963 | bresult bpcm_play_start( |
|---|
| 964 | bpcm_play_t pcmplay, |
|---|
| 965 | bdisplay_t display, |
|---|
| 966 | const bpcm_play_settings *settings |
|---|
| 967 | ) |
|---|
| 968 | { |
|---|
| 969 | int rc; |
|---|
| 970 | ioctl_settopapi_struct_bpcm_play_start st; |
|---|
| 971 | st.pcmplay = pcmplay; |
|---|
| 972 | st.display = display; |
|---|
| 973 | st.settings = settings; |
|---|
| 974 | b_register_callback(ioctl_settopapi_bpcm_play_callback, (void*)pcmplay, settings->callback, (void*)settings->callback_context); |
|---|
| 975 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_start, (void*)&st); |
|---|
| 976 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 977 | return st.__retval; |
|---|
| 978 | } |
|---|
| 979 | |
|---|
| 980 | bresult bpcm_play_get_status( |
|---|
| 981 | bpcm_play_t pcmplay, |
|---|
| 982 | bpcm_play_status *status |
|---|
| 983 | ) |
|---|
| 984 | { |
|---|
| 985 | int rc; |
|---|
| 986 | ioctl_settopapi_struct_bpcm_play_get_status st; |
|---|
| 987 | st.pcmplay = pcmplay; |
|---|
| 988 | st.status = status; |
|---|
| 989 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_get_status, (void*)&st); |
|---|
| 990 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 991 | return st.__retval; |
|---|
| 992 | } |
|---|
| 993 | |
|---|
| 994 | bresult bpcm_play_get_buffer( |
|---|
| 995 | bpcm_play_t pcmplay, |
|---|
| 996 | void **data, |
|---|
| 997 | size_t *length |
|---|
| 998 | ) |
|---|
| 999 | { |
|---|
| 1000 | int rc; |
|---|
| 1001 | ioctl_settopapi_struct_bpcm_play_get_buffer st; |
|---|
| 1002 | st.pcmplay = pcmplay; |
|---|
| 1003 | st.data = data; |
|---|
| 1004 | st.length = length; |
|---|
| 1005 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_get_buffer, (void*)&st); |
|---|
| 1006 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1007 | if (!st.__retval) { |
|---|
| 1008 | *st.data = b_kernel2user((unsigned long)*st.data, true); |
|---|
| 1009 | } |
|---|
| 1010 | return st.__retval; |
|---|
| 1011 | } |
|---|
| 1012 | |
|---|
| 1013 | bresult bpcm_play_write_complete( |
|---|
| 1014 | bpcm_play_t pcmplay, |
|---|
| 1015 | size_t amount_written |
|---|
| 1016 | ) |
|---|
| 1017 | { |
|---|
| 1018 | int rc; |
|---|
| 1019 | ioctl_settopapi_struct_bpcm_play_write_complete st; |
|---|
| 1020 | st.pcmplay = pcmplay; |
|---|
| 1021 | st.amount_written = amount_written; |
|---|
| 1022 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_write_complete, (void*)&st); |
|---|
| 1023 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1024 | return st.__retval; |
|---|
| 1025 | } |
|---|
| 1026 | |
|---|
| 1027 | bresult bpcm_play_stop( |
|---|
| 1028 | bpcm_play_t pcmplay |
|---|
| 1029 | ) |
|---|
| 1030 | { |
|---|
| 1031 | int rc; |
|---|
| 1032 | ioctl_settopapi_struct_bpcm_play_stop st; |
|---|
| 1033 | st.pcmplay = pcmplay; |
|---|
| 1034 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_stop, (void*)&st); |
|---|
| 1035 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1036 | return st.__retval; |
|---|
| 1037 | } |
|---|
| 1038 | |
|---|
| 1039 | void bpcm_play_get_output_settings( |
|---|
| 1040 | bpcm_play_t pcmplay, |
|---|
| 1041 | bpcm_play_output_settings *settings |
|---|
| 1042 | ) |
|---|
| 1043 | { |
|---|
| 1044 | int rc; |
|---|
| 1045 | ioctl_settopapi_struct_bpcm_play_get_output_settings st; |
|---|
| 1046 | st.pcmplay = pcmplay; |
|---|
| 1047 | st.settings = settings; |
|---|
| 1048 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_get_output_settings, (void*)&st); |
|---|
| 1049 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1050 | } |
|---|
| 1051 | |
|---|
| 1052 | bresult bpcm_play_set_output_settings( |
|---|
| 1053 | bpcm_play_t pcmplay, |
|---|
| 1054 | const bpcm_play_output_settings *settings |
|---|
| 1055 | ) |
|---|
| 1056 | { |
|---|
| 1057 | int rc; |
|---|
| 1058 | ioctl_settopapi_struct_bpcm_play_set_output_settings st; |
|---|
| 1059 | st.pcmplay = pcmplay; |
|---|
| 1060 | st.settings = settings; |
|---|
| 1061 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_play_set_output_settings, (void*)&st); |
|---|
| 1062 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1063 | return st.__retval; |
|---|
| 1064 | } |
|---|
| 1065 | |
|---|
| 1066 | void bpcm_capture_settings_init( |
|---|
| 1067 | bpcm_capture_settings *settings, |
|---|
| 1068 | bpcm_capture_t pcmcapture |
|---|
| 1069 | ) |
|---|
| 1070 | { |
|---|
| 1071 | int rc; |
|---|
| 1072 | ioctl_settopapi_struct_bpcm_capture_settings_init st; |
|---|
| 1073 | st.settings = settings; |
|---|
| 1074 | st.pcmcapture = pcmcapture; |
|---|
| 1075 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_capture_settings_init, (void*)&st); |
|---|
| 1076 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1077 | } |
|---|
| 1078 | |
|---|
| 1079 | bpcm_capture_t bpcm_capture_open( |
|---|
| 1080 | bobject_t id |
|---|
| 1081 | ) |
|---|
| 1082 | { |
|---|
| 1083 | int rc; |
|---|
| 1084 | ioctl_settopapi_struct_bpcm_capture_open st; |
|---|
| 1085 | st.id = id; |
|---|
| 1086 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_capture_open, (void*)&st); |
|---|
| 1087 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1088 | return st.__retval; |
|---|
| 1089 | } |
|---|
| 1090 | |
|---|
| 1091 | void bpcm_capture_close( |
|---|
| 1092 | bpcm_capture_t pcmcapture |
|---|
| 1093 | ) |
|---|
| 1094 | { |
|---|
| 1095 | int rc; |
|---|
| 1096 | ioctl_settopapi_struct_bpcm_capture_close st; |
|---|
| 1097 | st.pcmcapture = pcmcapture; |
|---|
| 1098 | b_unregister_callback(ioctl_settopapi_bpcm_capture_callback, (void*)pcmcapture); |
|---|
| 1099 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)pcmcapture); |
|---|
| 1100 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1101 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_capture_close, (void*)&st); |
|---|
| 1102 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1103 | } |
|---|
| 1104 | |
|---|
| 1105 | bresult bpcm_capture_start( |
|---|
| 1106 | bpcm_capture_t pcmcapture, |
|---|
| 1107 | bdisplay_t display, |
|---|
| 1108 | const bpcm_capture_settings *settings |
|---|
| 1109 | ) |
|---|
| 1110 | { |
|---|
| 1111 | int rc; |
|---|
| 1112 | ioctl_settopapi_struct_bpcm_capture_start st; |
|---|
| 1113 | st.pcmcapture = pcmcapture; |
|---|
| 1114 | st.display = display; |
|---|
| 1115 | st.settings = settings; |
|---|
| 1116 | b_register_callback(ioctl_settopapi_bpcm_capture_callback, (void*)pcmcapture, settings->callback, (void*)settings->callback_context); |
|---|
| 1117 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_capture_start, (void*)&st); |
|---|
| 1118 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1119 | return st.__retval; |
|---|
| 1120 | } |
|---|
| 1121 | |
|---|
| 1122 | bresult bpcm_capture_get_buffer( |
|---|
| 1123 | bpcm_capture_t pcmcapture, |
|---|
| 1124 | void **data, |
|---|
| 1125 | size_t *length |
|---|
| 1126 | ) |
|---|
| 1127 | { |
|---|
| 1128 | int rc; |
|---|
| 1129 | ioctl_settopapi_struct_bpcm_capture_get_buffer st; |
|---|
| 1130 | st.pcmcapture = pcmcapture; |
|---|
| 1131 | st.data = data; |
|---|
| 1132 | st.length = length; |
|---|
| 1133 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_capture_get_buffer, (void*)&st); |
|---|
| 1134 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1135 | if (!st.__retval) { |
|---|
| 1136 | *st.data = b_kernel2user((unsigned long)*st.data, true); |
|---|
| 1137 | } |
|---|
| 1138 | return st.__retval; |
|---|
| 1139 | } |
|---|
| 1140 | |
|---|
| 1141 | bresult bpcm_capture_read_complete( |
|---|
| 1142 | bpcm_capture_t pcmcapture, |
|---|
| 1143 | size_t amount_read |
|---|
| 1144 | ) |
|---|
| 1145 | { |
|---|
| 1146 | int rc; |
|---|
| 1147 | ioctl_settopapi_struct_bpcm_capture_read_complete st; |
|---|
| 1148 | st.pcmcapture = pcmcapture; |
|---|
| 1149 | st.amount_read = amount_read; |
|---|
| 1150 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_capture_read_complete, (void*)&st); |
|---|
| 1151 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1152 | return st.__retval; |
|---|
| 1153 | } |
|---|
| 1154 | |
|---|
| 1155 | bresult bpcm_capture_stop( |
|---|
| 1156 | bpcm_capture_t pcmcapture |
|---|
| 1157 | ) |
|---|
| 1158 | { |
|---|
| 1159 | int rc; |
|---|
| 1160 | ioctl_settopapi_struct_bpcm_capture_stop st; |
|---|
| 1161 | st.pcmcapture = pcmcapture; |
|---|
| 1162 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bpcm_capture_stop, (void*)&st); |
|---|
| 1163 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1164 | return st.__retval; |
|---|
| 1165 | } |
|---|
| 1166 | |
|---|
| 1167 | void bsmartcard_settings_init( |
|---|
| 1168 | bsmartcard_settings_t *settings |
|---|
| 1169 | ) |
|---|
| 1170 | { |
|---|
| 1171 | int rc; |
|---|
| 1172 | ioctl_settopapi_struct_bsmartcard_settings_init st; |
|---|
| 1173 | st.settings = settings; |
|---|
| 1174 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_settings_init, (void*)&st); |
|---|
| 1175 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1176 | } |
|---|
| 1177 | |
|---|
| 1178 | bsmartcard_t bsmartcard_open( |
|---|
| 1179 | bobject_t smartcard_id, |
|---|
| 1180 | const bsmartcard_settings_t *settings |
|---|
| 1181 | ) |
|---|
| 1182 | { |
|---|
| 1183 | int rc; |
|---|
| 1184 | ioctl_settopapi_struct_bsmartcard_open st; |
|---|
| 1185 | st.smartcard_id = smartcard_id; |
|---|
| 1186 | st.settings = settings; |
|---|
| 1187 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_open, (void*)&st); |
|---|
| 1188 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1189 | return st.__retval; |
|---|
| 1190 | } |
|---|
| 1191 | |
|---|
| 1192 | void bsmartcard_close( |
|---|
| 1193 | bsmartcard_t smartcard |
|---|
| 1194 | ) |
|---|
| 1195 | { |
|---|
| 1196 | int rc; |
|---|
| 1197 | ioctl_settopapi_struct_bsmartcard_close st; |
|---|
| 1198 | st.smartcard = smartcard; |
|---|
| 1199 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_close, (void*)&st); |
|---|
| 1200 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1201 | } |
|---|
| 1202 | |
|---|
| 1203 | void bsmartcard_get_settings( |
|---|
| 1204 | bsmartcard_t smartcard, |
|---|
| 1205 | bsmartcard_settings_t *settings |
|---|
| 1206 | ) |
|---|
| 1207 | { |
|---|
| 1208 | int rc; |
|---|
| 1209 | ioctl_settopapi_struct_bsmartcard_get_settings st; |
|---|
| 1210 | st.smartcard = smartcard; |
|---|
| 1211 | st.settings = settings; |
|---|
| 1212 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_get_settings, (void*)&st); |
|---|
| 1213 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1214 | } |
|---|
| 1215 | |
|---|
| 1216 | bresult bsmartcard_set_settings( |
|---|
| 1217 | bsmartcard_t smartcard, |
|---|
| 1218 | const bsmartcard_settings_t *settings |
|---|
| 1219 | ) |
|---|
| 1220 | { |
|---|
| 1221 | int rc; |
|---|
| 1222 | ioctl_settopapi_struct_bsmartcard_set_settings st; |
|---|
| 1223 | st.smartcard = smartcard; |
|---|
| 1224 | st.settings = settings; |
|---|
| 1225 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_set_settings, (void*)&st); |
|---|
| 1226 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1227 | return st.__retval; |
|---|
| 1228 | } |
|---|
| 1229 | |
|---|
| 1230 | bresult bsmartcard_read( |
|---|
| 1231 | bsmartcard_t smartcard, |
|---|
| 1232 | void *data , |
|---|
| 1233 | size_t length, |
|---|
| 1234 | size_t *length_read |
|---|
| 1235 | ) |
|---|
| 1236 | { |
|---|
| 1237 | int rc; |
|---|
| 1238 | ioctl_settopapi_struct_bsmartcard_read st; |
|---|
| 1239 | st.smartcard = smartcard; |
|---|
| 1240 | st.data = data; |
|---|
| 1241 | st.length = length; |
|---|
| 1242 | st.length_read = length_read; |
|---|
| 1243 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_read, (void*)&st); |
|---|
| 1244 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1245 | return st.__retval; |
|---|
| 1246 | } |
|---|
| 1247 | |
|---|
| 1248 | bresult bsmartcard_write( |
|---|
| 1249 | bsmartcard_t smartcard, |
|---|
| 1250 | const void *data , |
|---|
| 1251 | size_t length, |
|---|
| 1252 | size_t *length_written |
|---|
| 1253 | ) |
|---|
| 1254 | { |
|---|
| 1255 | int rc; |
|---|
| 1256 | ioctl_settopapi_struct_bsmartcard_write st; |
|---|
| 1257 | st.smartcard = smartcard; |
|---|
| 1258 | st.data = data; |
|---|
| 1259 | st.length = length; |
|---|
| 1260 | st.length_written = length_written; |
|---|
| 1261 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_write, (void*)&st); |
|---|
| 1262 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1263 | return st.__retval; |
|---|
| 1264 | } |
|---|
| 1265 | |
|---|
| 1266 | bresult bsmartcard_get_status( |
|---|
| 1267 | bsmartcard_t smartcard, |
|---|
| 1268 | bsmartcard_status *status |
|---|
| 1269 | ) |
|---|
| 1270 | { |
|---|
| 1271 | int rc; |
|---|
| 1272 | ioctl_settopapi_struct_bsmartcard_get_status st; |
|---|
| 1273 | st.smartcard = smartcard; |
|---|
| 1274 | st.status = status; |
|---|
| 1275 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_get_status, (void*)&st); |
|---|
| 1276 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1277 | return st.__retval; |
|---|
| 1278 | } |
|---|
| 1279 | |
|---|
| 1280 | bresult bsmartcard_reset_card( |
|---|
| 1281 | bsmartcard_t smartcard, |
|---|
| 1282 | void *data , |
|---|
| 1283 | size_t length, |
|---|
| 1284 | size_t *length_read |
|---|
| 1285 | ) |
|---|
| 1286 | { |
|---|
| 1287 | int rc; |
|---|
| 1288 | ioctl_settopapi_struct_bsmartcard_reset_card st; |
|---|
| 1289 | st.smartcard = smartcard; |
|---|
| 1290 | st.data = data; |
|---|
| 1291 | st.length = length; |
|---|
| 1292 | st.length_read = length_read; |
|---|
| 1293 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_reset_card, (void*)&st); |
|---|
| 1294 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1295 | return st.__retval; |
|---|
| 1296 | } |
|---|
| 1297 | |
|---|
| 1298 | bresult bsmartcard_reset( |
|---|
| 1299 | bsmartcard_t smartcard, |
|---|
| 1300 | bool warm_reset |
|---|
| 1301 | ) |
|---|
| 1302 | { |
|---|
| 1303 | int rc; |
|---|
| 1304 | ioctl_settopapi_struct_bsmartcard_reset st; |
|---|
| 1305 | st.smartcard = smartcard; |
|---|
| 1306 | st.warm_reset = warm_reset; |
|---|
| 1307 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_reset, (void*)&st); |
|---|
| 1308 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1309 | return st.__retval; |
|---|
| 1310 | } |
|---|
| 1311 | |
|---|
| 1312 | bresult bsmartcard_detect_card( |
|---|
| 1313 | bsmartcard_t smartcard |
|---|
| 1314 | ) |
|---|
| 1315 | { |
|---|
| 1316 | int rc; |
|---|
| 1317 | ioctl_settopapi_struct_bsmartcard_detect_card st; |
|---|
| 1318 | st.smartcard = smartcard; |
|---|
| 1319 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_detect_card, (void*)&st); |
|---|
| 1320 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1321 | return st.__retval; |
|---|
| 1322 | } |
|---|
| 1323 | |
|---|
| 1324 | bresult bsmartcard_init(void) |
|---|
| 1325 | { |
|---|
| 1326 | int rc; |
|---|
| 1327 | ioctl_settopapi_struct_bsmartcard_init st; |
|---|
| 1328 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_init, (void*)&st); |
|---|
| 1329 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1330 | return st.__retval; |
|---|
| 1331 | } |
|---|
| 1332 | |
|---|
| 1333 | void bsmartcard_shutdown(void) |
|---|
| 1334 | { |
|---|
| 1335 | int rc; |
|---|
| 1336 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsmartcard_shutdown, NULL); |
|---|
| 1337 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1338 | } |
|---|
| 1339 | |
|---|
| 1340 | buser_input_t buser_input_open( |
|---|
| 1341 | bobject_t user_input_id |
|---|
| 1342 | ) |
|---|
| 1343 | { |
|---|
| 1344 | int rc; |
|---|
| 1345 | ioctl_settopapi_struct_buser_input_open st; |
|---|
| 1346 | st.user_input_id = user_input_id; |
|---|
| 1347 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_open, (void*)&st); |
|---|
| 1348 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1349 | return st.__retval; |
|---|
| 1350 | } |
|---|
| 1351 | |
|---|
| 1352 | void buser_input_close( |
|---|
| 1353 | buser_input_t ui |
|---|
| 1354 | ) |
|---|
| 1355 | { |
|---|
| 1356 | int rc; |
|---|
| 1357 | ioctl_settopapi_struct_buser_input_close st; |
|---|
| 1358 | st.ui = ui; |
|---|
| 1359 | b_unregister_callback(ioctl_settopapi_buser_input_data_ready_callback, (void*)ui); |
|---|
| 1360 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)ui); |
|---|
| 1361 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1362 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_close, (void*)&st); |
|---|
| 1363 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1364 | } |
|---|
| 1365 | |
|---|
| 1366 | void buser_input_get_settings( |
|---|
| 1367 | buser_input_t ui, |
|---|
| 1368 | buser_input_settings *settings) |
|---|
| 1369 | { |
|---|
| 1370 | int rc; |
|---|
| 1371 | ioctl_settopapi_struct_buser_input_get_settings st; |
|---|
| 1372 | st.ui = ui; |
|---|
| 1373 | st.settings = settings; |
|---|
| 1374 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_get_settings, (void*)&st); |
|---|
| 1375 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1376 | } |
|---|
| 1377 | |
|---|
| 1378 | void buser_input_set_settings( |
|---|
| 1379 | buser_input_t ui, |
|---|
| 1380 | const buser_input_settings *settings) |
|---|
| 1381 | { |
|---|
| 1382 | int rc; |
|---|
| 1383 | ioctl_settopapi_struct_buser_input_set_settings st; |
|---|
| 1384 | st.ui = ui; |
|---|
| 1385 | st.settings = settings; |
|---|
| 1386 | b_register_callback(ioctl_settopapi_buser_input_data_ready_callback, (void*)ui, settings->data_ready_callback, (void*)settings->callback_context); |
|---|
| 1387 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_set_settings, (void*)&st); |
|---|
| 1388 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1389 | } |
|---|
| 1390 | |
|---|
| 1391 | bresult buser_input_get_event( |
|---|
| 1392 | buser_input_t ui, |
|---|
| 1393 | buser_input_event *event , |
|---|
| 1394 | unsigned nevents, |
|---|
| 1395 | unsigned *result_nevents |
|---|
| 1396 | ) |
|---|
| 1397 | { |
|---|
| 1398 | int rc; |
|---|
| 1399 | ioctl_settopapi_struct_buser_input_get_event st; |
|---|
| 1400 | st.ui = ui; |
|---|
| 1401 | st.event = event; |
|---|
| 1402 | st.nevents = nevents; |
|---|
| 1403 | st.result_nevents = result_nevents; |
|---|
| 1404 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_get_event, (void*)&st); |
|---|
| 1405 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1406 | return st.__retval; |
|---|
| 1407 | } |
|---|
| 1408 | |
|---|
| 1409 | buser_output_t buser_output_open( |
|---|
| 1410 | bobject_t user_output_id |
|---|
| 1411 | ) |
|---|
| 1412 | { |
|---|
| 1413 | int rc; |
|---|
| 1414 | ioctl_settopapi_struct_buser_output_open st; |
|---|
| 1415 | st.user_output_id = user_output_id; |
|---|
| 1416 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_output_open, (void*)&st); |
|---|
| 1417 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1418 | return st.__retval; |
|---|
| 1419 | } |
|---|
| 1420 | |
|---|
| 1421 | void buser_output_close( |
|---|
| 1422 | buser_output_t uo |
|---|
| 1423 | ) |
|---|
| 1424 | { |
|---|
| 1425 | int rc; |
|---|
| 1426 | ioctl_settopapi_struct_buser_output_close st; |
|---|
| 1427 | st.uo = uo; |
|---|
| 1428 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_output_close, (void*)&st); |
|---|
| 1429 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1430 | } |
|---|
| 1431 | |
|---|
| 1432 | bresult buser_output_set_led( |
|---|
| 1433 | buser_output_t ui, |
|---|
| 1434 | unsigned led, |
|---|
| 1435 | bool on |
|---|
| 1436 | ) |
|---|
| 1437 | { |
|---|
| 1438 | int rc; |
|---|
| 1439 | ioctl_settopapi_struct_buser_output_set_led st; |
|---|
| 1440 | st.ui = ui; |
|---|
| 1441 | st.led = led; |
|---|
| 1442 | st.on = on; |
|---|
| 1443 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_output_set_led, (void*)&st); |
|---|
| 1444 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1445 | return st.__retval; |
|---|
| 1446 | } |
|---|
| 1447 | |
|---|
| 1448 | bresult buser_output_display_message( |
|---|
| 1449 | buser_output_t ui, |
|---|
| 1450 | const char *message |
|---|
| 1451 | ) |
|---|
| 1452 | { |
|---|
| 1453 | int rc; |
|---|
| 1454 | ioctl_settopapi_struct_buser_output_display_message st; |
|---|
| 1455 | st.ui = ui; |
|---|
| 1456 | st.message = message; |
|---|
| 1457 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_output_display_message, (void*)&st); |
|---|
| 1458 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1459 | return st.__retval; |
|---|
| 1460 | } |
|---|
| 1461 | |
|---|
| 1462 | void buser_input_set_xmp_settings( |
|---|
| 1463 | buser_input_t ui, |
|---|
| 1464 | const buser_input_xmp_settings *settings) |
|---|
| 1465 | { |
|---|
| 1466 | int rc; |
|---|
| 1467 | ioctl_settopapi_struct_buser_input_set_xmp_settings st; |
|---|
| 1468 | st.ui = ui; |
|---|
| 1469 | st.settings = settings; |
|---|
| 1470 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_set_xmp_settings, (void*)&st); |
|---|
| 1471 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1472 | } |
|---|
| 1473 | |
|---|
| 1474 | void buser_input_get_xmp_settings( |
|---|
| 1475 | buser_input_t ui, |
|---|
| 1476 | buser_input_xmp_settings *settings) |
|---|
| 1477 | { |
|---|
| 1478 | int rc; |
|---|
| 1479 | ioctl_settopapi_struct_buser_input_get_xmp_settings st; |
|---|
| 1480 | st.ui = ui; |
|---|
| 1481 | st.settings = settings; |
|---|
| 1482 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_get_xmp_settings, (void*)&st); |
|---|
| 1483 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1484 | } |
|---|
| 1485 | |
|---|
| 1486 | bresult buser_input_send_xmp( |
|---|
| 1487 | buser_input_t remote, |
|---|
| 1488 | const uint8_t *input_buffer , |
|---|
| 1489 | size_t length |
|---|
| 1490 | ) |
|---|
| 1491 | { |
|---|
| 1492 | int rc; |
|---|
| 1493 | ioctl_settopapi_struct_buser_input_send_xmp st; |
|---|
| 1494 | st.remote = remote; |
|---|
| 1495 | st.input_buffer = input_buffer; |
|---|
| 1496 | st.length = length; |
|---|
| 1497 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_send_xmp, (void*)&st); |
|---|
| 1498 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1499 | return st.__retval; |
|---|
| 1500 | } |
|---|
| 1501 | |
|---|
| 1502 | bresult buser_input_receive_xmp( |
|---|
| 1503 | buser_input_t remote, |
|---|
| 1504 | uint8_t *output_data , |
|---|
| 1505 | size_t length, |
|---|
| 1506 | unsigned *output_size, |
|---|
| 1507 | uint32_t *data_packet |
|---|
| 1508 | ) |
|---|
| 1509 | { |
|---|
| 1510 | int rc; |
|---|
| 1511 | ioctl_settopapi_struct_buser_input_receive_xmp st; |
|---|
| 1512 | st.remote = remote; |
|---|
| 1513 | st.output_data = output_data; |
|---|
| 1514 | st.length = length; |
|---|
| 1515 | st.output_size = output_size; |
|---|
| 1516 | st.data_packet = data_packet; |
|---|
| 1517 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_buser_input_receive_xmp, (void*)&st); |
|---|
| 1518 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1519 | return st.__retval; |
|---|
| 1520 | } |
|---|
| 1521 | |
|---|
| 1522 | bgraphics_t bgraphics_open( |
|---|
| 1523 | bobject_t id, |
|---|
| 1524 | bdisplay_t display |
|---|
| 1525 | ) |
|---|
| 1526 | { |
|---|
| 1527 | int rc; |
|---|
| 1528 | ioctl_settopapi_struct_bgraphics_open st; |
|---|
| 1529 | st.id = id; |
|---|
| 1530 | st.display = display; |
|---|
| 1531 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bgraphics_open, (void*)&st); |
|---|
| 1532 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1533 | return st.__retval; |
|---|
| 1534 | } |
|---|
| 1535 | |
|---|
| 1536 | void bgraphics_close( |
|---|
| 1537 | bgraphics_t graphics |
|---|
| 1538 | ) |
|---|
| 1539 | { |
|---|
| 1540 | int rc; |
|---|
| 1541 | ioctl_settopapi_struct_bgraphics_close st; |
|---|
| 1542 | st.graphics = graphics; |
|---|
| 1543 | b_unregister_callback(ioctl_settopapi_bgraphics_operation_complete_callback, (void*)graphics); |
|---|
| 1544 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)graphics); |
|---|
| 1545 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1546 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bgraphics_close, (void*)&st); |
|---|
| 1547 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1548 | } |
|---|
| 1549 | |
|---|
| 1550 | void bgraphics_get( |
|---|
| 1551 | bgraphics_t graphics, |
|---|
| 1552 | bgraphics_settings *settings |
|---|
| 1553 | ) |
|---|
| 1554 | { |
|---|
| 1555 | int rc; |
|---|
| 1556 | ioctl_settopapi_struct_bgraphics_get st; |
|---|
| 1557 | st.graphics = graphics; |
|---|
| 1558 | st.settings = settings; |
|---|
| 1559 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bgraphics_get, (void*)&st); |
|---|
| 1560 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1561 | } |
|---|
| 1562 | |
|---|
| 1563 | bresult bgraphics_set( |
|---|
| 1564 | bgraphics_t graphics, |
|---|
| 1565 | const bgraphics_settings *settings |
|---|
| 1566 | ) |
|---|
| 1567 | { |
|---|
| 1568 | int rc; |
|---|
| 1569 | ioctl_settopapi_struct_bgraphics_set st; |
|---|
| 1570 | st.graphics = graphics; |
|---|
| 1571 | st.settings = settings; |
|---|
| 1572 | b_register_callback(ioctl_settopapi_bgraphics_operation_complete_callback, (void*)graphics, settings->operation_complete_callback, (void*)settings->callback_context); |
|---|
| 1573 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bgraphics_set, (void*)&st); |
|---|
| 1574 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1575 | return st.__retval; |
|---|
| 1576 | } |
|---|
| 1577 | |
|---|
| 1578 | bresult bgraphics_sync( |
|---|
| 1579 | bgraphics_t graphics |
|---|
| 1580 | ) |
|---|
| 1581 | { |
|---|
| 1582 | int rc; |
|---|
| 1583 | ioctl_settopapi_struct_bgraphics_sync st; |
|---|
| 1584 | st.graphics = graphics; |
|---|
| 1585 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bgraphics_sync, (void*)&st); |
|---|
| 1586 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1587 | return st.__retval; |
|---|
| 1588 | } |
|---|
| 1589 | |
|---|
| 1590 | bresult bsurface_sync( |
|---|
| 1591 | bsurface_t surface |
|---|
| 1592 | ) |
|---|
| 1593 | { |
|---|
| 1594 | int rc; |
|---|
| 1595 | ioctl_settopapi_struct_bsurface_sync st; |
|---|
| 1596 | st.surface = surface; |
|---|
| 1597 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_sync, (void*)&st); |
|---|
| 1598 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1599 | return st.__retval; |
|---|
| 1600 | } |
|---|
| 1601 | |
|---|
| 1602 | bresult bgraphics_flip( |
|---|
| 1603 | bgraphics_t graphics |
|---|
| 1604 | ) |
|---|
| 1605 | { |
|---|
| 1606 | int rc; |
|---|
| 1607 | ioctl_settopapi_struct_bgraphics_flip st; |
|---|
| 1608 | st.graphics = graphics; |
|---|
| 1609 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bgraphics_flip, (void*)&st); |
|---|
| 1610 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1611 | return st.__retval; |
|---|
| 1612 | } |
|---|
| 1613 | |
|---|
| 1614 | bresult bgraphics_flip_sync( |
|---|
| 1615 | bgraphics_t graphics |
|---|
| 1616 | ) |
|---|
| 1617 | { |
|---|
| 1618 | int rc; |
|---|
| 1619 | ioctl_settopapi_struct_bgraphics_flip_sync st; |
|---|
| 1620 | st.graphics = graphics; |
|---|
| 1621 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bgraphics_flip_sync, (void*)&st); |
|---|
| 1622 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1623 | return st.__retval; |
|---|
| 1624 | } |
|---|
| 1625 | |
|---|
| 1626 | void bsurface_create_settings_init( |
|---|
| 1627 | bsurface_create_settings *create_settings, |
|---|
| 1628 | bgraphics_t graphics |
|---|
| 1629 | ) |
|---|
| 1630 | { |
|---|
| 1631 | int rc; |
|---|
| 1632 | ioctl_settopapi_struct_bsurface_create_settings_init st; |
|---|
| 1633 | st.create_settings = create_settings; |
|---|
| 1634 | st.graphics = graphics; |
|---|
| 1635 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_create_settings_init, (void*)&st); |
|---|
| 1636 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1637 | } |
|---|
| 1638 | |
|---|
| 1639 | bsurface_t bgraphics_create_framebuffer( |
|---|
| 1640 | bgraphics_t graphics, |
|---|
| 1641 | const bsurface_create_settings *create_settings, |
|---|
| 1642 | unsigned int back_buffer_count |
|---|
| 1643 | ) |
|---|
| 1644 | { |
|---|
| 1645 | int rc; |
|---|
| 1646 | ioctl_settopapi_struct_bgraphics_create_framebuffer st; |
|---|
| 1647 | st.graphics = graphics; |
|---|
| 1648 | st.create_settings = create_settings; |
|---|
| 1649 | st.back_buffer_count = back_buffer_count; |
|---|
| 1650 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bgraphics_create_framebuffer, (void*)&st); |
|---|
| 1651 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1652 | return st.__retval; |
|---|
| 1653 | } |
|---|
| 1654 | |
|---|
| 1655 | bsurface_t bsurface_create( |
|---|
| 1656 | bgraphics_t graphics, |
|---|
| 1657 | const bsurface_create_settings *create_settings |
|---|
| 1658 | ) |
|---|
| 1659 | { |
|---|
| 1660 | int rc; |
|---|
| 1661 | ioctl_settopapi_struct_bsurface_create st; |
|---|
| 1662 | st.graphics = graphics; |
|---|
| 1663 | st.create_settings = create_settings; |
|---|
| 1664 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_create, (void*)&st); |
|---|
| 1665 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1666 | return st.__retval; |
|---|
| 1667 | } |
|---|
| 1668 | |
|---|
| 1669 | bsurface_t bsurface_get_display( |
|---|
| 1670 | bgraphics_t graphics, |
|---|
| 1671 | const bsurface_create_settings *create_settings |
|---|
| 1672 | ) |
|---|
| 1673 | { |
|---|
| 1674 | int rc; |
|---|
| 1675 | ioctl_settopapi_struct_bsurface_get_display st; |
|---|
| 1676 | st.graphics = graphics; |
|---|
| 1677 | st.create_settings = create_settings; |
|---|
| 1678 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_get_display, (void*)&st); |
|---|
| 1679 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1680 | return st.__retval; |
|---|
| 1681 | } |
|---|
| 1682 | |
|---|
| 1683 | void bsurface_destroy( |
|---|
| 1684 | bsurface_t surface |
|---|
| 1685 | ) |
|---|
| 1686 | { |
|---|
| 1687 | int rc; |
|---|
| 1688 | ioctl_settopapi_struct_bsurface_destroy st; |
|---|
| 1689 | st.surface = surface; |
|---|
| 1690 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_destroy, (void*)&st); |
|---|
| 1691 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1692 | } |
|---|
| 1693 | |
|---|
| 1694 | bresult bsurface_get_memory( |
|---|
| 1695 | bsurface_t s, |
|---|
| 1696 | bsurface_memory *memory |
|---|
| 1697 | ) |
|---|
| 1698 | { |
|---|
| 1699 | int rc; |
|---|
| 1700 | ioctl_settopapi_struct_bsurface_get_memory st; |
|---|
| 1701 | st.s = s; |
|---|
| 1702 | st.memory = memory; |
|---|
| 1703 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_get_memory, (void*)&st); |
|---|
| 1704 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1705 | if (!st.__retval) { |
|---|
| 1706 | memory->buffer = b_kernel2user((unsigned long)memory->buffer, true); |
|---|
| 1707 | } |
|---|
| 1708 | return st.__retval; |
|---|
| 1709 | } |
|---|
| 1710 | |
|---|
| 1711 | bresult bsurface_set( |
|---|
| 1712 | bsurface_t s, |
|---|
| 1713 | const bsurface_settings *settings |
|---|
| 1714 | ) |
|---|
| 1715 | { |
|---|
| 1716 | int rc; |
|---|
| 1717 | ioctl_settopapi_struct_bsurface_set st; |
|---|
| 1718 | st.s = s; |
|---|
| 1719 | st.settings = settings; |
|---|
| 1720 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_set, (void*)&st); |
|---|
| 1721 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1722 | return st.__retval; |
|---|
| 1723 | } |
|---|
| 1724 | |
|---|
| 1725 | void bsurface_get( |
|---|
| 1726 | bsurface_t s, |
|---|
| 1727 | bsurface_settings *settings |
|---|
| 1728 | ) |
|---|
| 1729 | { |
|---|
| 1730 | int rc; |
|---|
| 1731 | ioctl_settopapi_struct_bsurface_get st; |
|---|
| 1732 | st.s = s; |
|---|
| 1733 | st.settings = settings; |
|---|
| 1734 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_get, (void*)&st); |
|---|
| 1735 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1736 | } |
|---|
| 1737 | |
|---|
| 1738 | bresult bsurface_fill( |
|---|
| 1739 | bsurface_t surface, |
|---|
| 1740 | const bsettop_rect *rect, |
|---|
| 1741 | bgraphics_pixel pixel |
|---|
| 1742 | ) |
|---|
| 1743 | { |
|---|
| 1744 | int rc; |
|---|
| 1745 | ioctl_settopapi_struct_bsurface_fill st; |
|---|
| 1746 | st.surface = surface; |
|---|
| 1747 | st.rect = rect; |
|---|
| 1748 | st.pixel = pixel; |
|---|
| 1749 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_fill, (void*)&st); |
|---|
| 1750 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1751 | return st.__retval; |
|---|
| 1752 | } |
|---|
| 1753 | |
|---|
| 1754 | bresult bsurface_copy( |
|---|
| 1755 | bsurface_t destsurface, |
|---|
| 1756 | const bsettop_rect *destrect, |
|---|
| 1757 | bsurface_t srcsurface, |
|---|
| 1758 | const bsettop_rect *srcrect |
|---|
| 1759 | ) |
|---|
| 1760 | { |
|---|
| 1761 | int rc; |
|---|
| 1762 | ioctl_settopapi_struct_bsurface_copy st; |
|---|
| 1763 | st.destsurface = destsurface; |
|---|
| 1764 | st.destrect = destrect; |
|---|
| 1765 | st.srcsurface = srcsurface; |
|---|
| 1766 | st.srcrect = srcrect; |
|---|
| 1767 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_copy, (void*)&st); |
|---|
| 1768 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1769 | return st.__retval; |
|---|
| 1770 | } |
|---|
| 1771 | |
|---|
| 1772 | bresult bsurface_blit( |
|---|
| 1773 | bsurface_t destsurface, |
|---|
| 1774 | const bsettop_rect *destrect, |
|---|
| 1775 | uint32_t operation, |
|---|
| 1776 | bsurface_t src1, |
|---|
| 1777 | const bsettop_rect *src1_rect, |
|---|
| 1778 | bsurface_t src2, |
|---|
| 1779 | const bsettop_rect *src2_rect, |
|---|
| 1780 | bgraphics_pixel pixel1, |
|---|
| 1781 | bgraphics_pixel pixel2 |
|---|
| 1782 | ) |
|---|
| 1783 | { |
|---|
| 1784 | int rc; |
|---|
| 1785 | ioctl_settopapi_struct_bsurface_blit st; |
|---|
| 1786 | st.destsurface = destsurface; |
|---|
| 1787 | st.destrect = destrect; |
|---|
| 1788 | st.operation = operation; |
|---|
| 1789 | st.src1 = src1; |
|---|
| 1790 | st.src1_rect = src1_rect; |
|---|
| 1791 | st.src2 = src2; |
|---|
| 1792 | st.src2_rect = src2_rect; |
|---|
| 1793 | st.pixel1 = pixel1; |
|---|
| 1794 | st.pixel2 = pixel2; |
|---|
| 1795 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_blit, (void*)&st); |
|---|
| 1796 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1797 | return st.__retval; |
|---|
| 1798 | } |
|---|
| 1799 | |
|---|
| 1800 | void bsurface_blit_params_init(bsurface_blit_params *params) |
|---|
| 1801 | { |
|---|
| 1802 | int rc; |
|---|
| 1803 | ioctl_settopapi_struct_bsurface_blit_params_init st; |
|---|
| 1804 | st.params = params; |
|---|
| 1805 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_blit_params_init, (void*)&st); |
|---|
| 1806 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1807 | } |
|---|
| 1808 | |
|---|
| 1809 | bresult bsurface_extended_blit( |
|---|
| 1810 | bsurface_t destsurface, |
|---|
| 1811 | const bsettop_rect *destrect, |
|---|
| 1812 | const bsurface_blit_params *params |
|---|
| 1813 | ) |
|---|
| 1814 | { |
|---|
| 1815 | int rc; |
|---|
| 1816 | ioctl_settopapi_struct_bsurface_extended_blit st; |
|---|
| 1817 | st.destsurface = destsurface; |
|---|
| 1818 | st.destrect = destrect; |
|---|
| 1819 | st.params = params; |
|---|
| 1820 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_extended_blit, (void*)&st); |
|---|
| 1821 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1822 | return st.__retval; |
|---|
| 1823 | } |
|---|
| 1824 | |
|---|
| 1825 | bresult |
|---|
| 1826 | bsurface_blended_fill( |
|---|
| 1827 | bsurface_t surface, |
|---|
| 1828 | const bsettop_rect *rect, |
|---|
| 1829 | bgraphics_pixel pixel, |
|---|
| 1830 | uint32_t operation |
|---|
| 1831 | |
|---|
| 1832 | ) |
|---|
| 1833 | { |
|---|
| 1834 | int rc; |
|---|
| 1835 | ioctl_settopapi_struct_bsurface_blended_fill st; |
|---|
| 1836 | st.surface = surface; |
|---|
| 1837 | st.rect = rect; |
|---|
| 1838 | st.pixel = pixel; |
|---|
| 1839 | st.operation = operation; |
|---|
| 1840 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_blended_fill, (void*)&st); |
|---|
| 1841 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1842 | return st.__retval; |
|---|
| 1843 | } |
|---|
| 1844 | |
|---|
| 1845 | bresult bsurface_load_clut( |
|---|
| 1846 | bsurface_t s, |
|---|
| 1847 | bgraphics_palette palette) |
|---|
| 1848 | { |
|---|
| 1849 | int rc; |
|---|
| 1850 | ioctl_settopapi_struct_bsurface_load_clut st; |
|---|
| 1851 | st.s = s; |
|---|
| 1852 | st.palette = palette; |
|---|
| 1853 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsurface_load_clut, (void*)&st); |
|---|
| 1854 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1855 | return st.__retval; |
|---|
| 1856 | } |
|---|
| 1857 | |
|---|
| 1858 | void bplaypump_get_open_params( |
|---|
| 1859 | bobject_t id, |
|---|
| 1860 | bplaypump_open_params *open_params |
|---|
| 1861 | ) |
|---|
| 1862 | { |
|---|
| 1863 | int rc; |
|---|
| 1864 | ioctl_settopapi_struct_bplaypump_get_open_params st; |
|---|
| 1865 | st.id = id; |
|---|
| 1866 | st.open_params = open_params; |
|---|
| 1867 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_get_open_params, (void*)&st); |
|---|
| 1868 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1869 | } |
|---|
| 1870 | |
|---|
| 1871 | bplaypump_t bplaypump_open( |
|---|
| 1872 | bobject_t id, |
|---|
| 1873 | const bplaypump_open_params *open_params |
|---|
| 1874 | ) |
|---|
| 1875 | { |
|---|
| 1876 | int rc; |
|---|
| 1877 | ioctl_settopapi_struct_bplaypump_open st; |
|---|
| 1878 | st.id = id; |
|---|
| 1879 | st.open_params = open_params; |
|---|
| 1880 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_open, (void*)&st); |
|---|
| 1881 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1882 | return st.__retval; |
|---|
| 1883 | } |
|---|
| 1884 | |
|---|
| 1885 | void bplaypump_close(bplaypump_t playpump) |
|---|
| 1886 | { |
|---|
| 1887 | int rc; |
|---|
| 1888 | ioctl_settopapi_struct_bplaypump_close st; |
|---|
| 1889 | st.playpump = playpump; |
|---|
| 1890 | b_unregister_callback(ioctl_settopapi_bplaypump_read_callback, (void*)playpump); |
|---|
| 1891 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)playpump); |
|---|
| 1892 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1893 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_close, (void*)&st); |
|---|
| 1894 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1895 | } |
|---|
| 1896 | |
|---|
| 1897 | void bplaypump_params_init( |
|---|
| 1898 | bplaypump_params *params, |
|---|
| 1899 | bplaypump_t playpump |
|---|
| 1900 | ) |
|---|
| 1901 | { |
|---|
| 1902 | int rc; |
|---|
| 1903 | ioctl_settopapi_struct_bplaypump_params_init st; |
|---|
| 1904 | st.params = params; |
|---|
| 1905 | st.playpump = playpump; |
|---|
| 1906 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_params_init, (void*)&st); |
|---|
| 1907 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1908 | } |
|---|
| 1909 | |
|---|
| 1910 | bstream_t bplaypump_start( |
|---|
| 1911 | bplaypump_t playpump, |
|---|
| 1912 | const bstream_mpeg *mpeg, |
|---|
| 1913 | const bplaypump_params *params |
|---|
| 1914 | ) |
|---|
| 1915 | { |
|---|
| 1916 | int rc; |
|---|
| 1917 | ioctl_settopapi_struct_bplaypump_start st; |
|---|
| 1918 | st.playpump = playpump; |
|---|
| 1919 | st.mpeg = mpeg; |
|---|
| 1920 | st.params = params; |
|---|
| 1921 | b_register_callback(ioctl_settopapi_bplaypump_read_callback, (void*)playpump, params->read_callback, (void*)params->callback_context); |
|---|
| 1922 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_start, (void*)&st); |
|---|
| 1923 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 1924 | return st.__retval; |
|---|
| 1925 | } |
|---|
| 1926 | |
|---|
| 1927 | bresult bplaypump_stop( |
|---|
| 1928 | bplaypump_t playpump |
|---|
| 1929 | ) |
|---|
| 1930 | { |
|---|
| 1931 | int rc; |
|---|
| 1932 | ioctl_settopapi_struct_bplaypump_stop st; |
|---|
| 1933 | st.playpump = playpump; |
|---|
| 1934 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_stop, (void*)&st); |
|---|
| 1935 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1936 | return st.__retval; |
|---|
| 1937 | } |
|---|
| 1938 | |
|---|
| 1939 | bresult bplaypump_get_buffer( |
|---|
| 1940 | bplaypump_t playpump, |
|---|
| 1941 | void **buffer, |
|---|
| 1942 | size_t *size |
|---|
| 1943 | ) |
|---|
| 1944 | { |
|---|
| 1945 | int rc; |
|---|
| 1946 | ioctl_settopapi_struct_bplaypump_get_buffer st; |
|---|
| 1947 | st.playpump = playpump; |
|---|
| 1948 | st.buffer = buffer; |
|---|
| 1949 | st.size = size; |
|---|
| 1950 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_get_buffer, (void*)&st); |
|---|
| 1951 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1952 | if (!st.__retval) { |
|---|
| 1953 | *st.buffer = b_kernel2user((unsigned long)*st.buffer, true); |
|---|
| 1954 | } |
|---|
| 1955 | return st.__retval; |
|---|
| 1956 | } |
|---|
| 1957 | |
|---|
| 1958 | bresult bplaypump_read_complete( |
|---|
| 1959 | bplaypump_t playpump, |
|---|
| 1960 | size_t skip, |
|---|
| 1961 | size_t amount |
|---|
| 1962 | ) |
|---|
| 1963 | { |
|---|
| 1964 | int rc; |
|---|
| 1965 | ioctl_settopapi_struct_bplaypump_read_complete st; |
|---|
| 1966 | st.playpump = playpump; |
|---|
| 1967 | st.skip = skip; |
|---|
| 1968 | st.amount = amount; |
|---|
| 1969 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_read_complete, (void*)&st); |
|---|
| 1970 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1971 | return st.__retval; |
|---|
| 1972 | } |
|---|
| 1973 | |
|---|
| 1974 | bresult bplaypump_set( |
|---|
| 1975 | bplaypump_t playpump, |
|---|
| 1976 | const bplaypump_settings *settings |
|---|
| 1977 | ) |
|---|
| 1978 | { |
|---|
| 1979 | int rc; |
|---|
| 1980 | ioctl_settopapi_struct_bplaypump_set st; |
|---|
| 1981 | st.playpump = playpump; |
|---|
| 1982 | st.settings = settings; |
|---|
| 1983 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_set, (void*)&st); |
|---|
| 1984 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 1985 | return st.__retval; |
|---|
| 1986 | } |
|---|
| 1987 | |
|---|
| 1988 | void bplaypump_get( |
|---|
| 1989 | bplaypump_t playpump, |
|---|
| 1990 | bplaypump_settings *settings |
|---|
| 1991 | ) |
|---|
| 1992 | { |
|---|
| 1993 | int rc; |
|---|
| 1994 | ioctl_settopapi_struct_bplaypump_get st; |
|---|
| 1995 | st.playpump = playpump; |
|---|
| 1996 | st.settings = settings; |
|---|
| 1997 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_get, (void*)&st); |
|---|
| 1998 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 1999 | } |
|---|
| 2000 | |
|---|
| 2001 | bresult bplaypump_set_state( |
|---|
| 2002 | bplaypump_t playpump, |
|---|
| 2003 | bplaypump_state state, |
|---|
| 2004 | bool forward |
|---|
| 2005 | ) |
|---|
| 2006 | { |
|---|
| 2007 | int rc; |
|---|
| 2008 | ioctl_settopapi_struct_bplaypump_set_state st; |
|---|
| 2009 | st.playpump = playpump; |
|---|
| 2010 | st.state = state; |
|---|
| 2011 | st.forward = forward; |
|---|
| 2012 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_set_state, (void*)&st); |
|---|
| 2013 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2014 | return st.__retval; |
|---|
| 2015 | } |
|---|
| 2016 | |
|---|
| 2017 | bresult bplaypump_set_decoder_rate( |
|---|
| 2018 | bplaypump_t playpump, |
|---|
| 2019 | unsigned rate |
|---|
| 2020 | ) |
|---|
| 2021 | { |
|---|
| 2022 | int rc; |
|---|
| 2023 | ioctl_settopapi_struct_bplaypump_set_decoder_rate st; |
|---|
| 2024 | st.playpump = playpump; |
|---|
| 2025 | st.rate = rate; |
|---|
| 2026 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_set_decoder_rate, (void*)&st); |
|---|
| 2027 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2028 | return st.__retval; |
|---|
| 2029 | } |
|---|
| 2030 | |
|---|
| 2031 | bresult bplaypump_frame_advance( |
|---|
| 2032 | bplaypump_t playpump |
|---|
| 2033 | ) |
|---|
| 2034 | { |
|---|
| 2035 | int rc; |
|---|
| 2036 | ioctl_settopapi_struct_bplaypump_frame_advance st; |
|---|
| 2037 | st.playpump = playpump; |
|---|
| 2038 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_frame_advance, (void*)&st); |
|---|
| 2039 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2040 | return st.__retval; |
|---|
| 2041 | } |
|---|
| 2042 | |
|---|
| 2043 | bresult bplaypump_flush( |
|---|
| 2044 | bplaypump_t playpump |
|---|
| 2045 | ) |
|---|
| 2046 | { |
|---|
| 2047 | int rc; |
|---|
| 2048 | ioctl_settopapi_struct_bplaypump_flush st; |
|---|
| 2049 | st.playpump = playpump; |
|---|
| 2050 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_flush, (void*)&st); |
|---|
| 2051 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2052 | return st.__retval; |
|---|
| 2053 | } |
|---|
| 2054 | |
|---|
| 2055 | bresult bplaypump_get_status( |
|---|
| 2056 | bplaypump_t p, |
|---|
| 2057 | bplaypump_status *status |
|---|
| 2058 | ) |
|---|
| 2059 | { |
|---|
| 2060 | int rc; |
|---|
| 2061 | ioctl_settopapi_struct_bplaypump_get_status st; |
|---|
| 2062 | st.p = p; |
|---|
| 2063 | st.status = status; |
|---|
| 2064 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_get_status, (void*)&st); |
|---|
| 2065 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2066 | if (!st.__retval) { |
|---|
| 2067 | status->buffer_base = b_kernel2user((unsigned long)status->buffer_base, true); |
|---|
| 2068 | } |
|---|
| 2069 | return st.__retval; |
|---|
| 2070 | } |
|---|
| 2071 | |
|---|
| 2072 | bresult bplaypump_p_set_pwm_value( |
|---|
| 2073 | bplaypump_t p, |
|---|
| 2074 | int pwm_value) |
|---|
| 2075 | { |
|---|
| 2076 | int rc; |
|---|
| 2077 | ioctl_settopapi_struct_bplaypump_p_set_pwm_value st; |
|---|
| 2078 | st.p = p; |
|---|
| 2079 | st.pwm_value = pwm_value; |
|---|
| 2080 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_p_set_pwm_value, (void*)&st); |
|---|
| 2081 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2082 | return st.__retval; |
|---|
| 2083 | } |
|---|
| 2084 | |
|---|
| 2085 | void bplaypump_get_source(bplaypump_t playpump, bplaypump_source *source) |
|---|
| 2086 | { |
|---|
| 2087 | int rc; |
|---|
| 2088 | ioctl_settopapi_struct_bplaypump_get_source st; |
|---|
| 2089 | st.playpump = playpump; |
|---|
| 2090 | st.source = source; |
|---|
| 2091 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_get_source, (void*)&st); |
|---|
| 2092 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2093 | } |
|---|
| 2094 | |
|---|
| 2095 | bresult bplaypump_set_source(bplaypump_t playpump, const bplaypump_source *source) |
|---|
| 2096 | { |
|---|
| 2097 | int rc; |
|---|
| 2098 | ioctl_settopapi_struct_bplaypump_set_source st; |
|---|
| 2099 | st.playpump = playpump; |
|---|
| 2100 | st.source = source; |
|---|
| 2101 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_set_source, (void*)&st); |
|---|
| 2102 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2103 | return st.__retval; |
|---|
| 2104 | } |
|---|
| 2105 | |
|---|
| 2106 | bresult bplaypump_get_rtp_hdr_data(bplaypump_t p, const bplaypump_rtp_hdr_data_t *rtp_header_data, unsigned *entry_cnt) |
|---|
| 2107 | { |
|---|
| 2108 | int rc; |
|---|
| 2109 | ioctl_settopapi_struct_bplaypump_get_rtp_hdr_data st; |
|---|
| 2110 | st.p = p; |
|---|
| 2111 | st.rtp_header_data = rtp_header_data; |
|---|
| 2112 | st.entry_cnt = entry_cnt; |
|---|
| 2113 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bplaypump_get_rtp_hdr_data, (void*)&st); |
|---|
| 2114 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2115 | return st.__retval; |
|---|
| 2116 | } |
|---|
| 2117 | |
|---|
| 2118 | void bencryption_params_init( |
|---|
| 2119 | bencryption_params *encryption |
|---|
| 2120 | ) |
|---|
| 2121 | { |
|---|
| 2122 | int rc; |
|---|
| 2123 | ioctl_settopapi_struct_bencryption_params_init st; |
|---|
| 2124 | st.encryption = encryption; |
|---|
| 2125 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bencryption_params_init, (void*)&st); |
|---|
| 2126 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2127 | } |
|---|
| 2128 | |
|---|
| 2129 | void bstream_mpeg_init( |
|---|
| 2130 | bstream_mpeg *mpeg |
|---|
| 2131 | ) |
|---|
| 2132 | { |
|---|
| 2133 | int rc; |
|---|
| 2134 | ioctl_settopapi_struct_bstream_mpeg_init st; |
|---|
| 2135 | st.mpeg = mpeg; |
|---|
| 2136 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_mpeg_init, (void*)&st); |
|---|
| 2137 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2138 | } |
|---|
| 2139 | |
|---|
| 2140 | bband_t bstreamer_attach( |
|---|
| 2141 | bobject_t id, |
|---|
| 2142 | bstream_mpeg_type mpeg_type |
|---|
| 2143 | ) |
|---|
| 2144 | { |
|---|
| 2145 | int rc; |
|---|
| 2146 | ioctl_settopapi_struct_bstreamer_attach st; |
|---|
| 2147 | st.id = id; |
|---|
| 2148 | st.mpeg_type = mpeg_type; |
|---|
| 2149 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstreamer_attach, (void*)&st); |
|---|
| 2150 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2151 | return st.__retval; |
|---|
| 2152 | } |
|---|
| 2153 | |
|---|
| 2154 | bstream_t bstream_open( |
|---|
| 2155 | bband_t band, |
|---|
| 2156 | const bstream_mpeg *mpegparams |
|---|
| 2157 | ) |
|---|
| 2158 | { |
|---|
| 2159 | int rc; |
|---|
| 2160 | ioctl_settopapi_struct_bstream_open st; |
|---|
| 2161 | st.band = band; |
|---|
| 2162 | st.mpegparams = mpegparams; |
|---|
| 2163 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_open, (void*)&st); |
|---|
| 2164 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2165 | return st.__retval; |
|---|
| 2166 | } |
|---|
| 2167 | |
|---|
| 2168 | bresult bstream_set_encryption( |
|---|
| 2169 | bstream_t stream, |
|---|
| 2170 | const bencryption_params *encryption |
|---|
| 2171 | ) |
|---|
| 2172 | { |
|---|
| 2173 | int rc; |
|---|
| 2174 | ioctl_settopapi_struct_bstream_set_encryption st; |
|---|
| 2175 | st.stream = stream; |
|---|
| 2176 | st.encryption = encryption; |
|---|
| 2177 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_set_encryption, (void*)&st); |
|---|
| 2178 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2179 | return st.__retval; |
|---|
| 2180 | } |
|---|
| 2181 | |
|---|
| 2182 | void bstream_join(bstream_t video_source, bstream_t audio_source) |
|---|
| 2183 | { |
|---|
| 2184 | int rc; |
|---|
| 2185 | ioctl_settopapi_struct_bstream_join st; |
|---|
| 2186 | st.video_source = video_source; |
|---|
| 2187 | st.audio_source = audio_source; |
|---|
| 2188 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_join, (void*)&st); |
|---|
| 2189 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2190 | } |
|---|
| 2191 | |
|---|
| 2192 | bstream_t bstream_open_child(bstream_t parent, const bstream_mpeg *mpegparams) |
|---|
| 2193 | { |
|---|
| 2194 | int rc; |
|---|
| 2195 | ioctl_settopapi_struct_bstream_open_child st; |
|---|
| 2196 | st.parent = parent; |
|---|
| 2197 | st.mpegparams = mpegparams; |
|---|
| 2198 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_open_child, (void*)&st); |
|---|
| 2199 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2200 | return st.__retval; |
|---|
| 2201 | } |
|---|
| 2202 | |
|---|
| 2203 | void bstream_close( |
|---|
| 2204 | bstream_t stream |
|---|
| 2205 | ) |
|---|
| 2206 | { |
|---|
| 2207 | int rc; |
|---|
| 2208 | ioctl_settopapi_struct_bstream_close st; |
|---|
| 2209 | st.stream = stream; |
|---|
| 2210 | b_unregister_callback(ioctl_settopapi_bvbi_cc_data_ready_callback, (void*)stream); |
|---|
| 2211 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)stream); |
|---|
| 2212 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2213 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_close, (void*)&st); |
|---|
| 2214 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2215 | } |
|---|
| 2216 | |
|---|
| 2217 | bresult |
|---|
| 2218 | bstream_get_mpeg_parameters( |
|---|
| 2219 | bstream_t stream, |
|---|
| 2220 | bstream_status *status |
|---|
| 2221 | ) |
|---|
| 2222 | { |
|---|
| 2223 | int rc; |
|---|
| 2224 | ioctl_settopapi_struct_bstream_get_mpeg_parameters st; |
|---|
| 2225 | st.stream = stream; |
|---|
| 2226 | st.status = status; |
|---|
| 2227 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_get_mpeg_parameters, (void*)&st); |
|---|
| 2228 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2229 | return st.__retval; |
|---|
| 2230 | } |
|---|
| 2231 | |
|---|
| 2232 | bresult |
|---|
| 2233 | bstream_set_mpeg_parameters( |
|---|
| 2234 | bstream_t stream, |
|---|
| 2235 | const bstream_mpeg *mpeg |
|---|
| 2236 | ) |
|---|
| 2237 | { |
|---|
| 2238 | int rc; |
|---|
| 2239 | ioctl_settopapi_struct_bstream_set_mpeg_parameters st; |
|---|
| 2240 | st.stream = stream; |
|---|
| 2241 | st.mpeg = mpeg; |
|---|
| 2242 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_set_mpeg_parameters, (void*)&st); |
|---|
| 2243 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2244 | return st.__retval; |
|---|
| 2245 | } |
|---|
| 2246 | |
|---|
| 2247 | void bband_get( |
|---|
| 2248 | bband_t band, |
|---|
| 2249 | bband_settings *settings |
|---|
| 2250 | ) |
|---|
| 2251 | { |
|---|
| 2252 | int rc; |
|---|
| 2253 | ioctl_settopapi_struct_bband_get st; |
|---|
| 2254 | st.band = band; |
|---|
| 2255 | st.settings = settings; |
|---|
| 2256 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bband_get, (void*)&st); |
|---|
| 2257 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2258 | } |
|---|
| 2259 | |
|---|
| 2260 | bresult bstream_start_pcr_monitor(bstream_t stream) |
|---|
| 2261 | { |
|---|
| 2262 | int rc; |
|---|
| 2263 | ioctl_settopapi_struct_bstream_start_pcr_monitor st; |
|---|
| 2264 | st.stream = stream; |
|---|
| 2265 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_start_pcr_monitor, (void*)&st); |
|---|
| 2266 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2267 | return st.__retval; |
|---|
| 2268 | } |
|---|
| 2269 | |
|---|
| 2270 | void bstream_stop_pcr_monitor(bstream_t stream) |
|---|
| 2271 | { |
|---|
| 2272 | int rc; |
|---|
| 2273 | ioctl_settopapi_struct_bstream_stop_pcr_monitor st; |
|---|
| 2274 | st.stream = stream; |
|---|
| 2275 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_stop_pcr_monitor, (void*)&st); |
|---|
| 2276 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2277 | } |
|---|
| 2278 | |
|---|
| 2279 | bresult bstream_get_pcr_status(bstream_t stream, bstream_pcr_status *status) |
|---|
| 2280 | { |
|---|
| 2281 | int rc; |
|---|
| 2282 | ioctl_settopapi_struct_bstream_get_pcr_status st; |
|---|
| 2283 | st.stream = stream; |
|---|
| 2284 | st.status = status; |
|---|
| 2285 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_get_pcr_status, (void*)&st); |
|---|
| 2286 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2287 | return st.__retval; |
|---|
| 2288 | } |
|---|
| 2289 | |
|---|
| 2290 | void bstream_vbi_get_settings( |
|---|
| 2291 | bstream_t stream, |
|---|
| 2292 | bstream_vbi_settings *settings |
|---|
| 2293 | ) |
|---|
| 2294 | { |
|---|
| 2295 | int rc; |
|---|
| 2296 | ioctl_settopapi_struct_bstream_vbi_get_settings st; |
|---|
| 2297 | st.stream = stream; |
|---|
| 2298 | st.settings = settings; |
|---|
| 2299 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_vbi_get_settings, (void*)&st); |
|---|
| 2300 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2301 | } |
|---|
| 2302 | |
|---|
| 2303 | bresult bstream_vbi_set_settings( |
|---|
| 2304 | bstream_t stream, |
|---|
| 2305 | const bstream_vbi_settings *settings |
|---|
| 2306 | ) |
|---|
| 2307 | { |
|---|
| 2308 | int rc; |
|---|
| 2309 | ioctl_settopapi_struct_bstream_vbi_set_settings st; |
|---|
| 2310 | st.stream = stream; |
|---|
| 2311 | st.settings = settings; |
|---|
| 2312 | b_register_callback(ioctl_settopapi_bvbi_cc_data_ready_callback, (void*)stream, settings->cc_data_ready_callback, (void*)settings->callback_context); |
|---|
| 2313 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_vbi_set_settings, (void*)&st); |
|---|
| 2314 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2315 | return st.__retval; |
|---|
| 2316 | } |
|---|
| 2317 | |
|---|
| 2318 | bresult bstream_vbi_cc_read( |
|---|
| 2319 | bstream_t stream, |
|---|
| 2320 | bstream_vbi_cc *data , |
|---|
| 2321 | size_t length, |
|---|
| 2322 | size_t *length_read |
|---|
| 2323 | ) |
|---|
| 2324 | { |
|---|
| 2325 | int rc; |
|---|
| 2326 | ioctl_settopapi_struct_bstream_vbi_cc_read st; |
|---|
| 2327 | st.stream = stream; |
|---|
| 2328 | st.data = data; |
|---|
| 2329 | st.length = length; |
|---|
| 2330 | st.length_read = length_read; |
|---|
| 2331 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_vbi_cc_read, (void*)&st); |
|---|
| 2332 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2333 | return st.__retval; |
|---|
| 2334 | } |
|---|
| 2335 | |
|---|
| 2336 | bresult bstream_vbi_cc708_read( |
|---|
| 2337 | bstream_t stream, |
|---|
| 2338 | bstream_cc_708 *data , |
|---|
| 2339 | size_t length, |
|---|
| 2340 | size_t *length_read |
|---|
| 2341 | ) |
|---|
| 2342 | { |
|---|
| 2343 | int rc; |
|---|
| 2344 | ioctl_settopapi_struct_bstream_vbi_cc708_read st; |
|---|
| 2345 | st.stream = stream; |
|---|
| 2346 | st.data = data; |
|---|
| 2347 | st.length = length; |
|---|
| 2348 | st.length_read = length_read; |
|---|
| 2349 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_vbi_cc708_read, (void*)&st); |
|---|
| 2350 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2351 | return st.__retval; |
|---|
| 2352 | } |
|---|
| 2353 | |
|---|
| 2354 | bresult bdisplay_vbi_cc_write( |
|---|
| 2355 | bdisplay_t display, |
|---|
| 2356 | const bstream_vbi_cc *data , |
|---|
| 2357 | size_t length, |
|---|
| 2358 | size_t *length_written |
|---|
| 2359 | ) |
|---|
| 2360 | { |
|---|
| 2361 | int rc; |
|---|
| 2362 | ioctl_settopapi_struct_bdisplay_vbi_cc_write st; |
|---|
| 2363 | st.display = display; |
|---|
| 2364 | st.data = data; |
|---|
| 2365 | st.length = length; |
|---|
| 2366 | st.length_written = length_written; |
|---|
| 2367 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_vbi_cc_write, (void*)&st); |
|---|
| 2368 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2369 | return st.__retval; |
|---|
| 2370 | } |
|---|
| 2371 | |
|---|
| 2372 | bresult bstream_vbi_tt_read( |
|---|
| 2373 | bstream_t stream, |
|---|
| 2374 | bstream_vbi_tt *data , |
|---|
| 2375 | size_t length, |
|---|
| 2376 | size_t *length_read |
|---|
| 2377 | ) |
|---|
| 2378 | { |
|---|
| 2379 | int rc; |
|---|
| 2380 | ioctl_settopapi_struct_bstream_vbi_tt_read st; |
|---|
| 2381 | st.stream = stream; |
|---|
| 2382 | st.data = data; |
|---|
| 2383 | st.length = length; |
|---|
| 2384 | st.length_read = length_read; |
|---|
| 2385 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bstream_vbi_tt_read, (void*)&st); |
|---|
| 2386 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2387 | return st.__retval; |
|---|
| 2388 | } |
|---|
| 2389 | |
|---|
| 2390 | bresult bdisplay_vbi_tt_write( |
|---|
| 2391 | bdisplay_t display, |
|---|
| 2392 | const bstream_vbi_tt *data , |
|---|
| 2393 | size_t length, |
|---|
| 2394 | uint8_t polarity |
|---|
| 2395 | ) |
|---|
| 2396 | { |
|---|
| 2397 | int rc; |
|---|
| 2398 | ioctl_settopapi_struct_bdisplay_vbi_tt_write st; |
|---|
| 2399 | st.display = display; |
|---|
| 2400 | st.data = data; |
|---|
| 2401 | st.length = length; |
|---|
| 2402 | st.polarity = polarity; |
|---|
| 2403 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_vbi_tt_write, (void*)&st); |
|---|
| 2404 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2405 | return st.__retval; |
|---|
| 2406 | } |
|---|
| 2407 | |
|---|
| 2408 | bresult bdisplay_vbi_set_cgms( |
|---|
| 2409 | bdisplay_t display, |
|---|
| 2410 | uint32_t cgms_value |
|---|
| 2411 | ) |
|---|
| 2412 | { |
|---|
| 2413 | int rc; |
|---|
| 2414 | ioctl_settopapi_struct_bdisplay_vbi_set_cgms st; |
|---|
| 2415 | st.display = display; |
|---|
| 2416 | st.cgms_value = cgms_value; |
|---|
| 2417 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_vbi_set_cgms, (void*)&st); |
|---|
| 2418 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2419 | return st.__retval; |
|---|
| 2420 | } |
|---|
| 2421 | |
|---|
| 2422 | bresult bdisplay_vbi_set_wss( |
|---|
| 2423 | bdisplay_t display, |
|---|
| 2424 | uint16_t wss_value |
|---|
| 2425 | ) |
|---|
| 2426 | { |
|---|
| 2427 | int rc; |
|---|
| 2428 | ioctl_settopapi_struct_bdisplay_vbi_set_wss st; |
|---|
| 2429 | st.display = display; |
|---|
| 2430 | st.wss_value = wss_value; |
|---|
| 2431 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_vbi_set_wss, (void*)&st); |
|---|
| 2432 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2433 | return st.__retval; |
|---|
| 2434 | } |
|---|
| 2435 | |
|---|
| 2436 | bresult bdisplay_vbi_get_cgms( |
|---|
| 2437 | bdisplay_t display, |
|---|
| 2438 | bool *enabled |
|---|
| 2439 | ) |
|---|
| 2440 | { |
|---|
| 2441 | int rc; |
|---|
| 2442 | ioctl_settopapi_struct_bdisplay_vbi_get_cgms st; |
|---|
| 2443 | st.display = display; |
|---|
| 2444 | st.enabled = enabled; |
|---|
| 2445 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_vbi_get_cgms, (void*)&st); |
|---|
| 2446 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2447 | return st.__retval; |
|---|
| 2448 | } |
|---|
| 2449 | |
|---|
| 2450 | bresult bdisplay_vbi_get_wss( |
|---|
| 2451 | bdisplay_t display, |
|---|
| 2452 | bool *enabled |
|---|
| 2453 | ) |
|---|
| 2454 | { |
|---|
| 2455 | int rc; |
|---|
| 2456 | ioctl_settopapi_struct_bdisplay_vbi_get_wss st; |
|---|
| 2457 | st.display = display; |
|---|
| 2458 | st.enabled = enabled; |
|---|
| 2459 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdisplay_vbi_get_wss, (void*)&st); |
|---|
| 2460 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2461 | return st.__retval; |
|---|
| 2462 | } |
|---|
| 2463 | |
|---|
| 2464 | bdecode_t bdecode_open( |
|---|
| 2465 | bobject_t decode_id |
|---|
| 2466 | ) |
|---|
| 2467 | { |
|---|
| 2468 | int rc; |
|---|
| 2469 | ioctl_settopapi_struct_bdecode_open st; |
|---|
| 2470 | st.decode_id = decode_id; |
|---|
| 2471 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_open, (void*)&st); |
|---|
| 2472 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2473 | return st.__retval; |
|---|
| 2474 | } |
|---|
| 2475 | |
|---|
| 2476 | void bdecode_mosaic_settings_init( |
|---|
| 2477 | bdecode_t parent, |
|---|
| 2478 | bdecode_mosaic_settings *settings |
|---|
| 2479 | ) |
|---|
| 2480 | { |
|---|
| 2481 | int rc; |
|---|
| 2482 | ioctl_settopapi_struct_bdecode_mosaic_settings_init st; |
|---|
| 2483 | st.parent = parent; |
|---|
| 2484 | st.settings = settings; |
|---|
| 2485 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_mosaic_settings_init, (void*)&st); |
|---|
| 2486 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2487 | } |
|---|
| 2488 | |
|---|
| 2489 | bdecode_t bdecode_open_mosaic( |
|---|
| 2490 | bdecode_t parent, |
|---|
| 2491 | bobject_t decode_id, |
|---|
| 2492 | const bdecode_mosaic_settings *settings |
|---|
| 2493 | ) |
|---|
| 2494 | { |
|---|
| 2495 | int rc; |
|---|
| 2496 | ioctl_settopapi_struct_bdecode_open_mosaic st; |
|---|
| 2497 | st.parent = parent; |
|---|
| 2498 | st.decode_id = decode_id; |
|---|
| 2499 | st.settings = settings; |
|---|
| 2500 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_open_mosaic, (void*)&st); |
|---|
| 2501 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2502 | return st.__retval; |
|---|
| 2503 | } |
|---|
| 2504 | |
|---|
| 2505 | void bdecode_close( |
|---|
| 2506 | bdecode_t decode |
|---|
| 2507 | ) |
|---|
| 2508 | { |
|---|
| 2509 | int rc; |
|---|
| 2510 | ioctl_settopapi_struct_bdecode_close st; |
|---|
| 2511 | st.decode = decode; |
|---|
| 2512 | b_unregister_callback(ioctl_settopapi_bdecode_settings_still_picture_done, (void*)decode); |
|---|
| 2513 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)decode); |
|---|
| 2514 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2515 | b_unregister_callback(ioctl_settopapi_bdecode_settings_video_source_changed, (void*)decode); |
|---|
| 2516 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)decode); |
|---|
| 2517 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2518 | b_unregister_callback(ioctl_settopapi_bdecode_settings_audio_source_changed, (void*)decode); |
|---|
| 2519 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)decode); |
|---|
| 2520 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2521 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_close, (void*)&st); |
|---|
| 2522 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2523 | } |
|---|
| 2524 | |
|---|
| 2525 | void bdecode_get( |
|---|
| 2526 | bdecode_t decode, |
|---|
| 2527 | bdecode_settings *settings |
|---|
| 2528 | ) |
|---|
| 2529 | { |
|---|
| 2530 | int rc; |
|---|
| 2531 | ioctl_settopapi_struct_bdecode_get st; |
|---|
| 2532 | st.decode = decode; |
|---|
| 2533 | st.settings = settings; |
|---|
| 2534 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_get, (void*)&st); |
|---|
| 2535 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2536 | settings->still_picture_done = b_lookup_callback(ioctl_settopapi_bdecode_settings_still_picture_done, (void*)decode); |
|---|
| 2537 | settings->video.source_changed = b_lookup_callback(ioctl_settopapi_bdecode_settings_video_source_changed, (void*)decode); |
|---|
| 2538 | settings->audio.source_changed = b_lookup_callback(ioctl_settopapi_bdecode_settings_audio_source_changed, (void*)decode); |
|---|
| 2539 | } |
|---|
| 2540 | |
|---|
| 2541 | bresult bdecode_set( |
|---|
| 2542 | bdecode_t decode, |
|---|
| 2543 | const bdecode_settings *settings |
|---|
| 2544 | ) |
|---|
| 2545 | { |
|---|
| 2546 | int rc; |
|---|
| 2547 | ioctl_settopapi_struct_bdecode_set st; |
|---|
| 2548 | st.decode = decode; |
|---|
| 2549 | st.settings = settings; |
|---|
| 2550 | b_register_callback(ioctl_settopapi_bdecode_settings_still_picture_done, (void*)decode, settings->still_picture_done, (void*)settings->callback_context); |
|---|
| 2551 | b_register_callback(ioctl_settopapi_bdecode_settings_video_source_changed, (void*)decode, settings->video.source_changed, (void*)settings->callback_context); |
|---|
| 2552 | b_register_callback(ioctl_settopapi_bdecode_settings_audio_source_changed, (void*)decode, settings->audio.source_changed, (void*)settings->callback_context); |
|---|
| 2553 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_set, (void*)&st); |
|---|
| 2554 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2555 | return st.__retval; |
|---|
| 2556 | } |
|---|
| 2557 | |
|---|
| 2558 | bresult bdecode_display_surface( |
|---|
| 2559 | bdecode_t decode, |
|---|
| 2560 | bsurface_t surface, |
|---|
| 2561 | bdecode_window_t window |
|---|
| 2562 | ) |
|---|
| 2563 | { |
|---|
| 2564 | int rc; |
|---|
| 2565 | ioctl_settopapi_struct_bdecode_display_surface st; |
|---|
| 2566 | st.decode = decode; |
|---|
| 2567 | st.surface = surface; |
|---|
| 2568 | st.window = window; |
|---|
| 2569 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_display_surface, (void*)&st); |
|---|
| 2570 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2571 | return st.__retval; |
|---|
| 2572 | } |
|---|
| 2573 | |
|---|
| 2574 | bresult bdecode_start( |
|---|
| 2575 | bdecode_t decode, |
|---|
| 2576 | bstream_t source, |
|---|
| 2577 | bdecode_window_t window |
|---|
| 2578 | ) |
|---|
| 2579 | { |
|---|
| 2580 | int rc; |
|---|
| 2581 | ioctl_settopapi_struct_bdecode_start st; |
|---|
| 2582 | st.decode = decode; |
|---|
| 2583 | st.source = source; |
|---|
| 2584 | st.window = window; |
|---|
| 2585 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_start, (void*)&st); |
|---|
| 2586 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2587 | return st.__retval; |
|---|
| 2588 | } |
|---|
| 2589 | |
|---|
| 2590 | void bdecode_stop( |
|---|
| 2591 | bdecode_t decode |
|---|
| 2592 | ) |
|---|
| 2593 | { |
|---|
| 2594 | int rc; |
|---|
| 2595 | ioctl_settopapi_struct_bdecode_stop st; |
|---|
| 2596 | st.decode = decode; |
|---|
| 2597 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_stop, (void*)&st); |
|---|
| 2598 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2599 | } |
|---|
| 2600 | |
|---|
| 2601 | baudio_decode_t bdecode_detach_audio( |
|---|
| 2602 | bdecode_t decode |
|---|
| 2603 | ) |
|---|
| 2604 | { |
|---|
| 2605 | int rc; |
|---|
| 2606 | ioctl_settopapi_struct_bdecode_detach_audio st; |
|---|
| 2607 | st.decode = decode; |
|---|
| 2608 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_detach_audio, (void*)&st); |
|---|
| 2609 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2610 | return st.__retval; |
|---|
| 2611 | } |
|---|
| 2612 | |
|---|
| 2613 | bresult bdecode_attach_audio( |
|---|
| 2614 | bdecode_t decode, |
|---|
| 2615 | baudio_decode_t audio |
|---|
| 2616 | ) |
|---|
| 2617 | { |
|---|
| 2618 | int rc; |
|---|
| 2619 | ioctl_settopapi_struct_bdecode_attach_audio st; |
|---|
| 2620 | st.decode = decode; |
|---|
| 2621 | st.audio = audio; |
|---|
| 2622 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_attach_audio, (void*)&st); |
|---|
| 2623 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2624 | return st.__retval; |
|---|
| 2625 | } |
|---|
| 2626 | |
|---|
| 2627 | bresult bdecode_set_audio_program( |
|---|
| 2628 | bdecode_t decode, |
|---|
| 2629 | unsigned index |
|---|
| 2630 | ) |
|---|
| 2631 | { |
|---|
| 2632 | int rc; |
|---|
| 2633 | ioctl_settopapi_struct_bdecode_set_audio_program st; |
|---|
| 2634 | st.decode = decode; |
|---|
| 2635 | st.index = index; |
|---|
| 2636 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_set_audio_program, (void*)&st); |
|---|
| 2637 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2638 | return st.__retval; |
|---|
| 2639 | } |
|---|
| 2640 | |
|---|
| 2641 | baudio_decode_t bdecode_get_audio( |
|---|
| 2642 | bdecode_t decode, |
|---|
| 2643 | bobject_t audio_id |
|---|
| 2644 | ) |
|---|
| 2645 | { |
|---|
| 2646 | int rc; |
|---|
| 2647 | ioctl_settopapi_struct_bdecode_get_audio st; |
|---|
| 2648 | st.decode = decode; |
|---|
| 2649 | st.audio_id = audio_id; |
|---|
| 2650 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_get_audio, (void*)&st); |
|---|
| 2651 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2652 | return st.__retval; |
|---|
| 2653 | } |
|---|
| 2654 | |
|---|
| 2655 | bvideo_decode_t bdecode_detach_video( |
|---|
| 2656 | bdecode_t decode |
|---|
| 2657 | ) |
|---|
| 2658 | { |
|---|
| 2659 | int rc; |
|---|
| 2660 | ioctl_settopapi_struct_bdecode_detach_video st; |
|---|
| 2661 | st.decode = decode; |
|---|
| 2662 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_detach_video, (void*)&st); |
|---|
| 2663 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2664 | return st.__retval; |
|---|
| 2665 | } |
|---|
| 2666 | |
|---|
| 2667 | bresult bdecode_attach_video( |
|---|
| 2668 | bdecode_t decode, |
|---|
| 2669 | bvideo_decode_t video |
|---|
| 2670 | ) |
|---|
| 2671 | { |
|---|
| 2672 | int rc; |
|---|
| 2673 | ioctl_settopapi_struct_bdecode_attach_video st; |
|---|
| 2674 | st.decode = decode; |
|---|
| 2675 | st.video = video; |
|---|
| 2676 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_attach_video, (void*)&st); |
|---|
| 2677 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2678 | return st.__retval; |
|---|
| 2679 | } |
|---|
| 2680 | |
|---|
| 2681 | bresult bdecode_set_video_program( |
|---|
| 2682 | bdecode_t decode, |
|---|
| 2683 | unsigned index |
|---|
| 2684 | ) |
|---|
| 2685 | { |
|---|
| 2686 | int rc; |
|---|
| 2687 | ioctl_settopapi_struct_bdecode_set_video_program st; |
|---|
| 2688 | st.decode = decode; |
|---|
| 2689 | st.index = index; |
|---|
| 2690 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_set_video_program, (void*)&st); |
|---|
| 2691 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2692 | return st.__retval; |
|---|
| 2693 | } |
|---|
| 2694 | |
|---|
| 2695 | bvideo_decode_t bdecode_get_video( |
|---|
| 2696 | bdecode_t decode, |
|---|
| 2697 | bobject_t video_id |
|---|
| 2698 | ) |
|---|
| 2699 | { |
|---|
| 2700 | int rc; |
|---|
| 2701 | ioctl_settopapi_struct_bdecode_get_video st; |
|---|
| 2702 | st.decode = decode; |
|---|
| 2703 | st.video_id = video_id; |
|---|
| 2704 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_get_video, (void*)&st); |
|---|
| 2705 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2706 | return st.__retval; |
|---|
| 2707 | } |
|---|
| 2708 | |
|---|
| 2709 | void baudio_decode_get_status( |
|---|
| 2710 | baudio_decode_t audio, |
|---|
| 2711 | baudio_decode_status *status |
|---|
| 2712 | ) |
|---|
| 2713 | { |
|---|
| 2714 | int rc; |
|---|
| 2715 | ioctl_settopapi_struct_baudio_decode_get_status st; |
|---|
| 2716 | st.audio = audio; |
|---|
| 2717 | st.status = status; |
|---|
| 2718 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_baudio_decode_get_status, (void*)&st); |
|---|
| 2719 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2720 | } |
|---|
| 2721 | |
|---|
| 2722 | void bvideo_decode_get_status( |
|---|
| 2723 | bvideo_decode_t video, |
|---|
| 2724 | bvideo_decode_status *status |
|---|
| 2725 | ) |
|---|
| 2726 | { |
|---|
| 2727 | int rc; |
|---|
| 2728 | ioctl_settopapi_struct_bvideo_decode_get_status st; |
|---|
| 2729 | st.video = video; |
|---|
| 2730 | st.status = status; |
|---|
| 2731 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bvideo_decode_get_status, (void*)&st); |
|---|
| 2732 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2733 | } |
|---|
| 2734 | |
|---|
| 2735 | bresult bdecode_get_status( |
|---|
| 2736 | bdecode_t decode, |
|---|
| 2737 | bdecode_status *status |
|---|
| 2738 | ) |
|---|
| 2739 | { |
|---|
| 2740 | int rc; |
|---|
| 2741 | ioctl_settopapi_struct_bdecode_get_status st; |
|---|
| 2742 | st.decode = decode; |
|---|
| 2743 | st.status = status; |
|---|
| 2744 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_get_status, (void*)&st); |
|---|
| 2745 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2746 | return st.__retval; |
|---|
| 2747 | } |
|---|
| 2748 | |
|---|
| 2749 | bresult bdecode_set_audio_volume( |
|---|
| 2750 | bdecode_t decode, |
|---|
| 2751 | const baudio_volume *volume |
|---|
| 2752 | ) |
|---|
| 2753 | { |
|---|
| 2754 | int rc; |
|---|
| 2755 | ioctl_settopapi_struct_bdecode_set_audio_volume st; |
|---|
| 2756 | st.decode = decode; |
|---|
| 2757 | st.volume = volume; |
|---|
| 2758 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_set_audio_volume, (void*)&st); |
|---|
| 2759 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2760 | return st.__retval; |
|---|
| 2761 | } |
|---|
| 2762 | |
|---|
| 2763 | bresult bdecode_get_audio_volume( |
|---|
| 2764 | bdecode_t decode, |
|---|
| 2765 | baudio_volume *volume |
|---|
| 2766 | ) |
|---|
| 2767 | { |
|---|
| 2768 | int rc; |
|---|
| 2769 | ioctl_settopapi_struct_bdecode_get_audio_volume st; |
|---|
| 2770 | st.decode = decode; |
|---|
| 2771 | st.volume = volume; |
|---|
| 2772 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_get_audio_volume, (void*)&st); |
|---|
| 2773 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2774 | return st.__retval; |
|---|
| 2775 | } |
|---|
| 2776 | |
|---|
| 2777 | bresult bdecode_get_stc(bdecode_t decode, uint32_t *stc) |
|---|
| 2778 | { |
|---|
| 2779 | int rc; |
|---|
| 2780 | ioctl_settopapi_struct_bdecode_get_stc st; |
|---|
| 2781 | st.decode = decode; |
|---|
| 2782 | st.stc = stc; |
|---|
| 2783 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_get_stc, (void*)&st); |
|---|
| 2784 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2785 | return st.__retval; |
|---|
| 2786 | } |
|---|
| 2787 | |
|---|
| 2788 | bresult bdecode_set_stc(bdecode_t decode, uint32_t stc) |
|---|
| 2789 | { |
|---|
| 2790 | int rc; |
|---|
| 2791 | ioctl_settopapi_struct_bdecode_set_stc st; |
|---|
| 2792 | st.decode = decode; |
|---|
| 2793 | st.stc = stc; |
|---|
| 2794 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_set_stc, (void*)&st); |
|---|
| 2795 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2796 | return st.__retval; |
|---|
| 2797 | } |
|---|
| 2798 | |
|---|
| 2799 | void bdecode_slow_clock( |
|---|
| 2800 | bdecode_t decode, |
|---|
| 2801 | bool slow |
|---|
| 2802 | ) |
|---|
| 2803 | { |
|---|
| 2804 | int rc; |
|---|
| 2805 | ioctl_settopapi_struct_bdecode_slow_clock st; |
|---|
| 2806 | st.decode = decode; |
|---|
| 2807 | st.slow = slow; |
|---|
| 2808 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_slow_clock, (void*)&st); |
|---|
| 2809 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2810 | } |
|---|
| 2811 | |
|---|
| 2812 | bresult bdecode_read_metadata( |
|---|
| 2813 | bdecode_t decode, |
|---|
| 2814 | void *buffer , |
|---|
| 2815 | unsigned size, |
|---|
| 2816 | unsigned *amount_read |
|---|
| 2817 | ) |
|---|
| 2818 | { |
|---|
| 2819 | int rc; |
|---|
| 2820 | ioctl_settopapi_struct_bdecode_read_metadata st; |
|---|
| 2821 | st.decode = decode; |
|---|
| 2822 | st.buffer = buffer; |
|---|
| 2823 | st.size = size; |
|---|
| 2824 | st.amount_read = amount_read; |
|---|
| 2825 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_read_metadata, (void*)&st); |
|---|
| 2826 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2827 | return st.__retval; |
|---|
| 2828 | } |
|---|
| 2829 | |
|---|
| 2830 | bresult bdecode_allocate_capture_buffers( |
|---|
| 2831 | bdecode_t decode, |
|---|
| 2832 | unsigned count |
|---|
| 2833 | ) |
|---|
| 2834 | { |
|---|
| 2835 | int rc; |
|---|
| 2836 | ioctl_settopapi_struct_bdecode_allocate_capture_buffers st; |
|---|
| 2837 | st.decode = decode; |
|---|
| 2838 | st.count = count; |
|---|
| 2839 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_allocate_capture_buffers, (void*)&st); |
|---|
| 2840 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2841 | return st.__retval; |
|---|
| 2842 | } |
|---|
| 2843 | |
|---|
| 2844 | bsurface_t bdecode_acquire_capture_buffer( |
|---|
| 2845 | bdecode_t decode, |
|---|
| 2846 | bgraphics_t graphics, |
|---|
| 2847 | bool *top_field |
|---|
| 2848 | ) |
|---|
| 2849 | { |
|---|
| 2850 | int rc; |
|---|
| 2851 | ioctl_settopapi_struct_bdecode_acquire_capture_buffer st; |
|---|
| 2852 | st.decode = decode; |
|---|
| 2853 | st.graphics = graphics; |
|---|
| 2854 | st.top_field = top_field; |
|---|
| 2855 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_acquire_capture_buffer, (void*)&st); |
|---|
| 2856 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2857 | return st.__retval; |
|---|
| 2858 | } |
|---|
| 2859 | |
|---|
| 2860 | bresult bdecode_release_capture_buffer( |
|---|
| 2861 | bdecode_t decode, |
|---|
| 2862 | bsurface_t surface |
|---|
| 2863 | ) |
|---|
| 2864 | { |
|---|
| 2865 | int rc; |
|---|
| 2866 | ioctl_settopapi_struct_bdecode_release_capture_buffer st; |
|---|
| 2867 | st.decode = decode; |
|---|
| 2868 | st.surface = surface; |
|---|
| 2869 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bdecode_release_capture_buffer, (void*)&st); |
|---|
| 2870 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2871 | return st.__retval; |
|---|
| 2872 | } |
|---|
| 2873 | |
|---|
| 2874 | void bsettop_get_power_state(bsettop_power_state *state) |
|---|
| 2875 | { |
|---|
| 2876 | int rc; |
|---|
| 2877 | ioctl_settopapi_struct_bsettop_get_power_state st; |
|---|
| 2878 | st.state = state; |
|---|
| 2879 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsettop_get_power_state, (void*)&st); |
|---|
| 2880 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2881 | } |
|---|
| 2882 | |
|---|
| 2883 | bresult bsettop_set_power_state(const bsettop_power_state *state) |
|---|
| 2884 | { |
|---|
| 2885 | int rc; |
|---|
| 2886 | ioctl_settopapi_struct_bsettop_set_power_state st; |
|---|
| 2887 | st.state = state; |
|---|
| 2888 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsettop_set_power_state, (void*)&st); |
|---|
| 2889 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 2890 | return st.__retval; |
|---|
| 2891 | } |
|---|
| 2892 | |
|---|
| 2893 | int bsettop_init_frontend(void) |
|---|
| 2894 | { |
|---|
| 2895 | int rc; |
|---|
| 2896 | ioctl_settopapi_struct_bsettop_init_frontend st; |
|---|
| 2897 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bsettop_init_frontend, (void*)&st); |
|---|
| 2898 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2899 | return st.__retval; |
|---|
| 2900 | } |
|---|
| 2901 | |
|---|
| 2902 | btuner_t btuner_open( |
|---|
| 2903 | bobject_t tuner_id |
|---|
| 2904 | ) |
|---|
| 2905 | { |
|---|
| 2906 | int rc; |
|---|
| 2907 | ioctl_settopapi_struct_btuner_open st; |
|---|
| 2908 | st.tuner_id = tuner_id; |
|---|
| 2909 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_open, (void*)&st); |
|---|
| 2910 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 2911 | return st.__retval; |
|---|
| 2912 | } |
|---|
| 2913 | |
|---|
| 2914 | void btuner_close( |
|---|
| 2915 | btuner_t tuner |
|---|
| 2916 | ) |
|---|
| 2917 | { |
|---|
| 2918 | int rc; |
|---|
| 2919 | ioctl_settopapi_struct_btuner_close st; |
|---|
| 2920 | st.tuner = tuner; |
|---|
| 2921 | b_unregister_callback(ioctl_settopapi_btuner_qam_params_lock_callback, (void*)tuner); |
|---|
| 2922 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)tuner); |
|---|
| 2923 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2924 | b_unregister_callback(ioctl_settopapi_btuner_oob_params_lock_callback, (void*)tuner); |
|---|
| 2925 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)tuner); |
|---|
| 2926 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2927 | b_unregister_callback(ioctl_settopapi_btuner_sds_params_lock_callback, (void*)tuner); |
|---|
| 2928 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)tuner); |
|---|
| 2929 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2930 | b_unregister_callback(ioctl_settopapi_btuner_vsb_params_lock_callback, (void*)tuner); |
|---|
| 2931 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_free_handle_callbacks, (void*)tuner); |
|---|
| 2932 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2933 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_close, (void*)&st); |
|---|
| 2934 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2935 | } |
|---|
| 2936 | |
|---|
| 2937 | void btuner_qam_params_init( |
|---|
| 2938 | btuner_qam_params *qam, |
|---|
| 2939 | btuner_t tuner |
|---|
| 2940 | ) |
|---|
| 2941 | { |
|---|
| 2942 | int rc; |
|---|
| 2943 | ioctl_settopapi_struct_btuner_qam_params_init st; |
|---|
| 2944 | st.qam = qam; |
|---|
| 2945 | st.tuner = tuner; |
|---|
| 2946 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_qam_params_init, (void*)&st); |
|---|
| 2947 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2948 | } |
|---|
| 2949 | |
|---|
| 2950 | void btuner_ofdm_params_init( |
|---|
| 2951 | btuner_ofdm_params *ofdm, |
|---|
| 2952 | btuner_t tuner |
|---|
| 2953 | ) |
|---|
| 2954 | { |
|---|
| 2955 | int rc; |
|---|
| 2956 | ioctl_settopapi_struct_btuner_ofdm_params_init st; |
|---|
| 2957 | st.ofdm = ofdm; |
|---|
| 2958 | st.tuner = tuner; |
|---|
| 2959 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_ofdm_params_init, (void*)&st); |
|---|
| 2960 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2961 | } |
|---|
| 2962 | |
|---|
| 2963 | void btuner_analog_params_init( |
|---|
| 2964 | btuner_analog_params *analog, |
|---|
| 2965 | btuner_t tuner |
|---|
| 2966 | ) |
|---|
| 2967 | { |
|---|
| 2968 | int rc; |
|---|
| 2969 | ioctl_settopapi_struct_btuner_analog_params_init st; |
|---|
| 2970 | st.analog = analog; |
|---|
| 2971 | st.tuner = tuner; |
|---|
| 2972 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_analog_params_init, (void*)&st); |
|---|
| 2973 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2974 | } |
|---|
| 2975 | |
|---|
| 2976 | void btuner_qam_us_params_init( |
|---|
| 2977 | btuner_qam_us_params *us_param, |
|---|
| 2978 | btuner_t tuner |
|---|
| 2979 | ) |
|---|
| 2980 | { |
|---|
| 2981 | int rc; |
|---|
| 2982 | ioctl_settopapi_struct_btuner_qam_us_params_init st; |
|---|
| 2983 | st.us_param = us_param; |
|---|
| 2984 | st.tuner = tuner; |
|---|
| 2985 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_qam_us_params_init, (void*)&st); |
|---|
| 2986 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 2987 | } |
|---|
| 2988 | |
|---|
| 2989 | void btuner_sds_params_init( |
|---|
| 2990 | btuner_sds_params *sds, |
|---|
| 2991 | btuner_t tuner |
|---|
| 2992 | ) |
|---|
| 2993 | { |
|---|
| 2994 | int rc; |
|---|
| 2995 | ioctl_settopapi_struct_btuner_sds_params_init st; |
|---|
| 2996 | st.sds = sds; |
|---|
| 2997 | st.tuner = tuner; |
|---|
| 2998 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_sds_params_init, (void*)&st); |
|---|
| 2999 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 3000 | } |
|---|
| 3001 | |
|---|
| 3002 | void btuner_vsb_params_init( |
|---|
| 3003 | btuner_vsb_params *vsb, |
|---|
| 3004 | btuner_t tuner |
|---|
| 3005 | ) |
|---|
| 3006 | { |
|---|
| 3007 | int rc; |
|---|
| 3008 | ioctl_settopapi_struct_btuner_vsb_params_init st; |
|---|
| 3009 | st.vsb = vsb; |
|---|
| 3010 | st.tuner = tuner; |
|---|
| 3011 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_vsb_params_init, (void*)&st); |
|---|
| 3012 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 3013 | } |
|---|
| 3014 | |
|---|
| 3015 | btuner_linein_t btuner_linein_open(bobject_t linein_id) |
|---|
| 3016 | { |
|---|
| 3017 | int rc; |
|---|
| 3018 | ioctl_settopapi_struct_btuner_linein_open st; |
|---|
| 3019 | st.linein_id = linein_id; |
|---|
| 3020 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_linein_open, (void*)&st); |
|---|
| 3021 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3022 | return st.__retval; |
|---|
| 3023 | } |
|---|
| 3024 | |
|---|
| 3025 | bband_t btuner_tune_qam( |
|---|
| 3026 | btuner_t tuner, |
|---|
| 3027 | unsigned freq, |
|---|
| 3028 | const btuner_qam_params *params |
|---|
| 3029 | ) |
|---|
| 3030 | { |
|---|
| 3031 | int rc; |
|---|
| 3032 | ioctl_settopapi_struct_btuner_tune_qam st; |
|---|
| 3033 | st.tuner = tuner; |
|---|
| 3034 | st.freq = freq; |
|---|
| 3035 | st.params = params; |
|---|
| 3036 | b_register_callback(ioctl_settopapi_btuner_qam_params_lock_callback, (void*)tuner, params->lock_callback, (void*)params->callback_context); |
|---|
| 3037 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_tune_qam, (void*)&st); |
|---|
| 3038 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3039 | return st.__retval; |
|---|
| 3040 | } |
|---|
| 3041 | |
|---|
| 3042 | bresult |
|---|
| 3043 | btuner_tune_oob( |
|---|
| 3044 | btuner_t tuner, |
|---|
| 3045 | unsigned freq, |
|---|
| 3046 | const btuner_qam_params *params |
|---|
| 3047 | ) |
|---|
| 3048 | { |
|---|
| 3049 | int rc; |
|---|
| 3050 | ioctl_settopapi_struct_btuner_tune_oob st; |
|---|
| 3051 | st.tuner = tuner; |
|---|
| 3052 | st.freq = freq; |
|---|
| 3053 | st.params = params; |
|---|
| 3054 | b_register_callback(ioctl_settopapi_btuner_oob_params_lock_callback, (void*)tuner, params->lock_callback, (void*)params->callback_context); |
|---|
| 3055 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_tune_oob, (void*)&st); |
|---|
| 3056 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3057 | return st.__retval; |
|---|
| 3058 | } |
|---|
| 3059 | |
|---|
| 3060 | bresult |
|---|
| 3061 | btuner_tune_qam_us( |
|---|
| 3062 | btuner_t tuner, |
|---|
| 3063 | unsigned freq, |
|---|
| 3064 | const btuner_qam_us_params *params |
|---|
| 3065 | ) |
|---|
| 3066 | { |
|---|
| 3067 | int rc; |
|---|
| 3068 | ioctl_settopapi_struct_btuner_tune_qam_us st; |
|---|
| 3069 | st.tuner = tuner; |
|---|
| 3070 | st.freq = freq; |
|---|
| 3071 | st.params = params; |
|---|
| 3072 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_tune_qam_us, (void*)&st); |
|---|
| 3073 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3074 | return st.__retval; |
|---|
| 3075 | } |
|---|
| 3076 | |
|---|
| 3077 | bband_t btuner_tune_sds( |
|---|
| 3078 | btuner_t tuner, |
|---|
| 3079 | unsigned freq, |
|---|
| 3080 | const btuner_sds_params *params |
|---|
| 3081 | ) |
|---|
| 3082 | { |
|---|
| 3083 | int rc; |
|---|
| 3084 | ioctl_settopapi_struct_btuner_tune_sds st; |
|---|
| 3085 | st.tuner = tuner; |
|---|
| 3086 | st.freq = freq; |
|---|
| 3087 | st.params = params; |
|---|
| 3088 | b_register_callback(ioctl_settopapi_btuner_sds_params_lock_callback, (void*)tuner, params->lock_callback, (void*)params->callback_context); |
|---|
| 3089 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_tune_sds, (void*)&st); |
|---|
| 3090 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3091 | return st.__retval; |
|---|
| 3092 | } |
|---|
| 3093 | |
|---|
| 3094 | bband_t btuner_tune_vsb( |
|---|
| 3095 | btuner_t tuner, |
|---|
| 3096 | unsigned freq, |
|---|
| 3097 | const btuner_vsb_params *params |
|---|
| 3098 | ) |
|---|
| 3099 | { |
|---|
| 3100 | int rc; |
|---|
| 3101 | ioctl_settopapi_struct_btuner_tune_vsb st; |
|---|
| 3102 | st.tuner = tuner; |
|---|
| 3103 | st.freq = freq; |
|---|
| 3104 | st.params = params; |
|---|
| 3105 | b_register_callback(ioctl_settopapi_btuner_vsb_params_lock_callback, (void*)tuner, params->lock_callback, (void*)params->callback_context); |
|---|
| 3106 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_tune_vsb, (void*)&st); |
|---|
| 3107 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3108 | return st.__retval; |
|---|
| 3109 | } |
|---|
| 3110 | |
|---|
| 3111 | bband_t |
|---|
| 3112 | btuner_tune_ofdm( |
|---|
| 3113 | btuner_t tuner, |
|---|
| 3114 | unsigned freq, |
|---|
| 3115 | const btuner_ofdm_params* params |
|---|
| 3116 | ) |
|---|
| 3117 | { |
|---|
| 3118 | int rc; |
|---|
| 3119 | ioctl_settopapi_struct_btuner_tune_ofdm st; |
|---|
| 3120 | st.tuner = tuner; |
|---|
| 3121 | st.freq = freq; |
|---|
| 3122 | st.params = params; |
|---|
| 3123 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_tune_ofdm, (void*)&st); |
|---|
| 3124 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3125 | return st.__retval; |
|---|
| 3126 | } |
|---|
| 3127 | |
|---|
| 3128 | bstream_t btuner_tune_rf( |
|---|
| 3129 | btuner_t tuner, |
|---|
| 3130 | unsigned carrierfreq, |
|---|
| 3131 | const btuner_analog_params *params |
|---|
| 3132 | ) |
|---|
| 3133 | { |
|---|
| 3134 | int rc; |
|---|
| 3135 | ioctl_settopapi_struct_btuner_tune_rf st; |
|---|
| 3136 | st.tuner = tuner; |
|---|
| 3137 | st.carrierfreq = carrierfreq; |
|---|
| 3138 | st.params = params; |
|---|
| 3139 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_tune_rf, (void*)&st); |
|---|
| 3140 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3141 | return st.__retval; |
|---|
| 3142 | } |
|---|
| 3143 | |
|---|
| 3144 | bstream_t btuner_tune_linein( |
|---|
| 3145 | btuner_t tuner, |
|---|
| 3146 | btuner_linein_t linein, |
|---|
| 3147 | const btuner_analog_params *params |
|---|
| 3148 | ) |
|---|
| 3149 | { |
|---|
| 3150 | int rc; |
|---|
| 3151 | ioctl_settopapi_struct_btuner_tune_linein st; |
|---|
| 3152 | st.tuner = tuner; |
|---|
| 3153 | st.linein = linein; |
|---|
| 3154 | st.params = params; |
|---|
| 3155 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_tune_linein, (void*)&st); |
|---|
| 3156 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3157 | return st.__retval; |
|---|
| 3158 | } |
|---|
| 3159 | |
|---|
| 3160 | bresult btuner_get_analog_status( |
|---|
| 3161 | btuner_t tuner, |
|---|
| 3162 | btuner_analog_status *status |
|---|
| 3163 | ) |
|---|
| 3164 | { |
|---|
| 3165 | int rc; |
|---|
| 3166 | ioctl_settopapi_struct_btuner_get_analog_status st; |
|---|
| 3167 | st.tuner = tuner; |
|---|
| 3168 | st.status = status; |
|---|
| 3169 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_get_analog_status, (void*)&st); |
|---|
| 3170 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3171 | return st.__retval; |
|---|
| 3172 | } |
|---|
| 3173 | |
|---|
| 3174 | bresult btuner_get_qam_status( |
|---|
| 3175 | btuner_t tuner, |
|---|
| 3176 | btuner_qam_status *status |
|---|
| 3177 | ) |
|---|
| 3178 | { |
|---|
| 3179 | int rc; |
|---|
| 3180 | ioctl_settopapi_struct_btuner_get_qam_status st; |
|---|
| 3181 | st.tuner = tuner; |
|---|
| 3182 | st.status = status; |
|---|
| 3183 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_get_qam_status, (void*)&st); |
|---|
| 3184 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3185 | return st.__retval; |
|---|
| 3186 | } |
|---|
| 3187 | |
|---|
| 3188 | bresult btuner_get_qam_us_status( |
|---|
| 3189 | btuner_t tuner, |
|---|
| 3190 | btuner_qam_us_status *status |
|---|
| 3191 | ) |
|---|
| 3192 | { |
|---|
| 3193 | int rc; |
|---|
| 3194 | ioctl_settopapi_struct_btuner_get_qam_us_status st; |
|---|
| 3195 | st.tuner = tuner; |
|---|
| 3196 | st.status = status; |
|---|
| 3197 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_get_qam_us_status, (void*)&st); |
|---|
| 3198 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3199 | return st.__retval; |
|---|
| 3200 | } |
|---|
| 3201 | |
|---|
| 3202 | bresult btuner_get_sds_status( |
|---|
| 3203 | btuner_t tuner, |
|---|
| 3204 | btuner_sds_status *status |
|---|
| 3205 | ) |
|---|
| 3206 | { |
|---|
| 3207 | int rc; |
|---|
| 3208 | ioctl_settopapi_struct_btuner_get_sds_status st; |
|---|
| 3209 | st.tuner = tuner; |
|---|
| 3210 | st.status = status; |
|---|
| 3211 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_get_sds_status, (void*)&st); |
|---|
| 3212 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3213 | return st.__retval; |
|---|
| 3214 | } |
|---|
| 3215 | |
|---|
| 3216 | bresult btuner_get_vsb_status( |
|---|
| 3217 | btuner_t tuner, |
|---|
| 3218 | btuner_vsb_status *status |
|---|
| 3219 | ) |
|---|
| 3220 | { |
|---|
| 3221 | int rc; |
|---|
| 3222 | ioctl_settopapi_struct_btuner_get_vsb_status st; |
|---|
| 3223 | st.tuner = tuner; |
|---|
| 3224 | st.status = status; |
|---|
| 3225 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_get_vsb_status, (void*)&st); |
|---|
| 3226 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3227 | return st.__retval; |
|---|
| 3228 | } |
|---|
| 3229 | |
|---|
| 3230 | bresult btuner_get_ofdm_status( |
|---|
| 3231 | btuner_t tuner, |
|---|
| 3232 | btuner_ofdm_status *status |
|---|
| 3233 | ) |
|---|
| 3234 | { |
|---|
| 3235 | int rc; |
|---|
| 3236 | ioctl_settopapi_struct_btuner_get_ofdm_status st; |
|---|
| 3237 | st.tuner = tuner; |
|---|
| 3238 | st.status = status; |
|---|
| 3239 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_get_ofdm_status, (void*)&st); |
|---|
| 3240 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3241 | return st.__retval; |
|---|
| 3242 | } |
|---|
| 3243 | |
|---|
| 3244 | bresult btuner_get_soft_decisions( |
|---|
| 3245 | btuner_t tuner, |
|---|
| 3246 | btuner_soft_decision *data , |
|---|
| 3247 | size_t length |
|---|
| 3248 | ) |
|---|
| 3249 | { |
|---|
| 3250 | int rc; |
|---|
| 3251 | ioctl_settopapi_struct_btuner_get_soft_decisions st; |
|---|
| 3252 | st.tuner = tuner; |
|---|
| 3253 | st.data = data; |
|---|
| 3254 | st.length = length; |
|---|
| 3255 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_btuner_get_soft_decisions, (void*)&st); |
|---|
| 3256 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3257 | return st.__retval; |
|---|
| 3258 | } |
|---|
| 3259 | |
|---|
| 3260 | bmem_ptr bmem_alloc( |
|---|
| 3261 | size_t buffer_length |
|---|
| 3262 | ) |
|---|
| 3263 | { |
|---|
| 3264 | int rc; |
|---|
| 3265 | ioctl_settopapi_struct_bmem_alloc st; |
|---|
| 3266 | st.buffer_length = buffer_length; |
|---|
| 3267 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmem_alloc, (void*)&st); |
|---|
| 3268 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3269 | return st.__retval; |
|---|
| 3270 | } |
|---|
| 3271 | |
|---|
| 3272 | void bmem_free( |
|---|
| 3273 | void *buffer |
|---|
| 3274 | ) |
|---|
| 3275 | { |
|---|
| 3276 | int rc; |
|---|
| 3277 | ioctl_settopapi_struct_bmem_free st; |
|---|
| 3278 | st.buffer = buffer; |
|---|
| 3279 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bmem_free, (void*)&st); |
|---|
| 3280 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 3281 | } |
|---|
| 3282 | |
|---|
| 3283 | bcablecard_t bcablecard_open( |
|---|
| 3284 | bobject_t cablecard_id |
|---|
| 3285 | ) |
|---|
| 3286 | { |
|---|
| 3287 | int rc; |
|---|
| 3288 | ioctl_settopapi_struct_bcablecard_open st; |
|---|
| 3289 | st.cablecard_id = cablecard_id; |
|---|
| 3290 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcablecard_open, (void*)&st); |
|---|
| 3291 | if (rc) {BSETTOP_ERROR(berr_external_error);return NULL;} |
|---|
| 3292 | return st.__retval; |
|---|
| 3293 | } |
|---|
| 3294 | |
|---|
| 3295 | void bcablecard_close( |
|---|
| 3296 | bcablecard_t cablecard |
|---|
| 3297 | ) |
|---|
| 3298 | { |
|---|
| 3299 | int rc; |
|---|
| 3300 | ioctl_settopapi_struct_bcablecard_close st; |
|---|
| 3301 | st.cablecard = cablecard; |
|---|
| 3302 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcablecard_close, (void*)&st); |
|---|
| 3303 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 3304 | } |
|---|
| 3305 | |
|---|
| 3306 | void bcablecard_get( |
|---|
| 3307 | bcablecard_t cablecard, |
|---|
| 3308 | bcablecard_settings *settings |
|---|
| 3309 | ) |
|---|
| 3310 | { |
|---|
| 3311 | int rc; |
|---|
| 3312 | ioctl_settopapi_struct_bcablecard_get st; |
|---|
| 3313 | st.cablecard = cablecard; |
|---|
| 3314 | st.settings = settings; |
|---|
| 3315 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcablecard_get, (void*)&st); |
|---|
| 3316 | if (rc) {BSETTOP_ERROR(berr_external_error);} |
|---|
| 3317 | } |
|---|
| 3318 | |
|---|
| 3319 | bresult bcablecard_set( |
|---|
| 3320 | bcablecard_t cablecard, |
|---|
| 3321 | const bcablecard_settings *settings |
|---|
| 3322 | ) |
|---|
| 3323 | { |
|---|
| 3324 | int rc; |
|---|
| 3325 | ioctl_settopapi_struct_bcablecard_set st; |
|---|
| 3326 | st.cablecard = cablecard; |
|---|
| 3327 | st.settings = settings; |
|---|
| 3328 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcablecard_set, (void*)&st); |
|---|
| 3329 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3330 | return st.__retval; |
|---|
| 3331 | } |
|---|
| 3332 | |
|---|
| 3333 | bresult bcablecard_route_add_tuner( |
|---|
| 3334 | bcablecard_t cablecard, |
|---|
| 3335 | btuner_t tuner |
|---|
| 3336 | ) |
|---|
| 3337 | { |
|---|
| 3338 | int rc; |
|---|
| 3339 | ioctl_settopapi_struct_bcablecard_route_add_tuner st; |
|---|
| 3340 | st.cablecard = cablecard; |
|---|
| 3341 | st.tuner = tuner; |
|---|
| 3342 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcablecard_route_add_tuner, (void*)&st); |
|---|
| 3343 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3344 | return st.__retval; |
|---|
| 3345 | } |
|---|
| 3346 | |
|---|
| 3347 | bresult bcablecard_route_remove_tuner( |
|---|
| 3348 | bcablecard_t cablecard, |
|---|
| 3349 | btuner_t tuner |
|---|
| 3350 | ) |
|---|
| 3351 | { |
|---|
| 3352 | int rc; |
|---|
| 3353 | ioctl_settopapi_struct_bcablecard_route_remove_tuner st; |
|---|
| 3354 | st.cablecard = cablecard; |
|---|
| 3355 | st.tuner = tuner; |
|---|
| 3356 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcablecard_route_remove_tuner, (void*)&st); |
|---|
| 3357 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3358 | return st.__retval; |
|---|
| 3359 | } |
|---|
| 3360 | |
|---|
| 3361 | bresult bcablecard_route_get( |
|---|
| 3362 | bcablecard_t cablecard, |
|---|
| 3363 | btuner_t tuner, |
|---|
| 3364 | bcablecard_route_settings *settings |
|---|
| 3365 | ) |
|---|
| 3366 | { |
|---|
| 3367 | int rc; |
|---|
| 3368 | ioctl_settopapi_struct_bcablecard_route_get st; |
|---|
| 3369 | st.cablecard = cablecard; |
|---|
| 3370 | st.tuner = tuner; |
|---|
| 3371 | st.settings = settings; |
|---|
| 3372 | rc = ioctl(g_ioctl_fd, BSETTOP_IOCTL_bcablecard_route_get, (void*)&st); |
|---|
| 3373 | if (rc) return BSETTOP_ERROR(berr_external_error); |
|---|
| 3374 | return st.__retval; |
|---|
| 3375 | } |
|---|
| 3376 | |
|---|