private void RegisterMediaStreamBufferStatusCallback() { _mediaStreamAudioBufferStatusChangedCallback = (status, _) => { Debug.Assert(Enum.IsDefined(typeof(MediaStreamBufferStatus), status)); Log.Debug(PlayerLog.Tag, "audio buffer status : " + status); MediaStreamAudioBufferStatusChanged?.Invoke(this, new MediaStreamBufferStatusChangedEventArgs(status)); }; _mediaStreamVideoBufferStatusChangedCallback = (status, _) => { Debug.Assert(Enum.IsDefined(typeof(MediaStreamBufferStatus), status)); Log.Debug(PlayerLog.Tag, "video buffer status : " + status); MediaStreamVideoBufferStatusChanged?.Invoke(this, new MediaStreamBufferStatusChangedEventArgs(status)); }; RegisterMediaStreamBufferStatusCallback(StreamType.Audio, _mediaStreamAudioBufferStatusChangedCallback); RegisterMediaStreamBufferStatusCallback(StreamType.Video, _mediaStreamVideoBufferStatusChangedCallback); }
private void RegisterMediaStreamBufferStatusCallback(StreamType streamType, NativePlayer.MediaStreamBufferStatusCallback cb) { NativePlayer.SetMediaStreamBufferStatusCb(Handle, streamType, cb). ThrowIfFailed(this, "Failed to SetMediaStreamBufferStatus"); }