- RevueSDK
- FrameEncryptCallback
Type Alias
FrameEncryptCallback
加密單幀 callback。回 0=成功;非 0=失敗(drop 該幀 + 發 FrameCryptoError 事件)。
typealias FrameEncryptCallback = @convention(c) (UInt32, UInt32, UnsafePointer<UInt8>?, Int, UnsafeMutablePointer<UInt8>?, Int, UnsafeMutablePointer<Int>?, UnsafeMutablePointer<UInt64>?, UnsafeMutableRawPointer?) -> Int32Discussion
參數:(mediaType, ssrc, plaintext, plaintextSize, ciphertext, ciphertextCapacity, outCiphertextSize, outCounter, userData)。
寫密文到
ciphertext[0..<ciphertextCapacity)、設outCiphertextSize(須 ≤ capacity)。設
outCounter為此幀 counter(SDK 序列化到 wire,decrypt 端原樣收到)。