草庐IT

c++ - ffmpeg Bmp 到 yuv : Crash at sws_scale

上下文:我有一系列连续的位图,我想将它们编码成一种轻型视频格式。我使用ffmpeg版本2.8.3(内部版本here),在qt5、qtIDE和msvc2013适用于win32。问题:我的代码在sws_scale()处崩溃(有时在avcodec_encode_video2()处)。当我探索堆栈时,崩溃事件发生在sws_getCachedContext()。(我只能看到这些ffmpeg构建的堆栈)。我只使用这些ffmpeg库(来自Qt.pro文件):LIBS+=-lavcodec-lavformat-lswscale-lavutilswscale是哪个bug。这是代码:voidnewVide

c++ - 警告 C4673 : throwing 'ex::traced_error<EX>' the following types will not be considered at the catch site

MSVC10和MSVC9在编译我的异常框架时都生成了4级警告消息,尽管程序的行为似乎是正确的。异常框架相当庞大和复杂,但我已经设法将其归结为它的本质。这是一个完整的程序,您可以在VS10中编译和运行#include#include#include#include#includeusingnamespacestd;namespaceex{classgeneric_error:virtualpublicstd::exception{public:generic_error(intthread_id):thread_id_(thread_id){}constchar*what()constt

ios - 核心数据 : annotation: Failed to load optimized model at path 'Users/~/GoogleMaps.bundle/GMSCacheStorage.momd/StorageWithTileProto.omo'

在我的iOS应用程序中打开加载mapView时出现错误。mapView加载正常并出现在屏幕上,但是它没有加载到我初始化mapView时设置的位置。这是我用来实现mapView的代码:@IBOUTLETweakvarmapView:UIView!overrideviewDidLoad(){letcamera=GMSCameraPosition.camera(withLatitude:lat!,longitude:long!,zoom:10)mapView=GMSMapView.map(withFrame:mapView.frame,camera:camera)}每当应用程序用mapVie

ios - 尝试隐藏键盘时出现 "unrecognized selector sent to instance"

我在UITableView的单元格上有一个文本字段。在UITableViewControoler中,我将其设置为文本字段的委托(delegate),我使用以下方法隐藏键盘-(BOOL)textFieldShouldReturn:(UITextField*)theTextField{if(theTextField==self.nameTextField){[theTextFieldresignFirstResponder];}returnYES;}我可以看到此方法被调用,但当它到达resignFirstResponder时崩溃,并出现错误“无法识别的选择器发送到实例”。我不知道为什么?

ios - 触摸 UITextField 时出现 "message sent to deallocated instance"崩溃

我有一个UIViewController的实现,其中viewDidLoad的代码如下:-(void)viewDidLoad{[superviewDidLoad];//Doanyadditionalsetupafterloadingtheviewfromitsnib.for(inti=0;i0)[selfgetTextField:i].text=speedDial;[selfgetTextField:i].returnKeyType=UIReturnKeyDone;[selfgetTextField:i].delegate=self;}}当我触摸屏幕上的UITextField时,应用程序

ios - "Unable to download App... could not be installed at this time"- adobe phonegap build ios

我正在使用phonegap和adobephonegapbuild构建一个HTML5应用程序。我已经完成了我认为在我的设备上测试我的应用程序所必需的所有步骤,但我在从电话差距网站安装时仍然遇到错误:"UnabletodownloadApp{app_name}couldnotbeinstalledatthistime".我已通过以下列表将此应用程序上传到phonegap:按照说明创建了CSR文件hereCreatedaniOSdevelopercertificate使用CSR文件通过添加我的iPad的UUID将设备添加到我的开发者资料中ontheappledeveloperwebsite在

iOS 10 [CFString 发布] : message sent to deallocated instance

最近,我将我的iPhone升级到iOS10。我在iPhone上安装了我的应用程序后,我发现当我在我的应用程序中点击一个tableView时,它肯定会崩溃。我在方法cellForRowAtIndexPath中做了一些断点,并在Diagnostics表中选择了ZombieObjects。但是消息[CFStringrelease]:messagesenttodeallocatedinstance0x17063b960总是出现在Debug区。此问题仅出现在iOS10Beta上,我不确定是否是iOS10Beta引起的问题。有没有人像我一样遇到这个问题?我将不胜感激。更新:当它返回cell时,崩溃

ios - Q :Get rows count by indexPath of tableView comes `Trying to put the stack in unreadable memory at:` error

在我的tableView委托(delegate)方法中:我在tableViewdelegate方法中得到了numberOfRows和numberOfSections:-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath和-(CGFloat)tableView:(UITableView*)tableViewheightForRowAtIndexPath:(NSIndexPath*)indexPath,但是在-(NSInteger)tableView

iphone - ios setHidden :NO at begin of a long method does not show on display

我有一个方法,它从Web服务加载数据。在该方法的开始,我想显示一个UIActivityIndi​​cator。但是只把hidden改成NO并不会重绘UIView。所以UIActivityIndi​​cator在长时间加载数据后可见,这肯定是迟到了。那么我如何告诉UIView在数据加载开始之前重绘activityIndi​​cator?-(IBAction)loadData{[activitysetHidden:NO];//heretheactivtyIndicatorshouldappear...loadlongdataFromNet..[activitysetHidden:YES];

ios - AVFileCapture 输出 : Not recording at 240 fps

我似乎遇到了一个问题,我将相机设置为以240FPS的速度录制,但由于某种原因输出文件只有30FPS。这是我设置相机的代码(首先实例化):classHFRCamera{public:HFRCamera();AVCaptureDeviceInput*camera;AVCaptureDeviceInput*microphone;AVCaptureDevice*videoCam;AVCaptureDevice*audioInput;AVCaptureSession*capSession;voidstart();voidconfig();voidstop();};HFRCamera::HFRCa