pike.git / src / modules / DVB / dvb.c

version» Context lines:

pike.git/src/modules/DVB/dvb.c:543:    uint ifreq;    int hiband, result;    FrontendInfo fe_info;       int satno;    uint freq;    int pol;    uint sr;    char *devname;    -  check_all_args("DVB.dvb->tune", args, BIT_INT, BIT_INT, BIT_INT | BIT_STRING, +  check_all_args(NULL, args, BIT_INT, BIT_INT, BIT_INT | BIT_STRING,    BIT_INT, 0);       sr = (u_short)Pike_sp[-1].u.integer * 1000;    Pike_sp--;       if(TYPEOF(Pike_sp[-1]) == T_INT)    pol = (u_short)Pike_sp[-1].u.integer;    else    pol = Pike_sp[-1].u.string->str[0] == 'V' ||    Pike_sp[-1].u.string->str[0] == 'v';
pike.git/src/modules/DVB/dvb.c:978:       int pnr = -1;       int program_number;    int pmt_pid;    int dmx;    dvb_stream_data stream;    char *devname;    int cnt = 0, arr = 0;    -  check_all_args("DVB.dvb->analyze_pmt", args, BIT_INT, BIT_INT, 0); +  check_all_args(NULL, args, BIT_INT, BIT_INT, 0);       devname = mk_devname(DVB->cardn, DEMUXDEVICE);    dmx = open (devname, O_RDWR | O_NONBLOCK);    if (dmx < 0) {    snprintf (DVB->low_errmsg, MAX_ERR_LEN, "DMX SET SECTION FILTER.\n");    push_int(0);    return;    }       /* Clear the stream, and most notably, set stream.ecminfo to NULL. */
pike.git/src/modules/DVB/dvb.c:1134:    *! @seealso    *! @[DVB.Stream()->read()]    */   static void f_stream_attach(INT32 args) {       int err, ptype = PID_NONE;    unsigned int pid;    struct svalue feeder;    unsigned char *pktdata;    -  check_all_args("DVB.dvb->stream", args, BIT_INT, +  check_all_args(NULL, args, BIT_INT,    BIT_FUNCTION | BIT_INT | BIT_VOID, BIT_INT | BIT_VOID, 0);       if(sl_count(DVB) >= MAX_PES_FD)    Pike_error("Max opened DEMUX devices reached.\n");       if(args > 2) {    ptype = (u_short)Pike_sp[-1].u.integer;    Pike_sp--;    }    if(args > 1) {
pike.git/src/modules/DVB/dvb.c:1175:    if(TYPEOF(Pike_sp[-1]) != PIKE_T_OBJECT)    Pike_error("Failed to create Stream object!\n");      }      static void f__sprintf(INT32 args) {       int n = 0, x, cnt;    dvb_stream_data *st = DVB->stream;    -  check_all_args("DVB.dvb->_sprintf", args, BIT_INT, BIT_MAPPING | BIT_VOID, 0); +  check_all_args(NULL, args, BIT_INT, BIT_MAPPING | BIT_VOID, 0);       x = Pike_sp[-args].u.integer;    pop_n_elems(args);    switch (x) {    case 'O':    n++; push_static_text("DVB.dvb(");    n++; push_text(mk_devname(DVB->cardn, DEMUXDEVICE));    n++; push_static_text(": ");    cnt = 0;    while(st != NULL) {
pike.git/src/modules/DVB/dvb.c:1233:    * @note    * The size is 4096 by default.    *    * @seealso    * @[read()]    */   static void f_stream_set_buffer(INT32 args) {       int buflen;    -  check_all_args("DVB.Stream->set_buffer", args, BIT_INT, 0); +  check_all_args(NULL, args, BIT_INT, 0);    buflen = (u_short)Pike_sp[-1].u.integer;    Pike_sp--;    DVBStream->buflen = buflen;    push_int(1);   }            static void f_stream_create(INT32 args) {       struct dmxPesFilterParams pesflt;    int err, pid, fd, ix, ptype;    struct svalue feeder;    unsigned char *pktdata;    struct object *dvbprog;    dvb_data *dvbstor;    char *devname;    -  check_all_args("DVB.dvb->stream", args, BIT_OBJECT, BIT_INT, +  check_all_args(NULL, args, BIT_OBJECT, BIT_INT,    BIT_FUNCTION | BIT_INT, BIT_INT, 0);       ptype = (u_short)Pike_sp[-1].u.integer;    Pike_sp--;    if(ptype == PID_NONE)    ptype = DMX_PES_OTHER;      #if 0    feeder = Pike_sp[1-args].u.svalue;    apply_svalue(&feeder, 0); /* we want more data */
pike.git/src/modules/DVB/dvb.c:1360:    */   static void f_stream_read(INT32 args) {       dvb_stream_data *dvb_stream = DVBStream;    int all = 1, ret, e, cnt, ix = 0;    unsigned char buf[MAX_DVB_READ_SIZE], *bufptr;       if(dvb_stream->fd < 0)    Pike_error("Object destroyed!\n");    -  check_all_args("DVB.dvb->stream_read", args, BIT_INT | BIT_VOID, 0); +  check_all_args(NULL, args, BIT_INT | BIT_VOID, 0);    if(args > 1)    all = (u_short)Pike_sp[-1].u.integer;    pop_n_elems(args);       if(dvb_stream->pkt.payload_len > 0)    memcpy(buf, dvb_stream->pkt.payload, dvb_stream->pkt.payload_len);    for(;;) {    e = 0;    THREADS_ALLOW();    ret = read(dvb_stream->fd, buf + dvb_stream->pkt.payload_len,
pike.git/src/modules/DVB/dvb.c:1431:    printf("DEB: dvb: ret=%d (ix: %d)\n", ret, ix);   #endif    return;    }    push_int(0);      }      static void f_stream_info(INT32 args) {    -  check_all_args("DVB.dvb->stream_info", args, BIT_INT, 0); +  check_all_args(NULL, args, BIT_INT, 0);    pop_n_elems(args);    push_int(0);      }      /*! @decl void close()    *!    *! Closes an open stream.    *!    *! @seealso
pike.git/src/modules/DVB/dvb.c:1508:    *!    *| @seealso    *| @[mixer()]    */   static void f_audio_mute(INT32 args) {       dvb_audio_data *dvb_audio = DVBAudio;    int mute = 1; /* default is mute = on */    int ret;    -  check_all_args("DVB.dvb->audio_mute", args, BIT_INT | BIT_VOID, 0); +  check_all_args(NULL, args, BIT_INT | BIT_VOID, 0);       if(args) {    mute = (u_short)Pike_sp[-1].u.integer;    Pike_sp--;    }       THREADS_ALLOW();    ret = ioctl(dvb_audio->fd, AUDIO_SET_MUTE, mute);    THREADS_DISALLOW();    if(ret < 0)
pike.git/src/modules/DVB/dvb.c:1584:    }      }      static void f_audio_ctrl(INT32 args) {       dvb_audio_data *dvb_audio = DVBAudio;    int ret;    int cw = -1;    -  check_all_args("DVB.dvb->ctrl", args, BIT_INT | BIT_STRING, 0); +  check_all_args(NULL, args, BIT_INT | BIT_STRING, 0);       if(TYPEOF(Pike_sp[-1]) == T_INT)    cw = (u_short)Pike_sp[-1].u.integer;    else    if(!strcmp(Pike_sp[-1].u.string->str, "play"))    cw = AUDIO_PLAY;    else    if(!strcmp(Pike_sp[-1].u.string->str, "pause"))    cw = AUDIO_PAUSE;    else
pike.git/src/modules/DVB/dvb.c:1628:    *!    *| @seealso    *| @[mute()]    */   static void f_audio_mixer(INT32 args) {       dvb_audio_data *dvb_audio = DVBAudio;    int ret;    audioMixer_t mixer;    -  check_all_args("DVB.dvb->audio_mixer", args, BIT_INT, BIT_INT | BIT_VOID, 0); +  check_all_args(NULL, args, BIT_INT, BIT_INT | BIT_VOID, 0);       mixer.volume_right = (unsigned int)Pike_sp[-1].u.integer;    Pike_sp--;    if(args > 1) {    mixer.volume_left = (unsigned int)Pike_sp[-1].u.integer;    Pike_sp--;    } else    mixer.volume_left = mixer.volume_right;       THREADS_ALLOW();