gpt4 book ai didi

ios - VLCMobileKit iOS 在 iPhone 4 屏幕锁定时崩溃

转载 作者:行者123 更新时间:2023-11-29 03:12:05 25 4
gpt4 key购买 nike

我在 iOS 版 MobileVLCKit 中遇到一个奇怪的问题。我正在我的应用程序中播放 RTSP 链接。我已在我的应用程序中将在后台播放音频和视频的标志设置为 true。因此,当应用程序进入后台时,我的 VLC 播放器中播放的视频将继续播放,没有任何问题。但在 iPhone 4(iOS 7.0.4)上,当我在播放视频时锁定 iPhone 屏幕时,应用程序崩溃且不显示任何日志。奇怪的是,如果我通过按主页按钮在后台发送应用程序,那么应用程序不会崩溃。该问题仅出现在 iPhone 4 上,iPhone 5 上没有。有人遇到过这样的问题吗?

下面是设备崩溃日志:

May 27 03:18:41 My-iPhone-VI kernel[0] <Debug>: 019323.846533 wlan.A[400] AppleBCMWLANNetManager::updateLinkQualityMetrics(): Report LQM to User Land 100, fAverageRSSI -69
May 27 03:18:41 My-iPhone-VI kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 0 (set level to 0x1c8)
May 27 03:18:41 My-iPhone-VI kernel[0] <Debug>: AppleMultitouchN1SPI: updating power statistics
May 27 03:18:41 My-iPhone-VI kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 0
May 27 03:18:41 My-iPhone-VI backboardd[28] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
May 27 03:18:41 My-iPhone-VI SpringBoard[34] <Warning>: [MPUNowPlayingController] Not registered for now playing notifications. Ignoring call to -unregisterForNotifications.
May 27 03:18:41 My-iPhone-VI backboardd[28] <Notice>: MultitouchHID: detection mode: 0->255
May 27 03:18:41 My-iPhone-VI MyApp[817] <Warning>: log: applicationWillResignActive
May 27 03:18:41 My-iPhone-VI MyApp[817] <Warning>: log: applicationDidEnterBackground
May 27 03:18:42 My-iPhone-VI profiled[818] <Notice>: (Note ) profiled: Service starting...
May 27 03:18:42 My-iPhone-VI ReportCrash[819] <Notice>: ReportCrash acting against PID 817
May 27 03:18:43 My-iPhone-VI ReportCrash[819] <Notice>: Formulating crash report for process MyApp[817]
May 27 03:18:43 My-iPhone-VI com.apple.launchd[1] (UIKitApplication:com.My.MyApp[0x19d8][817]) <Warning>: (UIKitApplication:com.My.MyApp[0x19d8]) Job appears to have crashed: Segmentation fault: 11
May 27 03:18:43 My-iPhone-VI backboardd[28] <Warning>: Application 'UIKitApplication:com.My.MyApp[0x19d8]' exited abnormally with signal 11: Segmentation fault: 11
May 27 03:18:43 My-iPhone-VI mediaserverd[46] <Warning>: Encountered an XPC error while communicating with backboardd: <error: 0x3cd9f744> { count = 1, contents =
"XPCErrorDescription" => <string: 0x3cd9f9dc> { length = 22, contents = "Connection interrupted" }
}
May 27 03:18:43 My-iPhone-VI ReportCrash[819] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MyApp_2014-05-27-031842_My-iPhone-VI.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
May 27 03:18:53 My-iPhone-VI profiled[818] <Notice>: (Note ) profiled: Service stopping.

下面是方法 didEnterBackground: 中获取的堆栈跟踪

 Stack trace : (
0 MyApp 0x0010a191 -[MyAppAppDelegate applicationDidEnterBackground:] + 76
1 UIKit 0x2fc85543 <redacted> + 590
2 UIKit 0x2fc06ae1 <redacted> + 764
3 UIKit 0x2fc06721 <redacted> + 72
4 UIKit 0x2fc6bb3d <redacted> + 664
5 GraphicsServices 0x320a270d <redacted> + 608
6 GraphicsServices 0x320a22f7 <redacted> + 34
7 CoreFoundation 0x2d4599df <redacted> + 34
8 CoreFoundation 0x2d45997b <redacted> + 346
9 CoreFoundation 0x2d45814f <redacted> + 1398
10 CoreFoundation 0x2d3c2c27 CFRunLoopRunSpecific + 522
11 CoreFoundation 0x2d3c2a0b CFRunLoopRunInMode + 106
12 GraphicsServices 0x320a1283 GSEventRunModal + 138
13 UIKit 0x2fc66049 UIApplicationMain + 1136
14 MyApp 0x001078e9 main + 116
15 libdyld.dylib 0x37d26ab7 <redacted> + 2
)

最佳答案

您需要在进入后台状态之前禁用视频解码。否则,MobileVLCKit 将尝试在后台绘制 OpenGL 内容,这将被操作系统通过终止应用程序来阻止。

您可以通过将媒体播放器实例上的当前视频轨道设置为 -1 来禁用视频解码。一旦您的应用程序再次移至前台,请将其切换回当前解码的视频轨道(因此,如果您的流包含多个视频轨道,则应缓存它)。禁用视频解码时,音频解码不受影响并且会继续正常进行。这种方法还有节省 CPU 负载和电池的好处。;)

这也是适用于 iOS 的 VLC 的工作方式。 :)

关于ios - VLCMobileKit iOS 在 iPhone 4 屏幕锁定时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22147221/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com