tongyuelong
V2EX  ›  iOS

ios extension 获取到的 CMSampleBuffer,如何传给 main container?

  •  
  •   tongyuelong · Jul 30, 2021 · 2698 views
    This topic created in 1924 days ago, the information mentioned may be changed or developed.

    最近在学 flutter native 混合开发,调用 replaykit2 获取到 cmsamplebuffer 数据,想保存为 mp4,以供 flutter 可以读取 。

    ios 开发是最近两天在学,还很混乱。ios extension 和主 container 是不同的沙盒环境吗?怎么样才可以把 extension 中保存的文件共享到 main container ?

    还是说,把 cmsamplebuffer 传给 ios appdelegate.swift,在 appdelegate 里处理?

    求大家给个思路,不知道是不是姿势不对,翻了一天 google 了。

    4 replies  •  2021-07-30 17:20:13 +08:00
    finab
    finab
    Jul 30, 2021
    1
    关键词 App Groups
    tongyuelong
    tongyuelong
    OP
    Jul 30, 2021
    2
    @finab 谢谢,我有试过,但是似乎需要 将 cmsamplebuffer 转成 Data (swift) ?
    Building
    Building
    Jul 30, 2021 via iPhone
    3
    FileManager: containerURLForSecurityApplicationGroupIdentifier
    z1113456051
    z1113456051
    Jul 30, 2021
    4
    最简单做法肯定是视频合成好了,通过沙盒共享过去。但是子进程有内存限制。大视频还是要一帧一帧的发到主程序处理。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1359 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 18:50 · PVG 02:50 · LAX 10:50 · JFK 13:50
    ♥ Do have faith in what you're doing.