diff options
author | Memphiz <memphis@machzwo.de> | 2014-11-12 13:36:21 +0100 |
---|---|---|
committer | fritsch <Peter.Fruehberger@gmail.com> | 2014-11-16 17:45:29 +0100 |
commit | 52ffc3f187a6288c71dc460257969fad94c1ab6b (patch) | |
tree | 540bda3ee7ecf31431aa338447b6f504a8d0becd | |
parent | 7859022843ada34f84b4c6b6d7a1f1f44c452030 (diff) |
[vtb/vda] - use component debug logging
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp | 4 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp | 24 |
2 files changed, 19 insertions, 9 deletions
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp index 6db3ed4f41..14d9e913ca 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp @@ -39,6 +39,7 @@ extern "C" { #include "utils/StringUtils.h" #include "utils/TimeUtils.h" #include "settings/Settings.h" +#include "settings/AdvancedSettings.h" #include <CoreFoundation/CoreFoundation.h> #include <VideoDecodeAcceleration/VDADecoder.h> @@ -609,7 +610,8 @@ void CDVDVideoCodecVDA::VDADecoderCallback( } if (kVDADecodeInfo_FrameDropped & infoFlags) { - CLog::Log(LOGDEBUG, "%s - frame dropped", __FUNCTION__); + if (g_advancedSettings.CanLogComponent(LOGVIDEO)) + CLog::Log(LOGDEBUG, "%s - frame dropped", __FUNCTION__); return; } diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp index 60f70f906d..67ae61b5e4 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp @@ -28,6 +28,7 @@ #include "DVDCodecUtils.h" #include "DVDVideoCodecVideoToolBox.h" #include "settings/Settings.h" +#include "settings/AdvancedSettings.h" #include "utils/log.h" #include "utils/TimeUtils.h" #include "osx/DarwinUtils.h" @@ -196,7 +197,8 @@ vtdec_session_dump_property(CFStringRef prop_name, CFDictionaryRef prop_attrs, V char *attrs_str; attrs_str = vtutil_object_to_string(prop_attrs); - CLog::Log(LOGDEBUG, "%s = %s\n", name_str, attrs_str); + if (g_advancedSettings.CanLogComponent(LOGVIDEO)) + CLog::Log(LOGDEBUG, "%s = %s\n", name_str, attrs_str); free(attrs_str); } @@ -206,7 +208,8 @@ vtdec_session_dump_property(CFStringRef prop_name, CFDictionaryRef prop_attrs, V char *value_str; value_str = vtutil_object_to_string(prop_value); - CLog::Log(LOGDEBUG, "%s = %s\n", name_str, value_str); + if (g_advancedSettings.CanLogComponent(LOGVIDEO)) + CLog::Log(LOGDEBUG, "%s = %s\n", name_str, value_str); free(value_str); if (prop_value != NULL) @@ -214,7 +217,8 @@ vtdec_session_dump_property(CFStringRef prop_name, CFDictionaryRef prop_attrs, V } else { - CLog::Log(LOGDEBUG, "%s = <failed to query: %d>\n", name_str, (int)status); + if (g_advancedSettings.CanLogComponent(LOGVIDEO)) + CLog::Log(LOGDEBUG, "%s = <failed to query: %d>\n", name_str, (int)status); } free(name_str); @@ -235,7 +239,8 @@ void vtdec_session_dump_properties(VTDecompressionSessionRef session) return; error: - CLog::Log(LOGDEBUG, "failed to dump properties\n"); + if (g_advancedSettings.CanLogComponent(LOGVIDEO)) + CLog::Log(LOGDEBUG, "failed to dump properties\n"); } #endif //----------------------------------------------------------------------------------- @@ -342,7 +347,8 @@ CreateFormatDescriptionFromCodecData(VTFormatId format_id, int width, int height if (CDarwinUtils::GetIOSVersion() < 4.3) { - CLog::Log(LOGDEBUG, "%s - GetIOSVersion says < 4.3", __FUNCTION__); + if (g_advancedSettings.CanLogComponent(LOGVIDEO)) + CLog::Log(LOGDEBUG, "%s - GetIOSVersion says < 4.3", __FUNCTION__); status = FigVideoHack.FigVideoFormatDescriptionCreateWithSampleDescriptionExtensionAtom1( NULL, format_id, @@ -355,7 +361,8 @@ CreateFormatDescriptionFromCodecData(VTFormatId format_id, int width, int height } else { - CLog::Log(LOGDEBUG, "%s - GetIOSVersion says >= 4.3", __FUNCTION__); + if (g_advancedSettings.CanLogComponent(LOGVIDEO)) + CLog::Log(LOGDEBUG, "%s - GetIOSVersion says >= 4.3", __FUNCTION__); status = FigVideoHack.FigVideoFormatDescriptionCreateWithSampleDescriptionExtensionAtom2( NULL, format_id, @@ -1459,7 +1466,7 @@ bool CDVDVideoCodecVideoToolBox::GetPicture(DVDVideoPicture* pDvdVideoPicture) DisplayQueuePop(); static double old_pts; - if (pDvdVideoPicture->pts < old_pts) + if (g_advancedSettings.CanLogComponent(LOGVIDEO) && pDvdVideoPicture->pts < old_pts) CLog::Log(LOGDEBUG, "%s - VTBDecoderDecode dts(%f), pts(%f), old_pts(%f)", __FUNCTION__, pDvdVideoPicture->dts, pDvdVideoPicture->pts, old_pts); old_pts = pDvdVideoPicture->pts; @@ -1624,7 +1631,8 @@ CDVDVideoCodecVideoToolBox::VTDecoderCallback( } if (kVTDecodeInfo_FrameDropped & infoFlags) { - CLog::Log(LOGDEBUG, "%s - frame dropped", __FUNCTION__); + if (g_advancedSettings.CanLogComponent(LOGVIDEO)) + CLog::Log(LOGDEBUG, "%s - frame dropped", __FUNCTION__); return; } |