[xiph-commits] r16935 - trunk/y4oi
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Tue Feb 23 23:47:31 PST 2010
Author: xiphmont
Date: 2010-02-23 23:47:31 -0800 (Tue, 23 Feb 2010)
New Revision: 16935
Modified:
trunk/y4oi/main.c
trunk/y4oi/y4o.c
trunk/y4oi/y4oi.h
Log:
Get rid of some errant/incorrect 'verbose' conditionals
Modified: trunk/y4oi/main.c
===================================================================
--- trunk/y4oi/main.c 2010-02-24 07:40:16 UTC (rev 16934)
+++ trunk/y4oi/main.c 2010-02-24 07:47:31 UTC (rev 16935)
@@ -28,7 +28,7 @@
int verbose=0;
static double fill_secs=25.;
-static double sync_secs=1.;
+static double sync_secs=3.;
ratio force_fps={0,0};
static int force_sync=0;
int force_no_sync=0;
@@ -299,17 +299,15 @@
frame_t *p=s->inq_head;
if(!p) return 1;
- if(verbose){
- if(s->type==STREAM_VIDEO){
- yverbose("Stream %d [%s]: Dropping video frame to maintain sync\n",
- p->streamno,
- make_time_string((outclock[p->streamno]+s->tick_depth)*s->tickduration));
- }else{
- yverbose("Stream %d [%s]: Dropping %gs of audio to maintain sync\n",
- p->streamno,
- make_time_string((outclock[p->streamno]+s->tick_depth)*s->tickduration),
- p->duration);
- }
+ if(s->type==STREAM_VIDEO){
+ yverbose("Stream %d [%s]: Dropping video frame to maintain sync\n",
+ p->streamno,
+ make_time_string((outclock[p->streamno]+s->tick_depth)*s->tickduration));
+ }else{
+ yverbose("Stream %d [%s]: Dropping %gs of audio to maintain sync\n",
+ p->streamno,
+ make_time_string((outclock[p->streamno]+s->tick_depth)*s->tickduration),
+ p->duration);
}
y4o_free_frame(p);
@@ -322,17 +320,15 @@
frame_t *p=s->inq_tail;
if(!p) return 1;
- if(verbose){
- if(s->type==STREAM_VIDEO){
- yverbose("Stream %d [%s]: Dropping video frame to maintain sync\n",
- p->streamno,
- make_time_string(outclock[p->streamno]*s->tickduration));
- }else{
- yverbose("Stream %d [%s]: Dropping %gs of audio to maintain sync\n",
- p->streamno,
- make_time_string(outclock[p->streamno]*s->tickduration),
- p->duration);
- }
+ if(s->type==STREAM_VIDEO){
+ yverbose("Stream %d [%s]: Dropping video frame to maintain sync\n",
+ p->streamno,
+ make_time_string(outclock[p->streamno]*s->tickduration));
+ }else{
+ yverbose("Stream %d [%s]: Dropping %gs of audio to maintain sync\n",
+ p->streamno,
+ make_time_string(outclock[p->streamno]*s->tickduration),
+ p->duration);
}
y4o_free_frame(p);
@@ -364,11 +360,10 @@
p->duration -= remsamples*s->tickduration;
s->tick_depth -= remsamples;
- if(verbose)
- yverbose("Stream %d [%s]: Dropping %gs of audio to maintain sync\n",
- p->streamno,
- make_time_string((outclock[sno]+s->tick_depth)*s->tickduration),
- outoffsets[sno]);
+ yverbose("Stream %d [%s]: Dropping %gs of audio to maintain sync\n",
+ p->streamno,
+ make_time_string((outclock[sno]+s->tick_depth)*s->tickduration),
+ outoffsets[sno]);
}
outoffsets[sno] = 0.;
@@ -410,10 +405,9 @@
if(remsamples>0){
int bytes = remsamples * s->m.audio.ch*3;
- if(verbose)
- yverbose("Stream %d [%s]: Dropping %gs of audio to maintain sync\n",
- p->streamno,make_time_string(outclock[sno]*s->tickduration),
- outoffsets[sno]);
+ yverbose("Stream %d [%s]: Dropping %gs of audio to maintain sync\n",
+ p->streamno,make_time_string(outclock[sno]*s->tickduration),
+ outoffsets[sno]);
/* load frame data into memory and release swap */
y4o_lock_frame(p);
@@ -666,9 +660,8 @@
/* we only dup the frame if doing so gets us closer to the ideal clock sync */
if(fabs(outoffsets[sno]+p->duration)<fabs(outoffsets[sno])){
/* dup it */
- if(verbose)
- yverbose("Stream %d [%s]: Repeating video frame to maintain sync\n",
- p->streamno,make_time_string(outclock[sno]*s->tickduration));
+ yverbose("Stream %d [%s]: Repeating video frame to maintain sync\n",
+ p->streamno,make_time_string(outclock[sno]*s->tickduration));
write_frame(y,outclock,cutclock,cutticks,p);
outoffsets[sno]+=p->duration;
@@ -686,9 +679,8 @@
int bytes = samples * s->m.audio.ch;
unsigned char *data=calloc(bytes,1);
- if(verbose)
- yverbose("Stream %d [%s]: Adding %gs of silence to maintain sync\n",
- p->streamno,make_time_string(outclock[sno]*s->tickduration),-outoffsets[sno]);
+ yverbose("Stream %d [%s]: Adding %gs of silence to maintain sync\n",
+ p->streamno,make_time_string(outclock[sno]*s->tickduration),-outoffsets[sno]);
lp.data=data;
lp.len=bytes;
Modified: trunk/y4oi/y4o.c
===================================================================
--- trunk/y4oi/y4o.c 2010-02-24 07:40:16 UTC (rev 16934)
+++ trunk/y4oi/y4o.c 2010-02-24 07:47:31 UTC (rev 16935)
@@ -431,22 +431,21 @@
s->inswap.f[1]=tmpfile();
}
- if(verbose)
- switch(s->type){
- case STREAM_VIDEO:
- yinfo("Stream #%d, VIDEO %dx%d %d:%d %s %.3ffps %s\n",
- s->stream_num, s->m.video.w,s->m.video.h, s->m.video.frame_n,s->m.video.frame_d,
- chromaformat_long[s->m.video.format],s->m.video.fps_n/(double)s->m.video.fps_d,
- s->m.video.i?"interlaced":"progressive");
- if(s->m.video.i && force_non_interlaced)
- yinfo("FORCING NON-INTERLACED\n");
- break;
- case STREAM_AUDIO:
- yinfo("Stream #%d, AUDIO %dHz, %d channel(s) [24bit]\n",
- s->stream_num, s->m.audio.rate,s->m.audio.ch);
- default:
- break;
- }
+ switch(s->type){
+ case STREAM_VIDEO:
+ yinfo("Stream #%d, VIDEO %dx%d %d:%d %s %.3ffps %s\n",
+ s->stream_num, s->m.video.w,s->m.video.h, s->m.video.frame_n,s->m.video.frame_d,
+ chromaformat_long[s->m.video.format],s->m.video.fps_n/(double)s->m.video.fps_d,
+ s->m.video.i?"interlaced":"progressive");
+ if(s->m.video.i && force_non_interlaced)
+ yinfo("FORCING NON-INTERLACED\n");
+ break;
+ case STREAM_AUDIO:
+ yinfo("Stream #%d, AUDIO %dHz, %d channel(s) [24bit]\n",
+ s->stream_num, s->m.audio.rate,s->m.audio.ch);
+ default:
+ break;
+ }
if(s->type==STREAM_VIDEO && force_non_interlaced) s->m.video.i=PROGRESSIVE;
if(ll)ll->next=s;
Modified: trunk/y4oi/y4oi.h
===================================================================
--- trunk/y4oi/y4oi.h 2010-02-24 07:40:16 UTC (rev 16934)
+++ trunk/y4oi/y4oi.h 2010-02-24 07:47:31 UTC (rev 16935)
@@ -247,8 +247,7 @@
fprintf(stderr,"%s [%8s]: " format,level?level:" ", \
NAME?NAME:"",## args); \
}else{ \
- fprintf(stderr,"%s%s" format,level?level:"",level?": ":"" \
- ,## args); \
+ fprintf(stderr,"%s%s" format,level?level:"",level?": ":"",## args); \
} \
}else{ \
fprintf(stderr,"%s%s" format,level?level:"", \
More information about the commits
mailing list