Skip to content

Commit

Permalink
Enable kVTVideoEncoderSpecification_EnableLowLatencyRateControl
Browse files Browse the repository at this point in the history
Summary: title

Reviewed By: jamescoggan

Differential Revision: D33859892

fbshipit-source-id: e1a13fac63178df52681f52238bc71cb78aa237d
  • Loading branch information
Yerken Tussupbekov authored and facebook-github-bot committed Feb 14, 2022
1 parent 33147af commit b6a19c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions FBSimulatorControl/Framebuffer/FBSimulatorVideoStream.m
Expand Up @@ -206,6 +206,13 @@ - (BOOL)setupWithPixelBuffer:(CVPixelBufferRef)pixelBuffer error:(NSError **)err
NSDictionary<NSString *, id> * encoderSpecification = @{
(NSString *) kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder: @YES,
};

if (@available(macOS 12.1, *)) {
encoderSpecification = @{
(NSString *) kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder: @YES,
(NSString *) kVTVideoEncoderSpecification_EnableLowLatencyRateControl: @YES,
};
}
size_t sourceWidth = CVPixelBufferGetWidth(pixelBuffer);
size_t sourceHeight = CVPixelBufferGetHeight(pixelBuffer);
int32_t destinationWidth = (int32_t) sourceWidth;
Expand Down

0 comments on commit b6a19c6

Please sign in to comment.