我的应用程序(iPad; iOS 6)是一个仅限风景的应用程序,但是当我尝试使用UIPopoverController来显示照片库时,它会抛出此错误:
Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES.我尝试更改了很多代码,但我没有运气.
我正在尝试录制视频(不显示相机)并保存.但正在保存的视频无法以正确的方向保存.我已经尝试强制UIViewController成为一个特定的方向,但这没有帮助.所有视频都以纵向录制.我的代码如下:
session = [[AVCaptureSession alloc] init];
[session beginConfiguration];
session.sessionPreset = AVCaptureSessionPresetHigh;
AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
for (AVCaptureDevice *cam in [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo])
{
if (cam.position == AVCaptureDevicePositionFront)
device = cam;
}
NSError *error = nil;
AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&error];
if (!input) {
// Handle the error appropriately.
NSLog(@"ERROR: trying to open camera: %@", error);
}
AVCaptureDevice *audioDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
AVCaptureDeviceInput * audioInput = [AVCaptureDeviceInput deviceInputWithDevice:audioDevice error:nil];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [paths objectAtIndex:0]; …Run Code Online (Sandbox Code Playgroud) 我试过阅读很多教程.我在google上花了好几个小时,而stackoverflow尝试回答.到目前为止,我已经读过:尝试使用armv6和arv7体系结构 在iphone/ipad项目和https://github.com/lajos/iFrameExtractor中集成一些用于iPhoneOS平台的FFMPEG库.
我正在尝试为iOS 7/Xcode 5兼容性构建此库,但它无法正常工作.我得到的一个常见错误是:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
yasm/nasm not found or too old. Use --disable-yasm for a crippled build.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Run Code Online (Sandbox Code Playgroud)
一旦完成,我还会得到更多.如:
rm: illegal …Run Code Online (Sandbox Code Playgroud)