From c6575940499edb3107ec43bf196acde06ebd39c8 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 16 May 2008 08:43:15 +0000 Subject: cosmetics: Remove useless parentheses from return statements. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26788 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/asf_mmst_streaming.c | 2 +- stream/rtp.c | 4 +- stream/stream_cddb.c | 2 +- stream/stream_cue.c | 4 +- stream/stream_ftp.c | 2 +- stream/tv.c | 26 +++---- stream/tvi_bsdbt848.c | 112 +++++++++++++++---------------- stream/tvi_def.h | 6 +- stream/tvi_dshow.c | 36 +++++----- stream/tvi_dummy.c | 38 +++++------ stream/tvi_v4l.c | 160 ++++++++++++++++++++++---------------------- stream/tvi_v4l2.c | 4 +- 12 files changed, 198 insertions(+), 198 deletions(-) (limited to 'stream') diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index 627c8a2beb..0ab2337a10 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -266,7 +266,7 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl) // mp_msg(MSGT_NETWORK,MSGL_INFO,"get header packet finished\n"); - return (header_len); + return header_len; } diff --git a/stream/rtp.c b/stream/rtp.c index db522df9b5..1c31bef4a1 100644 --- a/stream/rtp.c +++ b/stream/rtp.c @@ -213,7 +213,7 @@ int read_rtp_from_server(int fd, char *buffer, int length) { mp_msg(MSGT_NETWORK, MSGL_ERR, "Got empty packet from RTP cache!?\n"); } - return(length); + return length; } static int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData) { @@ -251,5 +251,5 @@ static int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData) { // mp_msg(MSGT_NETWORK,MSGL_DBG2,"Reading rtp: v=%x p=%x x=%x cc=%x m=%x pt=%x seq=%x ts=%x lgth=%d\n",rh->b.v,rh->b.p,rh->b.x,rh->b.cc,rh->b.m,rh->b.pt,rh->b.sequence,rh->timestamp,lengthPacket); - return(0); + return 0; } diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c index 775652c322..b2c455d5d9 100644 --- a/stream/stream_cddb.c +++ b/stream/stream_cddb.c @@ -259,7 +259,7 @@ cddb_discid(int tot_trks) { } t = ((cdtoc[tot_trks].min * 60) + cdtoc[tot_trks].sec) - ((cdtoc[0].min * 60) + cdtoc[0].sec); - return ((n % 0xff) << 24 | t << 8 | tot_trks); + return (n % 0xff) << 24 | t << 8 | tot_trks; } diff --git a/stream/stream_cue.c b/stream/stream_cue.c index e25fddf99d..85628131d0 100644 --- a/stream/stream_cue.c +++ b/stream/stream_cue.c @@ -120,7 +120,7 @@ static int cue_getTrackinfo(char *Line, tTrack *track) if(strncmp(&Line[11], "MODE2/2352", 10)==0) track->mode = MODE2_2352; if(strncmp(&Line[11], "MODE2/2336", 10)==0) track->mode = MODE2_2336; } - else return(1); + else return 1; /* Get the track indexes */ while(1) { @@ -150,7 +150,7 @@ static int cue_getTrackinfo(char *Line, tTrack *track) else mp_msg (MSGT_OPEN,MSGL_INFO, MSGTR_MPDEMUX_CUEREAD_UnexpectedCuefileLine, Line); } - return(0); + return 0; } diff --git a/stream/stream_ftp.c b/stream/stream_ftp.c index de821b7ed1..091fc4e35c 100644 --- a/stream/stream_ftp.c +++ b/stream/stream_ftp.c @@ -81,7 +81,7 @@ static int fd_can_read(int fd,int timeout) { tv.tv_sec = timeout; tv.tv_usec = 0; - return (select(fd+1, &fds, NULL, NULL, &tv) > 0); + return select(fd+1, &fds, NULL, NULL, &tv) > 0; } /* diff --git a/stream/tv.c b/stream/tv.c index 17bedccce3..696c0d542d 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -601,7 +601,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param) mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoSuchDriver, tv_param->driver); else mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_DriverAutoDetectionFailed); - return(NULL); + return NULL; } static int tv_uninit(tvi_handle_t *tvh) @@ -804,7 +804,7 @@ int tv_set_color_options(tvi_handle_t *tvh, int opt, int value) mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnknownColorOption, opt); } - return(TVI_CONTROL_UNKNOWN); + return TVI_CONTROL_UNKNOWN; } int tv_get_color_options(tvi_handle_t *tvh, int opt, int* value) @@ -825,7 +825,7 @@ int tv_get_color_options(tvi_handle_t *tvh, int opt, int* value) mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnknownColorOption, opt); } - return(TVI_CONTROL_UNKNOWN); + return TVI_CONTROL_UNKNOWN; } int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq) @@ -836,7 +836,7 @@ int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq) mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency, *freq, (float)*freq/16); } - return(1); + return 1; } int tv_set_freq(tvi_handle_t *tvh, unsigned long freq) @@ -853,7 +853,7 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq) freq, (float)freq/16); } tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); - return(1); + return 1; } int tv_get_signal(tvi_handle_t *tvh) @@ -910,7 +910,7 @@ int tv_step_channel_real(tvi_handle_t *tvh, int direction) tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); } } - return(1); + return 1; } int tv_step_channel(tvi_handle_t *tvh, int direction) { @@ -938,7 +938,7 @@ int tv_step_channel(tvi_handle_t *tvh, int direction) { tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); } } else tv_step_channel_real(tvh, direction); - return(1); + return 1; } int tv_set_channel_real(tvi_handle_t *tvh, char *channel) { @@ -961,7 +961,7 @@ int tv_set_channel_real(tvi_handle_t *tvh, char *channel) { break; } } - return(1); + return 1; } int tv_set_channel(tvi_handle_t *tvh, char *channel) { @@ -979,7 +979,7 @@ int tv_set_channel(tvi_handle_t *tvh, char *channel) { tv_channel_current->name, (float)tv_channel_current->freq/1000); tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); } else tv_set_channel_real(tvh, channel); - return(1); + return 1; } int tv_last_channel(tvi_handle_t *tvh) { @@ -1013,7 +1013,7 @@ int tv_last_channel(tvi_handle_t *tvh) { } } } - return(1); + return 1; } int tv_step_norm(tvi_handle_t *tvh) @@ -1029,12 +1029,12 @@ int tv_step_norm(tvi_handle_t *tvh) } } tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); - return(1); + return 1; } int tv_step_chanlist(tvi_handle_t *tvh) { - return(1); + return 1; } int tv_set_norm(tvi_handle_t *tvh, char* norm) @@ -1047,7 +1047,7 @@ int tv_set_norm(tvi_handle_t *tvh, char* norm) return 0; } tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); - return(1); + return 1; } demuxer_desc_t demuxer_desc_tv = { diff --git a/stream/tvi_bsdbt848.c b/stream/tvi_bsdbt848.c index 5db90a2bde..1ad7778f37 100644 --- a/stream/tvi_bsdbt848.c +++ b/stream/tvi_bsdbt848.c @@ -227,18 +227,18 @@ static int control(priv_t *priv, int cmd, void *arg) case TVI_CONTROL_IS_TUNER: if(priv->tunerready == FALSE) return TVI_CONTROL_FALSE; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_TUN_GET_FREQ: { if(ioctl(priv->tunerfd, TVTUNER_GETFREQ, &priv->tunerfreq) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "TVTUNER_GETFREQ", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } *(int *)arg = priv->tunerfreq; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_SET_FREQ: @@ -248,10 +248,10 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->tunerfd, TVTUNER_SETFREQ, &priv->tunerfreq) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "TVTUNER_SETFREQ", strerror(errno)); - return(0); + return 0; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_GET_SIGNAL: { @@ -259,10 +259,10 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->tunerfd, TVTUNER_GETSTATUS, &status) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "GETSTATUS", strerror(errno)); - return(0); + return 0; } *(int*)arg=(status & 0x02)? 100 : 0; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_GET_TUNER: @@ -275,11 +275,11 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORGINPUT, &priv->input) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORGINPUT", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } *(int *)arg = priv->input; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_SPC_SET_INPUT: @@ -289,27 +289,27 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSINPUT, &priv->input) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSINPUT", strerror(errno)); - return(0); + return 0; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } /* Audio Controls */ case TVI_CONTROL_IS_AUDIO: if(priv->dspready == FALSE) return TVI_CONTROL_FALSE; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_AUD_GET_FORMAT: { *(int *)arg = AF_FORMAT_S16_LE; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_AUD_GET_CHANNELS: { *(int *)arg = 2; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_AUD_SET_SAMPLERATE: { @@ -318,7 +318,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } priv->dspspeed = dspspeed; @@ -328,24 +328,24 @@ static int control(priv_t *priv, int cmd, void *arg) priv->dsprate = priv->dspspeed * priv->dspsamplesize/8* (priv->dspstereo+1); - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_AUD_GET_SAMPLERATE: { *(int *)arg = priv->dspspeed; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_AUD_GET_SAMPLESIZE: { *(int *)arg = priv->dspsamplesize/8; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } /* Video Controls */ case TVI_CONTROL_IS_VIDEO: if(priv->videoready == FALSE) return TVI_CONTROL_FALSE; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_TUN_SET_NORM: { @@ -406,20 +406,20 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFMT", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSETGEO", strerror(errno)); - return(0); + return 0; } tmp_fps = priv->fps; if(ioctl(priv->btfd, METEORSFPS, &tmp_fps) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno)); - return(0); + return 0; } #ifdef BT848_SAUDIO @@ -430,20 +430,20 @@ static int control(priv_t *priv, int cmd, void *arg) } #endif - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_VID_GET_FORMAT: *(int *)arg = IMGFMT_UYVY; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_SET_FORMAT: { int req_fmt = *(int *)arg; - if(req_fmt != IMGFMT_UYVY) return(TVI_CONTROL_FALSE); + if(req_fmt != IMGFMT_UYVY) return TVI_CONTROL_FALSE; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_VID_SET_WIDTH: priv->geom.columns = *(int *)arg; @@ -456,14 +456,14 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorSettingWidth, strerror(errno)); - return(0); + return 0; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_WIDTH: *(int *)arg = priv->geom.columns; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_SET_HEIGHT: priv->geom.rows = *(int *)arg; @@ -481,18 +481,18 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorSettingWidth, strerror(errno)); - return(0); + return 0; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_HEIGHT: *(int *)arg = priv->geom.rows; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_FPS: *(float *)arg = priv->fps; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; /* case TVI_CONTROL_VID_SET_FPS: @@ -503,22 +503,22 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno)); - return(0); + return 0; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; */ case TVI_CONTROL_VID_CHK_WIDTH: case TVI_CONTROL_VID_CHK_HEIGHT: - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_IMMEDIATE: priv->immediatemode = TRUE; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } - return(TVI_CONTROL_UNKNOWN); + return TVI_CONTROL_UNKNOWN; } static int init(priv_t *priv) @@ -660,7 +660,7 @@ if((priv->dspready == TRUE) && priv->dspready = FALSE; } -return(1); +return 1; } /* that's the real start, we'got the format parameters (checked with control) */ @@ -671,7 +671,7 @@ struct timeval curtime; int marg; fprintf(stderr,"START\n"); -if(priv->videoready == FALSE) return(0); +if(priv->videoready == FALSE) return 0; signal(SIGUSR1, processframe); signal(SIGALRM, processframe); @@ -681,7 +681,7 @@ marg = SIGUSR1; if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSSIGNAL", strerror(errno)); - return(0); + return 0; } read(priv->dspfd, &tmp, 2); @@ -695,24 +695,24 @@ marg = METEOR_CAP_CONTINOUS; if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORCAPTUR", strerror(errno)); - return(0); + return 0; } -return(1); +return 1; } static int uninit(priv_t *priv) { int marg; -if(priv->videoready == FALSE) return(0); +if(priv->videoready == FALSE) return 0; marg = METEOR_SIG_MODE_MASK; if(ioctl( priv->btfd, METEORSSIGNAL, &marg) < 0 ) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSSIGNAL", strerror(errno)); - return(0); + return 0; } marg = METEOR_CAP_STOP_CONT; @@ -720,7 +720,7 @@ marg = METEOR_CAP_STOP_CONT; if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 ) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848UnableToStopCapture, strerror(errno)); - return(0); + return 0; } close(priv->btfd); @@ -731,7 +731,7 @@ priv->btfd = -1; priv->dspready = priv->videoready = FALSE; -return(1); +return 1; } @@ -739,7 +739,7 @@ static double grabimmediate_video_frame(priv_t *priv, char *buffer, int len) { sigset_t sa_mask; -if(priv->videoready == FALSE) return(0); +if(priv->videoready == FALSE) return 0; alarm(1); sigfillset(&sa_mask); @@ -754,7 +754,7 @@ memcpy(buffer, priv->livebuf, len); /* PTS = 0, show the frame NOW, this routine is only used in playback mode without audio capture .. */ -return(0); +return 0; } static double grab_video_frame(priv_t *priv, char *buffer, int len) @@ -762,7 +762,7 @@ static double grab_video_frame(priv_t *priv, char *buffer, int len) double timestamp=0; sigset_t sa_mask; -if(priv->videoready == FALSE) return(0); +if(priv->videoready == FALSE) return 0; if(priv->immediatemode == TRUE) { @@ -784,12 +784,12 @@ priv->framebuf[priv->curbufframe].dirty = TRUE; priv->curbufframe++; if(priv->curbufframe >= RINGSIZE) priv->curbufframe = 0; -return(timestamp-priv->starttime); +return timestamp-priv->starttime; } static int get_video_framesize(priv_t *priv) { -return(priv->geom.columns*priv->geom.rows*16/8); +return priv->geom.columns * priv->geom.rows * 16 / 8; } static double grab_audio_frame(priv_t *priv, char *buffer, int len) @@ -839,7 +839,7 @@ else } } -return(priv->dspbytesread * 1.0 / priv->dsprate); +return priv->dspbytesread * 1.0 / priv->dsprate; } static int get_audio_framesize(priv_t *priv) @@ -855,7 +855,7 @@ if(priv->dspready == FALSE) return 0; if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "AUDIO_GETINFO", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } else bytesavail = auinf.record.seek; /* *priv->dspsamplesize; */ @@ -863,7 +863,7 @@ else if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "FIONREAD", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } #endif @@ -872,7 +872,7 @@ if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0) if(bytesavail == 0) return FRAGSIZE; -return(bytesavail); +return bytesavail; } static int getinput(int innumber) diff --git a/stream/tvi_def.h b/stream/tvi_def.h index 7b664a15b9..967c15ee15 100644 --- a/stream/tvi_def.h +++ b/stream/tvi_def.h @@ -34,12 +34,12 @@ static tvi_handle_t *new_handle(void) tvi_handle_t *h = (tvi_handle_t *)malloc(sizeof(tvi_handle_t)); if (!h) - return(NULL); + return NULL; h->priv = (priv_t *)malloc(sizeof(priv_t)); if (!h->priv) { free(h); - return(NULL); + return NULL; } memset(h->priv, 0, sizeof(priv_t)); h->functions = &functions; @@ -49,7 +49,7 @@ static tvi_handle_t *new_handle(void) h->norm = -1; h->channel = -1; h->scan = NULL; - return(h); + return h; } static void free_handle(tvi_handle_t *h) diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c index 9538a38985..3cf574cee4 100644 --- a/stream/tvi_dshow.c +++ b/stream/tvi_dshow.c @@ -2413,7 +2413,7 @@ static double grab_video_frame(priv_t * priv, char *buffer, int len) static int get_video_framesize(priv_t * priv) { // if(!priv->pmtVideo) return 1; //no video -// return(priv->pmtVideo->lSampleSize); +// return priv->pmtVideo->lSampleSize; if (!priv->chains[0]->rbuf) return 1; //no video mp_msg(MSGT_TV,MSGL_DBG3,"geT_video_framesize: %d\n",priv->chains[0]->rbuf->blocksize); @@ -2657,7 +2657,7 @@ static int start(priv_t * priv) mp_msg(MSGT_TV, MSGL_DBG2, "tvi_dshow: Graph is started.\n"); priv->state = 1; - return (1); + return 1; } /** @@ -3012,7 +3012,7 @@ static int uninit(priv_t * priv) { int i; if (!priv) - return (1); + return 1; //Debug if (priv->dwRegister) { RemoveFromRot(priv->dwRegister); @@ -3050,7 +3050,7 @@ static int uninit(priv_t * priv) priv->chains[i] = NULL; } CoUninitialize(); - return (1); + return 1; } /** @@ -3069,7 +3069,7 @@ static tvi_handle_t *tvi_init_dshow(tv_param_t* tv_param) h = new_handle(); if (!h) - return (NULL); + return NULL; priv = h->priv; @@ -3210,9 +3210,9 @@ static int control(priv_t * priv, int cmd, void *arg) DisplayMediaType("VID_GET_FORMAT", priv->chains[0]->pmt); if (priv->fcc) { *(int *) arg = priv->fcc; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } else - return (TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } case TVI_CONTROL_VID_SET_WIDTH: { @@ -3242,13 +3242,13 @@ static int control(priv_t * priv, int cmd, void *arg) priv->width = width; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_VID_GET_WIDTH: { if (priv->width) { *(int *) arg = priv->width; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } else return TVI_CONTROL_FALSE; } @@ -3265,7 +3265,7 @@ static int control(priv_t * priv, int cmd, void *arg) if (width % pCaps->OutputGranularityX) return TVI_CONTROL_FALSE; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_VID_SET_HEIGHT: { @@ -3298,13 +3298,13 @@ static int control(priv_t * priv, int cmd, void *arg) Vhdr->bmiHeader.biHeight) >> 3; priv->height = height; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_VID_GET_HEIGHT: { if (priv->height) { *(int *) arg = priv->height; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } else return TVI_CONTROL_FALSE; } @@ -3322,7 +3322,7 @@ static int control(priv_t * priv, int cmd, void *arg) if (height % pCaps->OutputGranularityY) return TVI_CONTROL_FALSE; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_IS_AUDIO: if (!priv->chains[1]->pmt) @@ -3399,7 +3399,7 @@ static int control(priv_t * priv, int cmd, void *arg) if (!priv->pTVTuner) return TVI_CONTROL_FALSE; - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_SET_NORM: { @@ -3420,9 +3420,9 @@ static int control(priv_t * priv, int cmd, void *arg) hr = OLE_CALL_ARGS(pVD, put_TVFormat, lAnalogFormat); OLE_RELEASE_SAFE(pVD); if (FAILED(hr)) - return (TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; else - return (TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_GET_NORM: { @@ -3450,7 +3450,7 @@ static int control(priv_t * priv, int cmd, void *arg) return TVI_CONTROL_TRUE; } } - return (TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } case TVI_CONTROL_SPC_GET_NORMID: { @@ -3539,5 +3539,5 @@ static int control(priv_t * priv, int cmd, void *arg) return teletext_control(priv->priv_vbi,cmd,arg); #endif } - return (TVI_CONTROL_UNKNOWN); + return TVI_CONTROL_UNKNOWN; } diff --git a/stream/tvi_dummy.c b/stream/tvi_dummy.c index 7480d82b71..a9877fd653 100644 --- a/stream/tvi_dummy.c +++ b/stream/tvi_dummy.c @@ -29,7 +29,7 @@ typedef struct { /* handler creator - entry point ! */ static tvi_handle_t *tvi_init_dummy(tv_param_t* tv_param) { - return(new_handle()); + return new_handle(); } /* initialisation */ @@ -37,18 +37,18 @@ static int init(priv_t *priv) { priv->width = 320; priv->height = 200; - return(1); + return 1; } /* that's the real start, we'got the format parameters (checked with control) */ static int start(priv_t *priv) { - return(1); + return 1; } static int uninit(priv_t *priv) { - return(1); + return 1; } static int control(priv_t *priv, int cmd, void *arg) @@ -56,59 +56,59 @@ static int control(priv_t *priv, int cmd, void *arg) switch(cmd) { case TVI_CONTROL_IS_VIDEO: - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_FORMAT: // *(int *)arg = IMGFMT_YV12; *(int *)arg = IMGFMT_YV12; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_SET_FORMAT: { // int req_fmt = *(int *)arg; int req_fmt = *(int *)arg; if (req_fmt != IMGFMT_YV12) - return(TVI_CONTROL_FALSE); - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_FALSE; + return TVI_CONTROL_TRUE; } case TVI_CONTROL_VID_SET_WIDTH: priv->width = *(int *)arg; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_WIDTH: *(int *)arg = priv->width; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_SET_HEIGHT: priv->height = *(int *)arg; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_HEIGHT: *(int *)arg = priv->height; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_CHK_WIDTH: case TVI_CONTROL_VID_CHK_HEIGHT: - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_TUN_SET_NORM: - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } - return(TVI_CONTROL_UNKNOWN); + return TVI_CONTROL_UNKNOWN; } static double grab_video_frame(priv_t *priv, char *buffer, int len) { memset(buffer, 0x42, len); - return(1); + return 1; } static int get_video_framesize(priv_t *priv) { /* YV12 */ - return(priv->width*priv->height*12/8); + return priv->width * priv->height * 12 / 8; } static double grab_audio_frame(priv_t *priv, char *buffer, int len) { memset(buffer, 0x42, len); - return(1); + return 1; } static int get_audio_framesize(priv_t *priv) { - return(1); + return 1; } diff --git a/stream/tvi_v4l.c b/stream/tvi_v4l.c index 826fe71f19..72af5c4d14 100644 --- a/stream/tvi_v4l.c +++ b/stream/tvi_v4l.c @@ -221,18 +221,18 @@ static int palette2depth(int palette) { /* component */ case VIDEO_PALETTE_RGB555: - return(15); + return 15; case VIDEO_PALETTE_RGB565: - return(16); + return 16; case VIDEO_PALETTE_RGB24: - return(24); + return 24; case VIDEO_PALETTE_RGB32: - return(32); + return 32; /* planar */ case VIDEO_PALETTE_YUV411P: case VIDEO_PALETTE_YUV420P: case VIDEO_PALETTE_YUV410P: - return(12); + return 12; /* packed */ case VIDEO_PALETTE_YUV422P: case VIDEO_PALETTE_YUV422: @@ -240,9 +240,9 @@ static int palette2depth(int palette) case VIDEO_PALETTE_UYVY: case VIDEO_PALETTE_YUV420: case VIDEO_PALETTE_YUV411: - return(16); + return 16; } - return(-1); + return -1; } static int format2palette(int format) @@ -250,22 +250,22 @@ static int format2palette(int format) switch(format) { case IMGFMT_BGR15: - return(VIDEO_PALETTE_RGB555); + return VIDEO_PALETTE_RGB555; case IMGFMT_BGR16: - return(VIDEO_PALETTE_RGB565); + return VIDEO_PALETTE_RGB565; case IMGFMT_BGR24: - return(VIDEO_PALETTE_RGB24); + return VIDEO_PALETTE_RGB24; case IMGFMT_BGR32: - return(VIDEO_PALETTE_RGB32); + return VIDEO_PALETTE_RGB32; case IMGFMT_YV12: case IMGFMT_I420: - return(VIDEO_PALETTE_YUV420P); + return VIDEO_PALETTE_YUV420P; case IMGFMT_YUY2: - return(VIDEO_PALETTE_YUV422); + return VIDEO_PALETTE_YUV422; case IMGFMT_UYVY: - return(VIDEO_PALETTE_UYVY); + return VIDEO_PALETTE_UYVY; } - return(-1); + return -1; } // sets and sanitizes audio buffer/block sizes @@ -296,7 +296,7 @@ static tvi_handle_t *tvi_init_v4l(tv_param_t* tv_param) h = new_handle(); if (!h) - return(NULL); + return NULL; priv = h->priv; @@ -316,11 +316,11 @@ static tvi_handle_t *tvi_init_v4l(tv_param_t* tv_param) /* allocation failed */ if (!priv->video_device) { free_handle(h); - return(NULL); + return NULL; } priv->tv_param=tv_param; - return(h); + return h; } /* retrieves info about audio channels from the BTTV */ @@ -658,7 +658,7 @@ static int init(priv_t *priv) setup_audio_buffer_sizes(priv); } - return(1); + return 1; malloc_failed: if (priv->channels) @@ -668,7 +668,7 @@ malloc_failed: err: if (priv->video_fd != -1) close(priv->video_fd); - return(0); + return 0; } static int uninit(priv_t *priv) @@ -751,7 +751,7 @@ static int uninit(priv_t *priv) free(priv->audio_skew_buffer); } - return(1); + return 1; } static int get_capture_buffer_size(priv_t *priv) @@ -908,7 +908,7 @@ static int start(priv_t *priv) if (ioctl(priv->video_fd, VIDIOCGPICT, &priv->picture) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl get picture failed: %s\n", strerror(errno)); - return(0); + return 0; } priv->picture.palette = format2palette(priv->format); @@ -999,7 +999,7 @@ static int start(priv_t *priv) if (ioctl(priv->video_fd, VIDIOCSPLAYMODE, &pmode) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl set play mode failed: %s\n", strerror(errno)); -// return(0); +// return 0; } } #endif @@ -1009,7 +1009,7 @@ static int start(priv_t *priv) if (ioctl(priv->video_fd, VIDIOCCAPTURE, &one) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "FATAL: ioctl ccapture failed: %s\n", strerror(errno)); - return(0); + return 0; } #endif @@ -1130,7 +1130,7 @@ static int start(priv_t *priv) pthread_mutex_init(&priv->video_buffer_mutex, NULL); /* we'll launch the video capture later, when a first request for a frame arrives */ - return(1); + return 1; } @@ -1144,22 +1144,22 @@ static int control(priv_t *priv, int cmd, void *arg) case TVI_CONTROL_IS_VIDEO: { if (priv->capability.type & VID_TYPE_CAPTURE) - return(TVI_CONTROL_TRUE); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_TRUE; + return TVI_CONTROL_FALSE; } case TVI_CONTROL_IS_AUDIO: - if (priv->tv_param->force_audio) return(TVI_CONTROL_TRUE); + if (priv->tv_param->force_audio) return TVI_CONTROL_TRUE; if (priv->channels[priv->act_channel].flags & VIDEO_VC_AUDIO) { - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; case TVI_CONTROL_IS_TUNER: { // if (priv->capability.type & VID_TYPE_TUNER) if (priv->channels[priv->act_channel].flags & VIDEO_VC_TUNER) - return(TVI_CONTROL_TRUE); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_TRUE; + return TVI_CONTROL_FALSE; } /* ========== VIDEO controls =========== */ @@ -1181,7 +1181,7 @@ static int control(priv_t *priv, int cmd, void *arg) *(int *)arg = output_fmt; mp_msg(MSGT_TV, MSGL_V, "Output format: %s\n", vo_format_name(output_fmt)); } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_VID_SET_FORMAT: priv->format = *(int *)arg; @@ -1193,16 +1193,16 @@ static int control(priv_t *priv, int cmd, void *arg) priv->format &= ~IMGFMT_RGB_MASK; priv->format |= IMGFMT_BGR; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_PLANES: *(int *)arg = 1; /* FIXME, also not needed at this time */ - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_BITS: *(int *)arg = palette2depth(format2palette(priv->format)); - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_WIDTH: *(int *)arg = priv->width; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_CHK_WIDTH: { int req_width = *(int *)arg; @@ -1210,15 +1210,15 @@ static int control(priv_t *priv, int cmd, void *arg) mp_msg(MSGT_TV, MSGL_V, "Requested width: %d\n", req_width); if ((req_width >= priv->capability.minwidth) && (req_width <= priv->capability.maxwidth)) - return(TVI_CONTROL_TRUE); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_TRUE; + return TVI_CONTROL_FALSE; } case TVI_CONTROL_VID_SET_WIDTH: priv->width = *(int *)arg; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_HEIGHT: *(int *)arg = priv->height; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_CHK_HEIGHT: { int req_height = *(int *)arg; @@ -1226,26 +1226,26 @@ static int control(priv_t *priv, int cmd, void *arg) mp_msg(MSGT_TV, MSGL_V, "Requested height: %d\n", req_height); if ((req_height >= priv->capability.minheight) && (req_height <= priv->capability.maxheight)) - return(TVI_CONTROL_TRUE); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_TRUE; + return TVI_CONTROL_FALSE; } case TVI_CONTROL_VID_SET_HEIGHT: priv->height = *(int *)arg; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_GET_PICTURE: if (ioctl(priv->video_fd, VIDIOCGPICT, &priv->picture) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl get picture failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_SET_PICTURE: if (ioctl(priv->video_fd, VIDIOCSPICT, &priv->picture) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl set picture failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_VID_SET_BRIGHTNESS: priv->picture.brightness = (327*(*(int *)arg+100)) + 68; return control(priv, TVI_CONTROL_VID_SET_PICTURE, 0); @@ -1276,7 +1276,7 @@ static int control(priv_t *priv, int cmd, void *arg) return 1; case TVI_CONTROL_VID_GET_FPS: *(float *)arg=priv->fps; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; /* ========== TUNER controls =========== */ case TVI_CONTROL_TUN_GET_FREQ: @@ -1286,14 +1286,14 @@ static int control(priv_t *priv, int cmd, void *arg) if (ioctl(priv->video_fd, VIDIOCGFREQ, &freq) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl get freq failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } /* tuner uses khz not mhz ! */ // if (priv->tuner.flags & VIDEO_TUNER_LOW) // freq /= 1000; *(unsigned long *)arg = freq; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_SET_FREQ: { @@ -1314,7 +1314,7 @@ static int control(priv_t *priv, int cmd, void *arg) if (ioctl(priv->video_fd, VIDIOCSFREQ, &freq) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl set freq failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } usleep(100000); // wait to suppress noise during switching @@ -1323,28 +1323,28 @@ static int control(priv_t *priv, int cmd, void *arg) ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]); } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_GET_TUNER: { if (ioctl(priv->video_fd, VIDIOCGTUNER, &priv->tuner) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl get tuner failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } mp_msg(MSGT_TV, MSGL_V, "Tuner (%s) range: %lu -> %lu\n", priv->tuner.name, priv->tuner.rangelow, priv->tuner.rangehigh); - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_SET_TUNER: { if (ioctl(priv->video_fd, VIDIOCSTUNER, &priv->tuner) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl set tuner failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_SET_NORM: { @@ -1356,7 +1356,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(!supported_norms[norm_index].name) { mp_msg(MSGT_TV, MSGL_ERR, "Unknown norm!\n"); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } if (priv->channels[priv->act_channel].flags & VIDEO_VC_TUNER) { @@ -1366,7 +1366,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(!(priv->tuner.flags & supported_norms[norm_index].tuner_flags)) { mp_msg(MSGT_TV, MSGL_ERR, "Tuner isn't capable to set norm!\n"); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } prev_mode = priv->tuner.mode; @@ -1375,7 +1375,7 @@ static int control(priv_t *priv, int cmd, void *arg) if (control(priv, TVI_CONTROL_TUN_SET_TUNER, &priv->tuner) != TVI_CONTROL_TRUE) { // norm setting failed, but maybe it's only because it's fixed - if (priv->tuner.mode != prev_mode) return(TVI_CONTROL_FALSE); // no it really failed + if (priv->tuner.mode != prev_mode) return TVI_CONTROL_FALSE; // no it really failed } } @@ -1385,12 +1385,12 @@ static int control(priv_t *priv, int cmd, void *arg) if (ioctl(priv->video_fd, VIDIOCSCHAN, &priv->channels[priv->act_channel]) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl set chan failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } if (ioctl(priv->video_fd, VIDIOCGCAP, &priv->capability) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl get capabilites failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } priv->fps = supported_norms[norm_index].fps; @@ -1403,51 +1403,51 @@ static int control(priv_t *priv, int cmd, void *arg) priv->width = priv->capability.maxwidth; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_GET_NORM: { *(int *)arg = priv->tuner.mode; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_TUN_GET_SIGNAL: { if (ioctl(priv->video_fd, VIDIOCGTUNER, &priv->tuner) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl get tuner failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } *(int*)arg=100*(priv->tuner.signal>>8)/255; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } /* ========== AUDIO controls =========== */ case TVI_CONTROL_AUD_GET_FORMAT: { *(int *)arg = AF_FORMAT_S16_LE; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_AUD_GET_CHANNELS: { *(int *)arg = priv->audio_in.channels; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_AUD_GET_SAMPLERATE: { *(int *)arg = priv->audio_in.samplerate; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_AUD_GET_SAMPLESIZE: { *(int *)arg = priv->audio_in.bytes_per_sample; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_AUD_SET_SAMPLERATE: { if (audio_in_set_samplerate(&priv->audio_in, *(int *)arg) < 0) return TVI_CONTROL_FALSE; setup_audio_buffer_sizes(priv); - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } /* ========== SPECIFIC controls =========== */ case TVI_CONTROL_SPC_GET_INPUT: @@ -1466,9 +1466,9 @@ static int control(priv_t *priv, int cmd, void *arg) if (ioctl(priv->video_fd, VIDIOCGCHAN, &priv->channels[i]) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl get channel failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } case TVI_CONTROL_SPC_SET_INPUT: @@ -1481,7 +1481,7 @@ static int control(priv_t *priv, int cmd, void *arg) { mp_msg(MSGT_TV, MSGL_ERR, "Invalid input requested: %d, valid: 0-%d\n", req_chan, priv->capability.channels - 1); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } for (i = 0; i < priv->capability.channels; i++) @@ -1493,7 +1493,7 @@ static int control(priv_t *priv, int cmd, void *arg) if (ioctl(priv->video_fd, VIDIOCSCHAN, &chan) == -1) { mp_msg(MSGT_TV, MSGL_ERR, "ioctl set chan failed: %s\n", strerror(errno)); - return(TVI_CONTROL_FALSE); + return TVI_CONTROL_FALSE; } mp_msg(MSGT_TV, MSGL_INFO, "Using input '%s'\n", chan.name); @@ -1506,10 +1506,10 @@ static int control(priv_t *priv, int cmd, void *arg) /* update local channel list */ control(priv, TVI_CONTROL_SPC_GET_INPUT, &req_chan); - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; case TVI_CONTROL_IMMEDIATE: priv->immediate_mode = 1; - return(TVI_CONTROL_TRUE); + return TVI_CONTROL_TRUE; } #ifdef HAVE_TV_TELETEXT case TVI_CONTROL_VBI_INIT: @@ -1534,7 +1534,7 @@ static int control(priv_t *priv, int cmd, void *arg) #endif } - return(TVI_CONTROL_UNKNOWN); + return TVI_CONTROL_UNKNOWN; } static int set_mute(priv_t* priv,int value) @@ -1810,7 +1810,7 @@ static double grab_video_frame(priv_t *priv, char *buffer, int len) static int get_video_framesize(priv_t *priv) { - return(priv->bytesperline * priv->height); + return priv->bytesperline * priv->height; } static void *audio_grabber(void *data) @@ -1910,5 +1910,5 @@ static double grab_audio_frame(priv_t *priv, char *buffer, int len) static int get_audio_framesize(priv_t *priv) { - return(priv->audio_in.blocksize); + return priv->audio_in.blocksize; } diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index 638787f416..a13d4c203a 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -1016,7 +1016,7 @@ static int control(priv_t *priv, int cmd, void *arg) #endif } mp_msg(MSGT_TV, MSGL_V, "%s: unknown control: %d\n", info.short_name, cmd); - return(TVI_CONTROL_UNKNOWN); + return TVI_CONTROL_UNKNOWN; } @@ -1976,5 +1976,5 @@ out: static int get_audio_framesize(priv_t *priv) { - return(priv->audio_in.blocksize); + return priv->audio_in.blocksize; } -- cgit v1.2.3