diff options
author | Johns <johns98@gmx.net> | 2012-07-02 17:05:36 +0200 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-07-02 17:05:36 +0200 |
commit | 696bb8e934bc8bd9c73df4f954d74e926dbeeadb (patch) | |
tree | 35d340f22d74958fd6108efa9837ccf14db11ca6 /video.c | |
parent | 3bb7782d404a09b66afd712bb562c6a3833bebf8 (diff) | |
download | vdr-plugin-softhddevice-696bb8e934bc8bd9c73df4f954d74e926dbeeadb.tar.gz vdr-plugin-softhddevice-696bb8e934bc8bd9c73df4f954d74e926dbeeadb.tar.bz2 |
Display frame statistics in plugin menu.
Diffstat (limited to 'video.c')
-rw-r--r-- | video.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -9642,6 +9642,37 @@ uint8_t *VideoGrabService(int *size, int *width, int *height) return NULL; } +/// +/// Get decoder statistics. +/// +/// @param hw_decoder video hardware decoder +/// @param[out] missed missed frames +/// @param[out] duped duped frames +/// @param[out] dropped dropped frames +/// @param[out] count number of decoded frames +/// +void VideoGetStats(VideoHwDecoder * hw_decoder, int *missed, int *duped, + int *dropped, int *counter) +{ + // FIXME: test to check if working, than make module function +#ifdef USE_VDPAU + if (VideoUsedModule == &VdpauModule) { + *missed = hw_decoder->Vdpau.FramesMissed; + *duped = hw_decoder->Vdpau.FramesDuped; + *dropped = hw_decoder->Vdpau.FramesDropped; + *counter = hw_decoder->Vdpau.FrameCounter; + } +#endif +#ifdef USE_VAPI + if (VideoUsedModule == &VaapiModule) { + *missed = hw_decoder->Vaapi.FramesMissed; + *duped = hw_decoder->Vaapi.FramesDuped; + *dropped = hw_decoder->Vaapi.FramesDropped; + *counter = hw_decoder->Vaapi.FrameCounter; + } +#endif +} + #ifdef USE_SCREENSAVER //---------------------------------------------------------------------------- |