summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-12-15 09:11:19 -0500
committerJoel Fischer <joeljfischer@gmail.com>2017-12-15 09:11:19 -0500
commitac40e4895111a17fb4140135018a23da5f36ee7e (patch)
tree42a0ba92a0ba3af47f93e59a70b39c7de79a4a1f
parent4f1eb156e5c9c5f446ccc36354958fbb763b3e78 (diff)
downloadsdl_ios-ac40e4895111a17fb4140135018a23da5f36ee7e.tar.gz
Add additional default h.264 encoder properties
* Add documentation about properties that can be tweaked
-rw-r--r--SmartDeviceLink/SDLH264VideoEncoder.m2
-rw-r--r--SmartDeviceLink/SDLStreamingMediaConfiguration.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLH264VideoEncoder.m b/SmartDeviceLink/SDLH264VideoEncoder.m
index 6a2b6a1c1..0feab023e 100644
--- a/SmartDeviceLink/SDLH264VideoEncoder.m
+++ b/SmartDeviceLink/SDLH264VideoEncoder.m
@@ -40,6 +40,8 @@ static NSDictionary<NSString *, id>* _defaultVideoEncoderSettings;
(__bridge NSString *)kVTCompressionPropertyKey_ProfileLevel: (__bridge NSString *)kVTProfileLevel_H264_Baseline_AutoLevel,
(__bridge NSString *)kVTCompressionPropertyKey_RealTime: @YES,
(__bridge NSString *)kVTCompressionPropertyKey_ExpectedFrameRate: @30,
+ (__bridge NSString *)kVTCompressionPropertyKey_AverageBitRate: @1000000,
+ (__bridge NSString *)kVTCompressionPropertyKey_DataRateLimits: @[@150000, @1, @130000, @5],
};
}
diff --git a/SmartDeviceLink/SDLStreamingMediaConfiguration.h b/SmartDeviceLink/SDLStreamingMediaConfiguration.h
index d664b681f..4f7d04cdf 100644
--- a/SmartDeviceLink/SDLStreamingMediaConfiguration.h
+++ b/SmartDeviceLink/SDLStreamingMediaConfiguration.h
@@ -30,6 +30,9 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Properties to use for applications that utilitze the video encoder for streaming. See VTCompressionProperties.h for more details. For example, you can set kVTCompressionPropertyKey_ExpectedFrameRate to set your framerate. Setting the framerate this way will also set the framerate if you use CarWindow automatic streaming.
+ * Properties to use for applications that utilize the video encoder for streaming. See VTCompressionProperties.h for more details. For example, you can set kVTCompressionPropertyKey_ExpectedFrameRate to set your framerate. Setting the framerate this way will also set the framerate if you use CarWindow automatic streaming.
+ *
+ * Other properties you may want to try adjusting include kVTCompressionPropertyKey_AverageBitRate and kVTCompressionPropertyKey_DataRateLimits.
*/
@property (copy, nonatomic, nullable) NSDictionary<NSString *, id> *customVideoEncoderSettings;