registerRemoteEncodedVideoFrameObserver method
@detail api
@hiddensdk(audiosdk)
@author wangzhanqiang
@brief Video data callback after registering remote encoding.
After registration, when the SDK detects a remote encoded video frame, it will trigger the onRemoteEncodedVideoFrame{@link #IRemoteEncodedVideoFrameObserver#onRemoteEncodedVideoFrame} callback
@param observer Remote encoded video data monitor. See IRemoteEncodedVideoFrameObserver{@link #IRemoteEncodedVideoFrameObserver}
@return
- 0: Success.
- < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
@note
- See Custom Video Encoding and Decoding for more details about custom video decoding.
- This method applys to manual subscription mode and can be called either before or after entering the Room. It is recommended to call it before entering the room.
- The engine needs to be unregistered before it is destroyed. Call this method to set the parameter to "null".
Implementation
Future<int?> registerRemoteEncodedVideoFrameObserver(
IRemoteEncodedVideoFrameObserver observer) async {
$a() => ($instance as $p_a.RTCEngine)
.registerRemoteEncodedVideoFrameObserver(packObject(
observer, () => android_IRemoteEncodedVideoFrameObserver()));
$i() => ($instance as $p_i.ByteRTCEngine)
.registerRemoteEncodedVideoFrameObserver(
packObject(observer, () => ios_IRemoteEncodedVideoFrameObserver()));
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}