コード例 #1
0
ファイル: Controller.cs プロジェクト: amanowar/storybook
        public IDisposable StartRecording()
        {
            /* Stop trying to recognize frames. */
            recognizeAvailableFrameSubscription?.Dispose();
            recognizeAvailableFrameSubscription = null;

            /* Start pushing recordings through so the publishers can teach the brain a new concept*/
            var conceptId = new Id(Guid.NewGuid().ToString());
            var videoRecorderSubscription = videoRecorder.StartRecording(conceptId);
            var audioRecorderSubscription = audioRecorder.StartRecording(conceptId);

            return(new CompositeDisposable()
            {
                videoRecorderSubscription,
                audioRecorderSubscription,
                Disposable.Create(StopRecording)
            });
        }