Permalink
Browse files

vdpau: add log message for long decoding times

  • Loading branch information...
1 parent 536e1f0 commit c49f0721932cb4e4534903ee74bd4e9ac983583c @FernetMenta committed Mar 24, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
@@ -881,12 +881,17 @@ void CDecoder::FFDrawSlice(struct AVCodecContext *s,
return;
}
+ uint64_t startTime = CurrentHostCounter();
vdp_st = vdp->m_vdpauConfig.vdpProcs.vdp_decoder_render(vdp->m_vdpauConfig.vdpDecoder,
render->surface,
(VdpPictureInfo const *)&(render->info),
render->bitstream_buffers_used,
render->bitstream_buffers);
vdp->CheckStatus(vdp_st, __LINE__);
+ uint64_t diff = CurrentHostCounter() - startTime;
+ if (diff*1000/CurrentHostFrequency() > 30)
+ CLog::Log(LOGWARNING,"CVDPAU::DrawSlice - VdpDecoderRender long decoding: %d ms", (int)((diff*1000)/CurrentHostFrequency()));
+
}

0 comments on commit c49f072

Please sign in to comment.