/// <summary>
 /// Unregister an existing frame callback registered with <see cref="RegisterCallback(I420AVideoFrameDelegate)"/>.
 /// </summary>
 /// <param name="callback">The frame callback to unregister.</param>
 public void UnregisterCallback(I420AVideoFrameDelegate callback)
 {
     if (Track != null)
     {
         Track.I420AVideoFrameReady -= callback;
     }
 }
 /// <inheritdoc/>
 public void UnregisterCallback(I420AVideoFrameDelegate callback)
 {
     if (Source != null)
     {
         Source.VideoFrameReady -= callback;
     }
 }
Exemplo n.º 3
0
        public static IObservable <WebRTCFrameEventArgs> VideoFrameReady(LocalVideoTrack vidtrack)
        {
            return(Observable.FromEvent <I420AVideoFrameDelegate, WebRTCFrameEventArgs>(handler =>
            {
                I420AVideoFrameDelegate vfReadyHandler = (frame) =>
                {
                    handler(new WebRTCFrameEventArgs(frame));
                };

                return vfReadyHandler;
            },
                                                                                        vfReadyHandler => vidtrack.I420AVideoFrameReady += vfReadyHandler,
                                                                                        vfReadyHandler => vidtrack.I420AVideoFrameReady -= vfReadyHandler));
        }