@@ -2796,7 +2796,7 @@ static void VaapiPutSurfaceX11(VaapiDecoder * decoder, VASurfaceID surface, int
2796
2796
}
2797
2797
e = GetMsTicks ();
2798
2798
if (e - s > 2000 ) {
2799
- Error ("video/vaapi: gpu hung %dms %d" , e - s , decoder -> FrameCounter );
2799
+ Error ("video/vaapi: gpu hung %ums %d" , e - s , decoder -> FrameCounter );
2800
2800
}
2801
2801
}
2802
2802
@@ -3232,7 +3232,7 @@ static void VaapiBlackSurface(VaapiDecoder * decoder)
3232
3232
3233
3233
put1 = GetMsTicks ();
3234
3234
if (put1 - sync > 2000 ) {
3235
- Error ("video/vaapi: gpu hung %dms %d" , put1 - sync , decoder -> FrameCounter );
3235
+ Error ("video/vaapi: gpu hung %ums %d" , put1 - sync , decoder -> FrameCounter );
3236
3236
}
3237
3237
#ifdef DEBUG
3238
3238
Debug8 ("video/vaapi: sync %2u put1 %2u" , sync - start , put1 - sync );
@@ -3449,8 +3449,7 @@ static void VaapiAdvanceDecoderFrame(VaapiDecoder * decoder)
3449
3449
if (filled <= 1 ) {
3450
3450
// keep use of last surface
3451
3451
++ decoder -> FramesDuped ;
3452
- // FIXME: don't warn after stream start, don't warn during pause
3453
- Error ("video: display buffer empty, duping frame (%d/%d) %d" , decoder -> FramesDuped , decoder -> FrameCounter ,
3452
+ Debug ("video: display buffer empty, duping frame (%u/%u) %d" , decoder -> FramesDuped , decoder -> FrameCounter ,
3454
3453
VideoGetBuffers (decoder -> Stream ));
3455
3454
return ;
3456
3455
}
@@ -3604,9 +3603,7 @@ char *VaapiGetStats(VaapiDecoder * decoder)
3604
3603
if (snprintf (& buffer [0 ], sizeof (buffer ),
3605
3604
" Frames: missed(%d) duped(%d) dropped(%d) total(%d) PTS(%s) drift(%" PRId64 ") audio(%" PRId64 ") video(%"
3606
3605
PRId64 ")" , decoder -> FramesMissed , decoder -> FramesDuped , decoder -> FramesDropped , decoder -> FrameCounter ,
3607
- Timestamp2String (video_clock ),
3608
- abs ((video_clock - audio_clock ) / 90 ) < 8888 ? ((video_clock - audio_clock ) / 90 ) : 8888 ,
3609
- AudioGetDelay () / 90 , VideoDeltaPTS / 90 )) {
3606
+ Timestamp2String (video_clock ), (video_clock - audio_clock ) / 90 , AudioGetDelay () / 90 , VideoDeltaPTS / 90 )) {
3610
3607
return strdup (buffer );
3611
3608
}
3612
3609
@@ -3719,24 +3716,24 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
3719
3716
}
3720
3717
3721
3718
if (abs (diff ) > 5000 * 90 ) { // more than 5s
3722
- err = VaapiMessage (1 , "video: audio/video difference too big" );
3719
+ err = VaapiMessage (2 , "video: audio/video difference too big" );
3723
3720
} else if (diff > 100 * 90 ) {
3724
3721
// FIXME: this quicker sync step, did not work with new code!
3725
- err = VaapiMessage (1 , "video: slow down video, duping frame" );
3722
+ err = VaapiMessage (2 , "video: slow down video, duping frame" );
3726
3723
++ decoder -> FramesDuped ;
3727
3724
if (VideoSoftStartSync ) {
3728
3725
decoder -> SyncCounter = 1 ;
3729
3726
goto out ;
3730
3727
}
3731
3728
} else if (diff > 55 * 90 ) {
3732
- err = VaapiMessage (1 , "video: slow down video, duping frame" );
3729
+ err = VaapiMessage (2 , "video: slow down video, duping frame" );
3733
3730
++ decoder -> FramesDuped ;
3734
3731
if (VideoSoftStartSync ) {
3735
3732
decoder -> SyncCounter = 1 ;
3736
3733
goto out ;
3737
3734
}
3738
3735
} else if (diff < lower_limit * 90 && filled > 1 + 2 * decoder -> Interlaced ) {
3739
- err = VaapiMessage (1 , "video: speed up video, droping frame" );
3736
+ err = VaapiMessage (2 , "video: speed up video, droping frame" );
3740
3737
++ decoder -> FramesDropped ;
3741
3738
VaapiAdvanceDecoderFrame (decoder );
3742
3739
if (VideoSoftStartSync ) {
@@ -3762,7 +3759,7 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
3762
3759
++ decoder -> FramesDuped ;
3763
3760
// FIXME: don't warn after stream start, don't warn during pause
3764
3761
err =
3765
- VaapiMessage (0 , "video: decoder buffer empty, duping frame (%d/%d ) %d v-buf" , decoder -> FramesDuped ,
3762
+ VaapiMessage (0 , "video: decoder buffer empty, duping frame (%u/%u ) %d v-buf" , decoder -> FramesDuped ,
3766
3763
decoder -> FrameCounter , VideoGetBuffers (decoder -> Stream ));
3767
3764
// some time no new picture
3768
3765
if (decoder -> Closing < -300 ) {
@@ -3782,10 +3779,10 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
3782
3779
VaapiMessage (0 , NULL );
3783
3780
}
3784
3781
Info ("video: %s%+5" PRId64 " %4" PRId64 " %3d/\\ms %3d%+d v-buf" , Timestamp2String (video_clock ),
3785
- abs (( video_clock - audio_clock ) / 90 ) < 8888 ? (( video_clock - audio_clock ) / 90 ) : 8888 ,
3786
- AudioGetDelay () / 90 , ( int ) VideoDeltaPTS / 90 , VideoGetBuffers (decoder -> Stream ),
3787
- decoder -> Interlaced ? (2 * atomic_read (& decoder -> SurfacesFilled ) - decoder -> SurfaceField )
3788
- : atomic_read (& decoder -> SurfacesFilled ));
3782
+ ( video_clock - audio_clock ) / 90 , AudioGetDelay ( ) / 90 , ( int ) VideoDeltaPTS / 90 ,
3783
+ VideoGetBuffers (decoder -> Stream ), decoder -> Interlaced ?
3784
+ (2 * atomic_read (& decoder -> SurfacesFilled ) - decoder -> SurfaceField ) :
3785
+ atomic_read (& decoder -> SurfacesFilled ));
3789
3786
if (!(decoder -> FramesDisplayed % (5 * 60 * 60 ))) {
3790
3787
VaapiPrintFrames (decoder );
3791
3788
}
0 commit comments