[no subject]

2009-12-15 Thread lucabe...@libero.it
hello i have write i little c program for test :
here is the program:

#include


#include 
#include 


#include 
#include 
#include 
#include


#include 
#include 
#include 
#include


#include 
#include 
#include 


#include 
#include 
#include 


#include 

#define MIA "/dev/dvb/adapter0/frontend0"
#define

MD "/dev/dvb/adapter0/demux0"
//#define DVR "/dev/dvb/adapter0/dvr0"
#define

DVR_FILE "/home/lucak904/Scrivania/Luca/prog_c/sat/mio.dat"
#define BUFFY

(188*20)

main()

{
struct dvb_frontend_info luca;
struct

dvb_frontend_parameters parametri;
struct dvb_frontend_parameters luca2;


struct dmx_pes_filter_params filtri;

parametri.frequency = 1197700;


parametri.inversion = INVERSION_AUTO;
parametri.u.qpsk.symbol_rate =

275;
parametri.u.qpsk.fec_inner   = FEC_AUTO;


fe_status_t status;


int fd, min, max,chiudo_fd, chiudo_md, chiudo_dvr ,stato, pp, freq,

ritorno, sy_rate, tt, md,fec_inn, inv, dvr, dvr_out,len;
uint8_t buf

[BUFFY];


if((fd = open(MIA,O_RDWR)) < 0){
perror("FRONTEND

DEVICE: ");
return -1;
}
if (ioctl(fd, FE_SET_FRONTEND,

¶metri) < 0){
perror("QPSK TUNE: ");
return

-1;
}
if (ioctl(fd, FE_GET_FRONTEND ,&luca2) <0){

perror
("GET_INFO: ");
return -1;
}

printf("\nfreq :%d", 
luca2.
frequency);
printf("\nsimbol_rate : %d", luca2.u.qpsk.symbol_rate);

   
printf("\ninversion : %d", luca2.inversion);
printf("\nfec : %d", luca2.
u.
qpsk.fec_inner);


if (ioctl(fd, FE_GET_INFO  ,&luca) <0){

   
perror("GET_INFO: ");
return -1;
}

printf
("\nfreq min:%
d", luca.frequency_min);
printf("\nfreq max:%d", luca.
frequency_max);

if
(ioctl(fd, FE_READ_STATUS  ,&status) <0){

perror
("FE_READ_STATUS: ");
return -1;
}

// apro il 
demux


printf("\nstato :%d", status);
if((md = open(MD,
O_RDWR|O_NONBLOCK)) < 0)
{
perror("DEMUX DEVICE: ");

return -1;
}


//setto il demux

filtri.pid = 1296;

filtri.input =
DMX_IN_FRONTEND;
filtri.output = DMX_OUT_TAP;
filtri.
pes_type =
DMX_PES_OTHER;
filtri.flags = DMX_IMMEDIATE_START;
if (ioctl
(md,
DMX_SET_PES_FILTER, &filtri) < 0) {
perror("DEMUX DEVICE: ");


return -1;
}

//apro il dvr

//if ((dvr = open(DVR,

O_RDONLY|O_NONBLOCK)) < 0) {
  //  perror("DVR DEVICE : ");
//   

/return -1;
  //  }

if ((dvr_out = open

("/home/lucak904/Scrivania/Luca/prog_c/sat/prova_scar.txt", O_WRONLY)) < 0) {


perror(" DVR FILE : ");
return -1;
}


if((len

= read(md,buf, BUFFY)) < 0){
perror("non leggo");
}
else{


write(dvr_out,buf,len);

}

chiudo_fd = close(fd);
   

chiudo_md = close(md);
//chiudo_dvr = close(dvr);
}

It is just a test


every time i get Resource temporarily unavailable
For my understanding it means

that nothing is readed from demux device, wath is wrong , the pid and frequency

are ok the SNR is more than 70%

Thanks

Luca 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Auguro un Buon Ringraziamento

2013-10-22 Thread lucabe...@libero.it
Auguro un Buon Ringraziamento

risparmiare più del 40% ora
itevb.com
questo è il mio amico
spero vi piaccia troppo
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


piacevolmente sorpresi

2013-10-30 Thread lucabe...@libero.it





caro amico
un buon posto di shopping per andare
www.itevb.com
invitati a provare


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


FW: Salut

2013-10-31 Thread lucabe...@libero.it
ciao ho perso 10 libbre utilizzando garcinia ora http://bit.ly/17VCwxt
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Christmas gift you ready?

2013-11-12 Thread lucabe...@libero.it


Crazy Christmas
   
www.itevb.com
invitati a provare




--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html