summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stream/asf_mmst_streaming.c2
-rw-r--r--stream/rtp.c4
-rw-r--r--stream/stream_cddb.c2
-rw-r--r--stream/stream_cue.c4
-rw-r--r--stream/stream_ftp.c2
-rw-r--r--stream/tv.c26
-rw-r--r--stream/tvi_bsdbt848.c112
-rw-r--r--stream/tvi_def.h6
-rw-r--r--stream/tvi_dshow.c36
-rw-r--r--stream/tvi_dummy.c38
-rw-r--r--stream/tvi_v4l.c160
-rw-r--r--stream/tvi_v4l2.c4
12 files changed, 198 insertions, 198 deletions
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 vi