V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
elone
V2EX  ›  iOS

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

  •  
  •   elone · Jul 30, 2021 · 2225 views
    This topic created in 1737 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
        1
    finab  
       Jul 30, 2021
    关键词 App Groups
    elone
        2
    elone  
    OP
       Jul 30, 2021
    @finab 谢谢,我有试过,但是似乎需要 将 cmsamplebuffer 转成 Data (swift) ?
    Building
        3
    Building  
       Jul 30, 2021 via iPhone
    FileManager: containerURLForSecurityApplicationGroupIdentifier
    z1113456051
        4
    z1113456051  
       Jul 30, 2021
    最简单做法肯定是视频合成好了,通过沙盒共享过去。但是子进程有内存限制。大视频还是要一帧一帧的发到主程序处理。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2337 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 05:17 · PVG 13:17 · LAX 22:17 · JFK 01:17
    ♥ Do have faith in what you're doing.