我需要创建一个模拟器构建,以便将我的应用程序提交给Facebook团队,以便进一步查看我的开放图表.
他们有一条指令来创建这里的facebook指令
但我使用cocoapods,我无法进行此构建.每次它给我错误.
我是AVFoundation和解码过程的新手.我需要解码h264视频文件并在iphone中播放...任何人都可以给我指导.
我不想使用ffmpeg或任何第三方库来做到这一点.据我所知使用Avfoundation编码是可能的...这里是我认为用于编码但完全不确定的代码...
float bitsPerPixel;
CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions(currentFormatDescription);
int numPixels = dimensions.width * dimensions.height;
int bitsPerSecond;
// Assume that lower-than-SD resolutions are intended for streaming, and use a lower bitrate
if ( numPixels < (640 * 480) )
bitsPerPixel = 4.05; // This bitrate matches the quality produced by AVCaptureSessionPresetMedium or Low.
else
bitsPerPixel = 11.4; // This bitrate matches the quality produced by AVCaptureSessionPresetHigh.
bitsPerSecond = numPixels * bitsPerPixel;
NSDictionary *videoCompressionSettings = [NSDictionary dictionaryWithObjectsAndKeys:
AVVideoCodecH264, AVVideoCodecKey,
[NSNumber numberWithInteger:dimensions.width], AVVideoWidthKey, …
Run Code Online (Sandbox Code Playgroud) 我试图插入一些数据sqlite数据库...我确信插入查询是正确的,因为我从终端和sqlite管理器测试,但它没有从ios5插入...请帮助!
-(BOOL)insertWithRawQuery:(NSString*) query
{
sqlite3_stmt *statement;
BOOL success = NO;
if (sqlite3_open([databaseFilePath UTF8String], &database) == SQLITE_OK)
{
NSLog(@"%@",query);
const char *insert_stmt = [query UTF8String];
sqlite3_prepare_v2(database, insert_stmt, -1, &statement, NULL);
if (sqlite3_step(statement) == SQLITE_DONE)
{
success=YES;
} else
{
success=NO;
NSLog(@"%d",sqlite3_step(statement));
}
sqlite3_finalize(statement);
}
sqlite3_close(database);
return success;
}
NSLog(@"%d",sqlite3_step(statement))
Run Code Online (Sandbox Code Playgroud)
打印21这是SQLITE_MISUSE ..你有什么想法吗?