Mercurial > mplayer.hg
comparison stream/dvb_tune.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | f3384addfb0b |
children | afc8b80eb027 |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
163 #ifdef CONFIG_DVB_HEAD | 163 #ifdef CONFIG_DVB_HEAD |
164 sprintf(demux_dev, "/dev/dvb/adapter%d/demux0", priv->card); | 164 sprintf(demux_dev, "/dev/dvb/adapter%d/demux0", priv->card); |
165 #else | 165 #else |
166 sprintf(demux_dev, "/dev/ost/demux%d", priv->card); | 166 sprintf(demux_dev, "/dev/ost/demux%d", priv->card); |
167 #endif | 167 #endif |
168 | 168 |
169 mp_msg(MSGT_DEMUX, MSGL_V, "FIX %d -> %d\n", priv->demux_fds_cnt, cnt); | 169 mp_msg(MSGT_DEMUX, MSGL_V, "FIX %d -> %d\n", priv->demux_fds_cnt, cnt); |
170 if(priv->demux_fds_cnt >= cnt) | 170 if(priv->demux_fds_cnt >= cnt) |
171 { | 171 { |
172 for(i = priv->demux_fds_cnt-1; i >= cnt; i--) | 172 for(i = priv->demux_fds_cnt-1; i >= cnt; i--) |
173 { | 173 { |
187 mp_msg(MSGT_DEMUX, MSGL_ERR, "ERROR OPENING DEMUX 0: %d\n", errno); | 187 mp_msg(MSGT_DEMUX, MSGL_ERR, "ERROR OPENING DEMUX 0: %d\n", errno); |
188 return 0; | 188 return 0; |
189 } | 189 } |
190 else | 190 else |
191 priv->demux_fds_cnt++; | 191 priv->demux_fds_cnt++; |
192 } | 192 } |
193 } | 193 } |
194 | 194 |
195 return 1; | 195 return 1; |
196 } | 196 } |
197 | 197 |
198 int dvb_set_ts_filt(int fd, uint16_t pid, dmx_pes_type_t pestype) | 198 int dvb_set_ts_filt(int fd, uint16_t pid, dmx_pes_type_t pestype) |
199 { | 199 { |
394 mp_msg(MSGT_DEMUX, MSGL_V, "SNR: %d\n",strength); | 394 mp_msg(MSGT_DEMUX, MSGL_V, "SNR: %d\n",strength); |
395 | 395 |
396 strength=0; | 396 strength=0; |
397 if(ioctl(fd_frontend,FE_READ_UNCORRECTED_BLOCKS,&strength) >= 0) | 397 if(ioctl(fd_frontend,FE_READ_UNCORRECTED_BLOCKS,&strength) >= 0) |
398 mp_msg(MSGT_DEMUX, MSGL_V, "UNC: %d\n",strength); | 398 mp_msg(MSGT_DEMUX, MSGL_V, "UNC: %d\n",strength); |
399 | 399 |
400 print_status(festatus); | 400 print_status(festatus); |
401 } | 401 } |
402 else | 402 else |
403 { | 403 { |
404 mp_msg(MSGT_DEMUX, MSGL_ERR, "Not able to lock to the signal on the given frequency, timeout: %d\n", tmout); | 404 mp_msg(MSGT_DEMUX, MSGL_ERR, "Not able to lock to the signal on the given frequency, timeout: %d\n", tmout); |
413 { | 413 { |
414 int i,res; | 414 int i,res; |
415 int32_t strength; | 415 int32_t strength; |
416 fe_status_t festatus; | 416 fe_status_t festatus; |
417 FrontendEvent event; | 417 FrontendEvent event; |
418 | 418 |
419 struct pollfd pfd[1]; | 419 struct pollfd pfd[1]; |
420 | 420 |
421 i = 0; res = -1; | 421 i = 0; res = -1; |
422 while ((i < 3) && (res < 0)) | 422 while ((i < 3) && (res < 0)) |
423 { | 423 { |
482 if(ioctl(fd_frontend,FE_READ_SNR,&strength) >= 0) | 482 if(ioctl(fd_frontend,FE_READ_SNR,&strength) >= 0) |
483 mp_msg(MSGT_DEMUX, MSGL_V, "SNR: %d\n",strength); | 483 mp_msg(MSGT_DEMUX, MSGL_V, "SNR: %d\n",strength); |
484 | 484 |
485 festatus=0; | 485 festatus=0; |
486 mp_msg(MSGT_DEMUX, MSGL_V, "FE_STATUS:"); | 486 mp_msg(MSGT_DEMUX, MSGL_V, "FE_STATUS:"); |
487 | 487 |
488 if(ioctl(fd_frontend,FE_READ_STATUS,&festatus) >= 0) | 488 if(ioctl(fd_frontend,FE_READ_STATUS,&festatus) >= 0) |
489 print_status(festatus); | 489 print_status(festatus); |
490 else | 490 else |
491 mp_msg(MSGT_DEMUX, MSGL_ERR, " ERROR, UNABLE TO READ_STATUS"); | 491 mp_msg(MSGT_DEMUX, MSGL_ERR, " ERROR, UNABLE TO READ_STATUS"); |
492 | 492 |
493 mp_msg(MSGT_DEMUX, MSGL_V, "\n"); | 493 mp_msg(MSGT_DEMUX, MSGL_V, "\n"); |
494 } | 494 } |
495 else | 495 else |
496 { | 496 { |
497 mp_msg(MSGT_DEMUX, MSGL_V, "Not able to lock to the signal on the given frequency\n"); | 497 mp_msg(MSGT_DEMUX, MSGL_V, "Not able to lock to the signal on the given frequency\n"); |
566 scmd.u.diseqc.cmd = 0x38; | 566 scmd.u.diseqc.cmd = 0x38; |
567 scmd.u.diseqc.numParams = 1; | 567 scmd.u.diseqc.numParams = 1; |
568 scmd.u.diseqc.params[0] = 0xf0 | | 568 scmd.u.diseqc.params[0] = 0xf0 | |
569 (((sat_no) << 2) & 0x0F) | | 569 (((sat_no) << 2) & 0x0F) | |
570 (hi_lo ? 1 : 0) | | 570 (hi_lo ? 1 : 0) | |
571 (polv ? 0 : 2); | 571 (polv ? 0 : 2); |
572 | 572 |
573 if (ioctl(secfd,SEC_SEND_SEQUENCE,&scmds) < 0) | 573 if (ioctl(secfd,SEC_SEND_SEQUENCE,&scmds) < 0) |
574 { | 574 { |
575 mp_msg(MSGT_DEMUX, MSGL_ERR, "Error sending DisEqC"); | 575 mp_msg(MSGT_DEMUX, MSGL_ERR, "Error sending DisEqC"); |
576 return -1; | 576 return -1; |
577 } | 577 } |
578 | 578 |
579 return 0; | 579 return 0; |
580 } | 580 } |
581 #endif | 581 #endif |
582 | 582 |
583 static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int srate, char pol, int tone, | 583 static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int srate, char pol, int tone, |