diff options
-rw-r--r-- | SmartDeviceLink/private/SDLStreamingVideoLifecycleManager.m | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/SmartDeviceLink/private/SDLStreamingVideoLifecycleManager.m b/SmartDeviceLink/private/SDLStreamingVideoLifecycleManager.m index 7117f6799..107aaf5a2 100644 --- a/SmartDeviceLink/private/SDLStreamingVideoLifecycleManager.m +++ b/SmartDeviceLink/private/SDLStreamingVideoLifecycleManager.m @@ -419,10 +419,13 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N SDLLogD(@"Using generic video capabilites, preferred formats: %@, resolutions: %@, haptics disabled", weakSelf.preferredFormats, weakSelf.preferredResolutions); } - // Apply customEncoderSettings here. Note that value from HMI (such as maxBitrate) will be overwritten by custom settings. + // Apply customEncoderSettings here. Note that value from HMI (such as maxBitrate) will be overwritten by custom settings + // (Exception: ExpectedFrameRate, AverageBitRate) for (id key in self.customEncoderSettings.keyEnumerator) { - if ([(NSString *)key isEqualToString:(__bridge NSString *)kVTCompressionPropertyKey_ExpectedFrameRate]) { - // do NOT override framerate if custom setting is higher than current setting. + // do NOT override framerate or average bitreate if custom setting is higher than current setting. + // See SDL 0323 (https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0323-align-VideoStreamingParameter-with-capability.md) for details. + if ([(NSString *)key isEqualToString:(__bridge NSString *)kVTCompressionPropertyKey_ExpectedFrameRate] || + [(NSString *)key isEqualToString:(__bridge NSString *)kVTCompressionPropertyKey_AverageBitRate]) { if ([self.customEncoderSettings valueForKey:key] < self.videoEncoderSettings[key]) { self.videoEncoderSettings[key] = [self.customEncoderSettings valueForKey:key]; } |