Log video toolbox error codes

Log OSStatus returned by VideoToolbox to simplify debugging.

Bug: webrtc:9134
Change-Id: Ib9e4f208a823d4be58324dd1f9dde833cba8afbe
Reviewed-on: https://webrtc-review.googlesource.com/69080
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22823}
This commit is contained in:
Yura Yaroshevich
2018-04-10 19:43:20 +03:00
committed by Commit Bot
parent 6557d0c231
commit 27af5db5e0
2 changed files with 3 additions and 2 deletions

View File

@ -242,6 +242,7 @@ void decompressionOutputCallback(void *decoderRef,
nullptr, _videoFormat, nullptr, attributes, &record, &_decompressionSession);
CFRelease(attributes);
if (status != noErr) {
RTC_LOG(LS_ERROR) << "Failed to create decompression session: " << status;
[self destroyDecompressionSession];
return WEBRTC_VIDEO_CODEC_ERROR;
}

View File

@ -678,7 +678,7 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) {
CFRelease(dataRateLimits);
}
if (status != noErr) {
RTC_LOG(LS_ERROR) << "Failed to set data rate limit";
RTC_LOG(LS_ERROR) << "Failed to set data rate limit with code: " << status;
}
_encoderBitrateBps = bitrateBps;
@ -695,7 +695,7 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) {
timestamp:(uint32_t)timestamp
rotation:(RTCVideoRotation)rotation {
if (status != noErr) {
RTC_LOG(LS_ERROR) << "H264 encode failed.";
RTC_LOG(LS_ERROR) << "H264 encode failed with code: " << status;
return;
}
if (infoFlags & kVTEncodeInfo_FrameDropped) {