是否可以从iOS应用直接将视频帧渲染到AirPlay?

w51jfk4q  于 2023-07-01  发布在  iOS
关注(0)|答案(1)|浏览(86)

我有没有可能真实的生成CMSampleBuffers,并通过AirPlay将其传输到电视上。类似于我如何能够将这些帧直接渲染到iOS设备上的AVSampleBufferDisplayLayer
我知道我可以通过HTTP Live Streaming(HLS)协议使用AirPlay,但是,就像我提到的,在我的情况下,视频是在实际的iOS设备上生成的,因此,我想将其“真实的”流到AirPlay。
对于音频,似乎可以使用AVSampleBufferRenderSynchronizerAVSampleBufferAudioRenderer(如https://developer.apple.com/documentation/avfoundation/streaming_and_airplay/supporting_airplay_in_your_app中所述)。但是,找不到任何关于视频的信息。

vddsk6oq

vddsk6oq1#

我还没有测试过它,但我认为iOS17可能已经通过AVSampleBufferVideoRenderer添加了对此的支持。
文档非常稀疏,但它至少公开存在,请参阅:https://developer.apple.com/documentation/avfoundation/avsamplebuffervideorenderer

相关问题