public IDisposable StartRecording(Id conceptId) { var videoBuilder = new VideoRecordingBuilder(conceptId); var videoSubscription = videoProvider.FrameAvailable.Subscribe(videoBuilder); return(new CompositeDisposable( videoSubscription, Disposable.Create(() => StopRecording(videoBuilder)))); }
private void StopRecording(VideoRecordingBuilder builder) { var recording = builder.ToVideoRecording(); recordingAvailable.OnNext(recording); }