detailViewController
의 비디오를 530px 너비와 360px 높이로 캡처해야하는 내 ipad 응용 프로그램에 splitviewcontroller
을 사용하고 있습니다. 비디오 캡처에 UIImagePickerController
을 사용해 보았지만 비디오 캡처 인터페이스의 크기를 변경할 수 없습니다. 앱에서 전체 화면 비디오 캡처를 할 여유가 없습니다. UIImagePickerController
의 비디오 캡처 인터페이스 크기를 조정할 수 있습니까? 귀하의 답변에 많은 감사드립니다. 스크린 샷을 추가하지 않아서 죄송합니다. 내 명성이 그것을 허용하지 않습니다.크기 조정 UIImagePickerController 비디오 캡처 인터페이스
3
A
답변
2
내가 아는 한 UIImagePickerController를 사용하여 그렇게 할 수 없습니다. 그러나 AVCamCaptureManager 및 AVCamRecorder 클래스를 사용하면 쉽게 수행 할 수 있습니다. 애플은 개발자 사이트 here에 데모 프로그램을 구축했다. AVCam이라고합니다. 간단히 말하면 카메라를 열 때 클릭하면 iPhone의 카메라를 열고 비디오를 녹화하거나 오디오를 캡처하는 클래스와 메서드를 호출합니다. UIImagePickerController에 의해 호출되는 동일한 클래스를 호출합니다.
카메라의 피드를 표시하는 데모 코드에서 작은 UIView 개체를 찾을 수 있습니다. 원하는 크기에 따라보기의 크기를 조정할 수 있으며 카메라의 입력이 많은 영역에 표시됩니다. 카메라의 입력 피드 크기를 조정하고 사진을 캡처하고 싶을 때 저에게 효과적이었습니다. 나는 그것이 당신을 위해서도 잘되기를 바랍니다.
0
iPad에서 UIImagPickerController 비디오 캡처 인터페이스의 크기를 조정할 수있는 방법을 찾았습니다. 기본 개념은 UIOPopoerController의 차원을 사용하여 UIImagPickerController의 뷰 크기를 조정 한 다음이를 사용자 정의 뷰에 추가하는 것입니다.
//In the following code, videoRecorder is an UIImagPickerController
//1. Create a container view controller and load UIImagPickerController's view
UIViewController *containerController = [[UIViewController alloc] init];
containerController.contentSizeForViewInPopover = CGSizeMake(320, 240);
[containerController.view addSubview:videoRecorder.view];
//2. Add the container view controller in a UIPopoerController and present the popover outside the visible area on the screen (you can't see it but the popover was presented)
popoverView = [[UIPopoverController alloc] initWithContentViewController:containerController];
popoverView.passthroughViews = [NSArray arrayWithObjects:self.view, nil];
[popoverView setPopoverContentSize:CGSizeMake(320, 240)];
[popoverView presentPopoverFromRect:CGRectMake(0, -1024, 1, 1) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
//3. Reset the frame of UIImagPickerController's view to meet the frame of its container - this is important to resize the UIImagPickerController's view and must do this step after the popover was presented.
[videoRecorder.view setFrame:containerController.view.frame];
//4. Add the container view controller's view to your custom view - in this example, it is 'camView' with the size 320 x 240
[camView addSubview:containerController.view];
참고 :
자세한 코드 및 설명
은 아래에 나열되어 당신이 비디오 캡처를 완료하거나 취소 할 때, 당신은 팝 오버를 취소하고 사용자 정의보기에서 컨테이너의 뷰를 제거해야합니다. 그들이 요구 사항을 구축 ** 실행되지와 요구에 가장 높은 구성을 제공하고 있습니다[popoverView dismissPopoverAnimated:YES];
[[camView.subviews lastObject] removeFromSuperview];
관련 문제
- 1. iPhone UIImagePickerController 비디오 모드
- 2. iPad 비디오 크기 조정/형식
- 3. JMF를 사용하여 비디오 크기 조정
- 4. 비디오 모범 사례 크기 조정 (프레임 크기)
- 5. UIImagePickerController : 비디오에서 이미지 캡처 받기
- 6. iPhone에서 비디오 캡처
- 7. 크기가 조정 된 uiimagepickercontroller
- 8. jquery 자동 크기 조정 웹 인터페이스?
- 9. UIImagePickerController 이미지 크기
- 10. swf 비디오 포함 및 크기 조정
- 11. C#을 사용한 비디오 크기 조정
- 12. iPhone : 5 초 비디오 캡처
- 13. 창 캡처에서 비디오 캡처
- 14. Android + 화면 캡처 비디오 캡처
- 15. UIImagePickerController 비디오 압축 중 막히다
- 16. 샘플 비디오 캡처 코드 for iPhone4
- 17. 아이폰 4에서 비디오 캡처 코드가 작동하지 않습니다.
- 18. Java에서 이미지 크기 조정. 크기 조정 방법
- 19. vb.net에서 이미지 조작/크기 조정/크기 조정
- 20. 크기 조정 div 윈도우에서의 너비 크기 조정
- 21. 여러 비트 맵의 크기 조정/크기 조정
- 22. MacOS에서의 비디오 캡처
- 23. VPF의 비디오 캡처
- 24. WPF 앱에서 비디오 캡처
- 25. Objective C로 비디오 캡처
- 26. HTML 5의 비디오 캡처
- 27. 멀티 스레딩 캡처 비디오
- 28. 플래시 비디오 캡처
- 29. MacOS에서 비디오 캡처
- 30. 파이썬 비디오 캡처 루프
샘플 코드 : \t 엑스 코드 9.0, 아이폰 OS 11.0 SDK **. 고맙습니다. 비디오 프레임을 어떻게 조정했는지 솔루션 코드를 여기에 제공 할 수 있습니까? :) – vaibhav