Ejemplo n.º 1
0
        private static void ThrowIfCodecAndFormatNotValid(RecorderAudioCodec audioCodec, RecorderFileFormat fileFormat)
        {
            if (audioCodec == RecorderAudioCodec.None)
            {
                throw new ArgumentOutOfRangeException(nameof(audioCodec),
                                                      "RecorderAudioCodec.None is only available with VideoRecorder.");
            }

            audioCodec.ThrowIfFormatNotSupported(fileFormat);
        }
Ejemplo n.º 2
0
        private static void ThrowIfCodecAndFormatNotValid(RecorderVideoCodec videoCodec,
                                                          RecorderAudioCodec audioCodec, RecorderFileFormat fileFormat)
        {
            videoCodec.ThrowIfFormatNotSupported(fileFormat);

            if (audioCodec != RecorderAudioCodec.None)
            {
                audioCodec.ThrowIfFormatNotSupported(fileFormat);
            }
        }