public RecordTabSettings(RegistryKey cameraKey, int profile)
        {
            this.profile = profile;
            RegistryKey clipsKey = cameraKey.OpenSubKey("Clips");
            // Read settings from record tab.
            RegEdit record = new RegEdit(clipsKey.OpenSubKey(profile.ToString()));

            this.sync            = record.DWord("sync") > 0;  // If > 0, most of the other settings in this object should be ignored.
            this.camsync         = record.String("camsync");
            this.DirectToDisc    = record.DWord("transcode") == 0;
            this.recordingFormat = (RecordingFormat)record.DWord("movieformat");
            this.VCodec          = record.String("vcodec");
            this.triggerType     = (RecordingTriggerType)record.DWord("continuous");
        }
Example #2
0
 public static string ToSerialString(this RecordingFormat value) => value switch
 {
Example #3
0
        public void StartRecordingLatestVersion_Returns404NotFound(Uri sampleCallBackUri, RecordingContent?recordingContentType, RecordingChannel recordingChannelType, RecordingFormat recordingFormatType)
        {
            ServerCall serverCall = CreateMockServerCall(404);

            RequestFailedException?ex = Assert.Throws <RequestFailedException>(() => serverCall.StartRecording(sampleCallBackUri, recordingContentType, recordingChannelType, recordingFormatType));

            Assert.NotNull(ex);
            Assert.AreEqual(ex?.Status, 404);
        }
Example #4
0
        public void StartRecordingLatestVersion_Returns200Ok(Uri sampleCallBackUri, RecordingContent?recordingContentType, RecordingChannel recordingChannelType, RecordingFormat recordingFormatType)
        {
            ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyStartRecordingResponse);

            StartRecordingResult result = serverCall.StartRecording(sampleCallBackUri, recordingContentType, recordingChannelType, recordingFormatType);

            Assert.AreEqual("dummyRecordingId", result.RecordingId);
        }