Esempio n. 1
0
        /// <summary>
        /// Start the video recording using the video recording source given by <paramref name="videoSource"/>.
        /// </summary>
        /// <param name="videoSource">
        /// The device providing the video signal to be recorded.
        /// </param>
        /// <returns>
        /// <see langword="true"/>, if the video recording started sucessful; <see langword="false"/> otherwise.
        /// </returns>
        public bool StartRecording(IVideoRecordingSource videoSource)
        {
            if (videoSource == null)
            {
                throw new ArgumentNullException(nameof(videoSource));
            }

            if (videoSource.UseForVideoRecording(this.ActivityId))
            {
                this.videoSource = videoSource;
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        /// <summary>
        /// Start the video recording using the video and audio recording sources.
        /// </summary>
        /// <param name="videoSource">
        /// The device providing the video signal to be recorded.
        /// </param>
        /// <param name="audioSource">
        /// The device providing the audio signal to be recorded
        /// </param>
        /// <returns>
        /// <see langword="true"/>, if the video recording started sucessful; <see langword="false"/> otherwise.
        /// </returns>
        public bool StartRecording(IVideoRecordingSource videoSource, IAudioRecordingSource audioSource)
        {
            if (videoSource == null)
            {
                throw new ArgumentNullException(nameof(videoSource));
            }

            if (audioSource == null)
            {
                throw new ArgumentNullException(nameof(audioSource));
            }

            if (videoSource.UseForVideoRecording(this.ActivityId) && audioSource.UseForAudioRecording(this.ActivityId))
            {
                this.videoSource = videoSource;
                this.audioSource = audioSource;
                return true;
            }

            return false;
        }