зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1731520 - libwebrtc: Cherry-pick commit 8ce2fc1448. r=ng
Upstream commit: https://webrtc.googlesource.com/src/+/8ce2fc1448fb4d92480059957cb6c0b76896b59e Add back lost RotationCamera tests Lost in https://webrtc.googlesource.com/src/+/c8a6fb2bb8762de17008dee97c5fb6e762f7e056 Bug: webrtc:8382 Change-Id: Ic9abd5d2b5d2593354e759c328b423ba272c8b9b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288700 Reviewed-by: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com> Cr-Commit-Position: refs/heads/main@{#38991} Differential Revision: https://phabricator.services.mozilla.com/D166585
This commit is contained in:
Родитель
105005d20b
Коммит
33bd5399b2
|
@ -210,6 +210,7 @@ CMSampleBufferRef createTestSampleBufferRef() {
|
|||
#endif
|
||||
}
|
||||
|
||||
// The XCTest framework considers functions that don't take arguments tests. This is a helper.
|
||||
- (void)testRotationCamera:(AVCaptureDevicePosition)camera
|
||||
withOrientation:(UIDeviceOrientation)deviceOrientation {
|
||||
#if TARGET_OS_IPHONE
|
||||
|
@ -264,6 +265,26 @@ CMSampleBufferRef createTestSampleBufferRef() {
|
|||
#endif
|
||||
}
|
||||
|
||||
- (void)testRotationCameraBackLandscapeLeft {
|
||||
[self testRotationCamera:AVCaptureDevicePositionBack
|
||||
withOrientation:UIDeviceOrientationLandscapeLeft];
|
||||
}
|
||||
|
||||
- (void)testRotationCameraFrontLandscapeLeft {
|
||||
[self testRotationCamera:AVCaptureDevicePositionFront
|
||||
withOrientation:UIDeviceOrientationLandscapeLeft];
|
||||
}
|
||||
|
||||
- (void)testRotationCameraBackLandscapeRight {
|
||||
[self testRotationCamera:AVCaptureDevicePositionBack
|
||||
withOrientation:UIDeviceOrientationLandscapeRight];
|
||||
}
|
||||
|
||||
- (void)testRotationCameraFrontLandscapeRight {
|
||||
[self testRotationCamera:AVCaptureDevicePositionFront
|
||||
withOrientation:UIDeviceOrientationLandscapeRight];
|
||||
}
|
||||
|
||||
- (void)setExif:(CMSampleBufferRef)sampleBuffer {
|
||||
rtc::ScopedCFTypeRef<CFMutableDictionaryRef> exif(CFDictionaryCreateMutable(
|
||||
kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
|
||||
|
|
Загрузка…
Ссылка в новой задаче