gpt4 book ai didi

objective-c - OS X 上的 AVPlayer 错误

转载 作者:搜寻专家 更新时间:2023-10-30 19:49:03 24 4
gpt4 key购买 nike

我正在开发一个 mac 应用程序,它应该在按下按钮时在新窗口中播放来自 url 的视频。要创建 AVPlayer,我有:

AVURLAsset *urlAsset = [AVURLAsset assetWithURL:url];
AVPlayerItem *playeritem = [AVPlayerItem playerItemWithAsset:urlAsset];
_vidPlayer.player = [AVPlayer playerWithPlayerItem:playeritem];

其中 url 是指向 m4v 视频文件的 http NSURL,_vidPlayer 是 AVPlayerView。视频播放器出现了,但播放按钮仍然是灰色的,我得到了一整面我不明白的日志输出,见下文。任何建议将不胜感激。

[22:12:42.904] FigAtomStreamInitWithByteStreamWithSize signalled err=-12893 (kFigAtomStream_OffsetOutsideOfParent) (Offset exceeds stream length) at /SourceCache/CoreMedia_frameworks/CoreMedia-1562.235/Sources/Utilities/FigAtomStream.c line 305
[22:12:42.967] FigLimitedDiskCacheProvider_CopyProperty signalled err=-12784 (kFigBaseObjectError_PropertyNotFound) (no such property) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FigByteStreamPrototypes/FigLimitedDiskCacheProvider.c line 947
[22:12:43.146] itemasync_SetProperty signalled err=-12785 (kFigBaseObjectError_Invalidated) (invalidated) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/Player/FigPlayer_Async.c line 2293
[22:12:43.146] itemasync_SetProperty signalled err=-12785 (kFigBaseObjectError_Invalidated) (invalidated) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/Player/FigPlayer_Async.c line 2293
[22:12:43.146] itemasync_SetProperty signalled err=-12785 (kFigBaseObjectError_Invalidated) (invalidated) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/Player/FigPlayer_Async.c line 2293
[22:12:43.146] itemasync_SetProperty signalled err=-12785 (kFigBaseObjectError_Invalidated) (invalidated) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/Player/FigPlayer_Async.c line 2293
[22:12:43.146] itemasync_SetProperty signalled err=-12785 (kFigBaseObjectError_Invalidated) (invalidated) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/Player/FigPlayer_Async.c line 2293
[22:12:43.146] itemasync_CopyProperty signalled err=-12785 (kFigBaseObjectError_Invalidated) (invalidated) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/Player/FigPlayer_Async.c line 2088
[22:12:43.146] (Fig) signalled err=-12871
<<< FFR_Movie >>> ParseTrackAtom: Omitting a track that encountered error -12871 during atom parsing

谢谢。

最佳答案

我在 iOS 的 swift 编码中遇到了类似的问题,我发现这个网站非常有用:http://www.rockhoppertech.com/blog/swift-avfoundation/#audiofile

不确定您是否知道如何将 swift 转换为 objective c(我当然不知道,我是新手),但她可能在此站点上为您准备了一些其他文章。希望我能提供更多帮助,但希望此链接能找到您的答案。 Buenas suerta!

关于objective-c - OS X 上的 AVPlayer 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29664349/

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