Saving video from CMSampleBuffer while streaming using ReplayKit

前端 未结 3 974
挽巷
挽巷 2020-12-29 17:41

I\'m streaming a content of my app to my RTMP server and using RPBroadcastSampleHandler.

One of the methods is

override func processSampleBuffer(_ s         


        
3条回答
  •  清酒与你
    2020-12-29 18:14

    You can try this:

    override func broadcastFinished() {
        Log(#function)
        ...
        // Need to give the end CMTime, if not set, the video cannot be used
        videoWriter.endSession(atSourceTime: ...)
        videoWriter.finishWriting {
            // Callback cannot be executed here
        }
        ...
        // The program has been executed.
    }
    

提交回复
热议问题