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}
diff --git a/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm b/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
index 792dad5..39620d2 100644
--- a/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
+++ b/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
@@ -678,7 +678,7 @@
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 @@
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) {