comparison stream/tvi_bsdbt848.c @ 20145:d7fbd215d8c9

Change occurrences of "(int)*(void **)arg" to "*(int *)arg".
author uau
date Tue, 10 Oct 2006 22:17:03 +0000
parents ac69ba536915
children 3ff1eade91f9
comparison
equal deleted inserted replaced
20144:4e12a2804192 20145:d7fbd215d8c9
191 { 191 {
192 perror("GETFREQ:ioctl"); 192 perror("GETFREQ:ioctl");
193 return(TVI_CONTROL_FALSE); 193 return(TVI_CONTROL_FALSE);
194 } 194 }
195 195
196 (int)*(void **)arg = priv->tunerfreq; 196 *(int *)arg = priv->tunerfreq;
197 return(TVI_CONTROL_TRUE); 197 return(TVI_CONTROL_TRUE);
198 } 198 }
199 199
200 case TVI_CONTROL_TUN_SET_FREQ: 200 case TVI_CONTROL_TUN_SET_FREQ:
201 { 201 {
202 priv->tunerfreq = (int)*(void **)arg; 202 priv->tunerfreq = *(int *)arg;
203 203
204 if(ioctl(priv->tunerfd, TVTUNER_SETFREQ, &priv->tunerfreq) < 0) 204 if(ioctl(priv->tunerfd, TVTUNER_SETFREQ, &priv->tunerfreq) < 0)
205 { 205 {
206 perror("SETFREQ:ioctl"); 206 perror("SETFREQ:ioctl");
207 return(0); 207 return(0);
221 { 221 {
222 perror("GINPUT:ioctl"); 222 perror("GINPUT:ioctl");
223 return(TVI_CONTROL_FALSE); 223 return(TVI_CONTROL_FALSE);
224 } 224 }
225 225
226 (int)*(void **)arg = priv->input; 226 *(int *)arg = priv->input;
227 return(TVI_CONTROL_TRUE); 227 return(TVI_CONTROL_TRUE);
228 } 228 }
229 229
230 case TVI_CONTROL_SPC_SET_INPUT: 230 case TVI_CONTROL_SPC_SET_INPUT:
231 { 231 {
232 priv->input = getinput((int)*(void **)arg); 232 priv->input = getinput(*(int *)arg);
233 233
234 if(ioctl(priv->btfd, METEORSINPUT, &priv->input) < 0) 234 if(ioctl(priv->btfd, METEORSINPUT, &priv->input) < 0)
235 { 235 {
236 perror("tunerfreq:ioctl"); 236 perror("tunerfreq:ioctl");
237 return(0); 237 return(0);
246 if(priv->dspready == FALSE) return TVI_CONTROL_FALSE; 246 if(priv->dspready == FALSE) return TVI_CONTROL_FALSE;
247 return(TVI_CONTROL_TRUE); 247 return(TVI_CONTROL_TRUE);
248 248
249 case TVI_CONTROL_AUD_GET_FORMAT: 249 case TVI_CONTROL_AUD_GET_FORMAT:
250 { 250 {
251 (int)*(void **)arg = AF_FORMAT_S16_LE; 251 *(int *)arg = AF_FORMAT_S16_LE;
252 return(TVI_CONTROL_TRUE); 252 return(TVI_CONTROL_TRUE);
253 } 253 }
254 case TVI_CONTROL_AUD_GET_CHANNELS: 254 case TVI_CONTROL_AUD_GET_CHANNELS:
255 { 255 {
256 (int)*(void **)arg = 2; 256 *(int *)arg = 2;
257 return(TVI_CONTROL_TRUE); 257 return(TVI_CONTROL_TRUE);
258 } 258 }
259 case TVI_CONTROL_AUD_SET_SAMPLERATE: 259 case TVI_CONTROL_AUD_SET_SAMPLERATE:
260 { 260 {
261 int dspspeed = (int)*(void **)arg; 261 int dspspeed = *(int *)arg;
262 262
263 if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1) 263 if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1)
264 { 264 {
265 perror("invalidaudiorate"); 265 perror("invalidaudiorate");
266 return(TVI_CONTROL_FALSE); 266 return(TVI_CONTROL_FALSE);
275 275
276 return(TVI_CONTROL_TRUE); 276 return(TVI_CONTROL_TRUE);
277 } 277 }
278 case TVI_CONTROL_AUD_GET_SAMPLERATE: 278 case TVI_CONTROL_AUD_GET_SAMPLERATE:
279 { 279 {
280 (int)*(void **)arg = priv->dspspeed; 280 *(int *)arg = priv->dspspeed;
281 return(TVI_CONTROL_TRUE); 281 return(TVI_CONTROL_TRUE);
282 } 282 }
283 case TVI_CONTROL_AUD_GET_SAMPLESIZE: 283 case TVI_CONTROL_AUD_GET_SAMPLESIZE:
284 { 284 {
285 (int)*(void **)arg = priv->dspsamplesize/8; 285 *(int *)arg = priv->dspsamplesize/8;
286 return(TVI_CONTROL_TRUE); 286 return(TVI_CONTROL_TRUE);
287 } 287 }
288 288
289 /* Video Controls */ 289 /* Video Controls */
290 290
292 if(priv->videoready == FALSE) return TVI_CONTROL_FALSE; 292 if(priv->videoready == FALSE) return TVI_CONTROL_FALSE;
293 return(TVI_CONTROL_TRUE); 293 return(TVI_CONTROL_TRUE);
294 294
295 case TVI_CONTROL_TUN_SET_NORM: 295 case TVI_CONTROL_TUN_SET_NORM:
296 { 296 {
297 int req_mode = (int)*(void **)arg; 297 int req_mode = *(int *)arg;
298 u_short tmp_fps; 298 u_short tmp_fps;
299 299
300 priv->iformat = METEOR_FMT_AUTOMODE; 300 priv->iformat = METEOR_FMT_AUTOMODE;
301 301
302 if(req_mode == TV_NORM_PAL) 302 if(req_mode == TV_NORM_PAL)
377 377
378 return(TVI_CONTROL_TRUE); 378 return(TVI_CONTROL_TRUE);
379 } 379 }
380 380
381 case TVI_CONTROL_VID_GET_FORMAT: 381 case TVI_CONTROL_VID_GET_FORMAT:
382 (int)*(void **)arg = IMGFMT_UYVY; 382 *(int *)arg = IMGFMT_UYVY;
383 return(TVI_CONTROL_TRUE); 383 return(TVI_CONTROL_TRUE);
384 384
385 case TVI_CONTROL_VID_SET_FORMAT: 385 case TVI_CONTROL_VID_SET_FORMAT:
386 { 386 {
387 int req_fmt = (int)*(void **)arg; 387 int req_fmt = *(int *)arg;
388 388
389 if(req_fmt != IMGFMT_UYVY) return(TVI_CONTROL_FALSE); 389 if(req_fmt != IMGFMT_UYVY) return(TVI_CONTROL_FALSE);
390 390
391 return(TVI_CONTROL_TRUE); 391 return(TVI_CONTROL_TRUE);
392 } 392 }
393 case TVI_CONTROL_VID_SET_WIDTH: 393 case TVI_CONTROL_VID_SET_WIDTH:
394 priv->geom.columns = (int)*(void **)arg; 394 priv->geom.columns = *(int *)arg;
395 395
396 if(priv->geom.columns > priv->maxwidth) 396 if(priv->geom.columns > priv->maxwidth)
397 { 397 {
398 priv->geom.columns = priv->maxwidth; 398 priv->geom.columns = priv->maxwidth;
399 } 399 }
405 } 405 }
406 406
407 return(TVI_CONTROL_TRUE); 407 return(TVI_CONTROL_TRUE);
408 408
409 case TVI_CONTROL_VID_GET_WIDTH: 409 case TVI_CONTROL_VID_GET_WIDTH:
410 (int)*(void **)arg = priv->geom.columns; 410 *(int *)arg = priv->geom.columns;
411 return(TVI_CONTROL_TRUE); 411 return(TVI_CONTROL_TRUE);
412 412
413 case TVI_CONTROL_VID_SET_HEIGHT: 413 case TVI_CONTROL_VID_SET_HEIGHT:
414 priv->geom.rows = (int)*(void **)arg; 414 priv->geom.rows = *(int *)arg;
415 415
416 if(priv->geom.rows > priv->maxheight) 416 if(priv->geom.rows > priv->maxheight)
417 { 417 {
418 priv->geom.rows = priv->maxheight; 418 priv->geom.rows = priv->maxheight;
419 } 419 }
430 } 430 }
431 431
432 return(TVI_CONTROL_TRUE); 432 return(TVI_CONTROL_TRUE);
433 433
434 case TVI_CONTROL_VID_GET_HEIGHT: 434 case TVI_CONTROL_VID_GET_HEIGHT:
435 (int)*(void **)arg = priv->geom.rows; 435 *(int *)arg = priv->geom.rows;
436 return(TVI_CONTROL_TRUE); 436 return(TVI_CONTROL_TRUE);
437 437
438 case TVI_CONTROL_VID_GET_FPS: 438 case TVI_CONTROL_VID_GET_FPS:
439 *(float *)arg = priv->fps; 439 *(float *)arg = priv->fps;
440 return(TVI_CONTROL_TRUE); 440 return(TVI_CONTROL_TRUE);
441 441
442 /* 442 /*
443 case TVI_CONTROL_VID_SET_FPS: 443 case TVI_CONTROL_VID_SET_FPS:
444 priv->fps = (int)*(void **)arg; 444 priv->fps = *(int *)arg;
445 445
446 if(priv->fps > priv->maxfps) priv->fps = priv->maxfps; 446 if(priv->fps > priv->maxfps) priv->fps = priv->maxfps;
447 447
448 if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0) 448 if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0)
449 { 449 {