[MPlayer-cvslog] r26788 - in trunk/stream: asf_mmst_streaming.c rtp.c stream_cddb.c stream_cue.c stream_ftp.c tv.c tvi_bsdbt848.c tvi_def.h tvi_dshow.c tvi_dummy.c tvi_v4l.c tvi_v4l2.c

diego subversion at mplayerhq.hu
Fri May 16 10:43:15 CEST 2008


Author: diego
Date: Fri May 16 10:43:15 2008
New Revision: 26788

Log:
cosmetics: Remove useless parentheses from return statements.


Modified:
   trunk/stream/asf_mmst_streaming.c
   trunk/stream/rtp.c
   trunk/stream/stream_cddb.c
   trunk/stream/stream_cue.c
   trunk/stream/stream_ftp.c
   trunk/stream/tv.c
   trunk/stream/tvi_bsdbt848.c
   trunk/stream/tvi_def.h
   trunk/stream/tvi_dshow.c
   trunk/stream/tvi_dummy.c
   trunk/stream/tvi_v4l.c
   trunk/stream/tvi_v4l2.c

Modified: trunk/stream/asf_mmst_streaming.c
==============================================================================
--- trunk/stream/asf_mmst_streaming.c	(original)
+++ trunk/stream/asf_mmst_streaming.c	Fri May 16 10:43:15 2008
@@ -266,7 +266,7 @@ static int get_header (int s, uint8_t *h
 
      //	mp_msg(MSGT_NETWORK,MSGL_INFO,"get header packet finished\n");
 
-	return (header_len);
+	return header_len;
 
       } 
 

Modified: trunk/stream/rtp.c
==============================================================================
--- trunk/stream/rtp.c	(original)
+++ trunk/stream/rtp.c	Fri May 16 10:43:15 2008
@@ -213,7 +213,7 @@ int read_rtp_from_server(int fd, char *b
 		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 rtphea
 
   //  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;
 }

Modified: trunk/stream/stream_cddb.c
==============================================================================
--- trunk/stream/stream_cddb.c	(original)
+++ trunk/stream/stream_cddb.c	Fri May 16 10:43:15 2008
@@ -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;
 }
 
 

Modified: trunk/stream/stream_cue.c
==============================================================================
--- trunk/stream/stream_cue.c	(original)
+++ trunk/stream/stream_cue.c	Fri May 16 10:43:15 2008
@@ -120,7 +120,7 @@ static int cue_getTrackinfo(char *Line, 
     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, 
     else mp_msg (MSGT_OPEN,MSGL_INFO,
                  MSGTR_MPDEMUX_CUEREAD_UnexpectedCuefileLine, Line);
   }
-  return(0);
+  return 0;
 }
 
 

Modified: trunk/stream/stream_ftp.c
==============================================================================
--- trunk/stream/stream_ftp.c	(original)
+++ trunk/stream/stream_ftp.c	Fri May 16 10:43:15 2008
@@ -81,7 +81,7 @@ static int fd_can_read(int fd,int timeou
   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;
 }
 
 /*

Modified: trunk/stream/tv.c
==============================================================================
--- trunk/stream/tv.c	(original)
+++ trunk/stream/tv.c	Fri May 16 10:43:15 2008
@@ -601,7 +601,7 @@ static tvi_handle_t *tv_begin(tv_param_t
         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 *t
 	    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 *t
 	    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, unsig
 	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, unsig
 	    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 *t
 	    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, i
 			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 *tv
 		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, ch
 				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*
 	return 0;
     }
     tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
-    return(1);
+    return 1;
 }
 
 demuxer_desc_t demuxer_desc_tv = {

Modified: trunk/stream/tvi_bsdbt848.c
==============================================================================
--- trunk/stream/tvi_bsdbt848.c	(original)
+++ trunk/stream/tvi_bsdbt848.c	Fri May 16 10:43:15 2008
@@ -227,18 +227,18 @@ static int control(priv_t *priv, int cmd
 
     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
         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
         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
         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
         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
            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
         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
         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
 	    }
 #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
         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
         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
         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(
 {
 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 *p
 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 
 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, &bytesav
 
 if(bytesavail == 0) return FRAGSIZE;
 
-return(bytesavail);
+return bytesavail;
 }
 
 static int getinput(int innumber)

Modified: trunk/stream/tvi_def.h
==============================================================================
--- trunk/stream/tvi_def.h	(original)
+++ trunk/stream/tvi_def.h	Fri May 16 10:43:15 2008
@@ -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)

Modified: trunk/stream/tvi_dshow.c
==============================================================================
--- trunk/stream/tvi_dshow.c	(original)
+++ trunk/stream/tvi_dshow.c	Fri May 16 10:43:15 2008
@@ -2413,7 +2413,7 @@ static double grab_video_frame(priv_t * 
 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_p
 
     h = new_handle();
     if (!h)
-	return (NULL);
+	return NULL;
 
     priv = h->priv;
 
@@ -3210,9 +3210,9 @@ static int control(priv_t * priv, int cm
 	    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 cm
 
 	    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 cm
 
 	    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 cm
 		     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 cm
 	    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 cm
 	    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 cm
 	    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 cm
 		    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 cm
         return teletext_control(priv->priv_vbi,cmd,arg);
 #endif
     }
-    return (TVI_CONTROL_UNKNOWN);
+    return TVI_CONTROL_UNKNOWN;
 }

Modified: trunk/stream/tvi_dummy.c
==============================================================================
--- trunk/stream/tvi_dummy.c	(original)
+++ trunk/stream/tvi_dummy.c	Fri May 16 10:43:15 2008
@@ -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
     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;
 }

Modified: trunk/stream/tvi_v4l.c
==============================================================================
--- trunk/stream/tvi_v4l.c	(original)
+++ trunk/stream/tvi_v4l.c	Fri May 16 10:43:15 2008
@@ -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_par
 
     h = new_handle();
     if (!h)
-        return(NULL);
+        return NULL;
 
     priv = h->priv;
 
@@ -316,11 +316,11 @@ static tvi_handle_t *tvi_init_v4l(tv_par
     /* 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
         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
                 *(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
                 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
             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
             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
             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
             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
             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
                 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
 
             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
                 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
 
                 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
             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
                 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
             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
             {
                 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
             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
 
             /* 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
 #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 *p
 
 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 *p
 
 static int get_audio_framesize(priv_t *priv)
 {
-    return(priv->audio_in.blocksize);
+    return priv->audio_in.blocksize;
 }

Modified: trunk/stream/tvi_v4l2.c
==============================================================================
--- trunk/stream/tvi_v4l2.c	(original)
+++ trunk/stream/tvi_v4l2.c	Fri May 16 10:43:15 2008
@@ -1016,7 +1016,7 @@ static int control(priv_t *priv, int cmd
 #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;
 }



More information about the MPlayer-cvslog mailing list