Shared contract
TRTC custom preprocess commonly uses OpenGL textures; Agora / LiveKit more often deliver
CVPixelBuffer. Do not mix both modes on one engine.
Shared: process texture
Shared: process CVPixelBuffer (NV12 sketch)
externalContext = NO for the pixel-buffer path. Credentials: Subscription, Auth & License. Bind process name in the Dashboard for CLI tools without a Bundle ID.
TRTC (Tencent)
Hook:setLocalVideoProcessDelegete:pixelFormat:bufferType: (official spelling Delegete). TRTCVideoPixelFormat_Texture_2D + TRTCVideoBufferType_Texture.
Agora
Hook:AgoraRtcEngineKit.setVideoFrameDelegate: (Video SDK 4.x). Captured frames on macOS are also typically CVPixelBuffer.
setVideoFrameDelegate:nil and nil beautyEngine before teardown.
LiveKit
Implement SwiftVideoProcessor, process CVPixelBuffer in process(frame:), and pass processor: when creating the camera track (supported on macOS as well).
BackgroundBlurVideoProcessor (macOS 12+) for an official sample. Screen-share tracks can use the same processor pattern (API per your LiveKit Swift version).

