草庐IT

access-control

全部标签

opencv拉流出现missing picture in access unit with size 4错误解决

0、应用场景问题我们使用opencv作为拉流客户端,获取画面后进行图像处理并推流(使用ffmpeg库)。opencv解码同样使用ffmpeg库。我们要求opencv能根据业务不断进行拉流操作,等效的逻辑代码如下:while(1){printf("startopenrtmp\n");cv::VideoCapturecap; if(!cap.open("rtmp://192.168.3.100:1935/live/1581F5FHB228R00200S3",cv::CAP_FFMPEG))////无流时会有20-30s超时时间{printf("reopenrtmp\n");continue;}//

iPhone SDK : Pushed view controller does not appear

我想为我的UITableView中的其中一个单元格添加详细View。我创建了一个新的ViewControllerSyncDetailViewController)和一个用于详细View的NIB。新类(class)没有太多变化。刚刚为它添加了一个标签和socket,并将nib连接到ViewController。现在我已经将此代码添加到我的ViewController(带有UITableView的那个,而不是新的那个)-(void)tableView:(UITableView*)tableViewdidSelectRowAtIndexPath:(NSIndexPath*)indexPath

ios - 查看 Controller /内存管理

我对ViewController中的内存管理有点困惑。假设我有这样的头文件:@interfaceMyController:UIViewController{NSMutableArray*data;}@property(nonatomic,retain)NSMutableArray*data;@end.m文件看起来像这样:@implementationMyController@synthesizedata;-(void)dealloc{[self.datarelease];[superdealloc];}-(void)viewDidLoad{[superviewDidLoad];if(s

iphone - iOS 从 View Controller 访问 View 的变量

我在iOS上进行开发,并以编程方式构建我的View。我注意到,当我尝试从ViewController访问必须在我的View中更改的变量时,它们为空。我将发布View及其ViewController:RootViewController.h#import@classRootView;@interfaceRootViewController:UIViewController{RootView*rootView;}@property(nonatomic,retain)RootView*rootView;@endRootViewController.m#import"RootViewContr

iphone - iOS4如何重启 View Controller

我想重启一个ViewController。我所做的是将当前ViewController从导航堆栈中弹出,并将ViewController的新实例推送到堆栈中。但是,这不起作用。当前ViewController从导航堆栈中弹出,但新实例未被压入堆栈。这是我的代码片段:[[selfnavigationController]popViewControllerAnimated:YES];VideoPlayerViewController*videoPlayer=[[VideoPlayerViewControlleralloc]init];[videoPlayersetMedia:media];

iphone - 如何在不使用导航 Controller 的情况下创建基于多 View 的应用程序?

我对iPhone操作系统的编程比较陌生,但了解基础知识和其他一些知识。我想知道的是,我如何编写一个应用程序,它的行为就像有一个导航Controller,只是没有它附带的导航Controller栏? 最佳答案 试试UITabBarController:UITabBarControllerClassReference. 关于iphone-如何在不使用导航Controller的情况下创建基于多View的应用程序?,我们在StackOverflow上找到一个类似的问题:

iphone - EXC_BAD_ACCESS -iPhone objective-c

我一直在尝试这个Twitterapi的东西,它真的很令人困惑......使用以下代码时,我一直收到EXC_BAD_ACCESS错误访问...这里有什么问题?NSURL*followingURL=[NSURLURLWithString:@"https://api.twitter.com/1/users/lookup.json"];//Passintheparameters(basically'.ids.json?screen_name=[screen_name]')idfromIntToNum=[NSNumbernumberWithInteger:friID];NSDictionary*

iphone - 从 View Controller 中删除顶部栏

我有一个ViewController,我想有一个顶部栏,另一个我没有。它们都在同一个导航Controller中。如何让第一个ViewController没有顶部栏,而第二个ViewController有顶部栏?编辑:如果我使用[self.navigationControllersetNavigationBarHidden:YES];那么在下一个屏幕完成飞入之前,顶部栏曾经所在的位置将出现一个黑框。我该如何避免这种情况? 最佳答案 在你的第一个ViewController中使用这个属性:[self.navigationControll

objective-c - 在 View Controller 之间传递应用上下文

与使用全局状态相比,我看到了在ViewController之间传递依赖关系(注入(inject))的好处。不过,我很好奇人们是如何在实践中实现这一点的。在最简单的情况下,很容易在两个ViewController之间传递单个模型:MyViewController*vc=[[MyViewControlleralloc]init];vc.model=model;[self.navigationControllerpushViewController:vcanimated:YES];然而,我发现扩展这种方法有两个问题:1)您可能有一些所有ViewController都需要的服务(位置管理器、对

iphone - 内存警告后的 EXC_BAD_ACCESS

在收到内存警告后,我的应用程序出现了EXC_BAD_ACCESS问题。这就是我正在测试的方式:我写了一个简单的应用程序,只分配内存但不释放它。在我分配了大量内存后,只剩下大约14MB的可用内存,我切换到我的主应用程序。我立即在didReceiveMemoryWarning中收到内存警告。片刻之后,我的应用程序在一个在UIButton中设置图像的函数中崩溃:-(void)activateRecordButton{UIImage*image=[UIImageimageNamed:@"audioRecordOn"];[recButtonsetImage:imageforState:UICon