public static Codec FindCodec(CodecType codecType, string name) { CheckInit(); Codec result = null; CodecList codecs = GetCodecs(codecType); result = codecs.FindCodec(name); return(result); }
private static CodecList GetCodecs(CodecType codecType) { CodecList result = null; switch (codecType) { case CodecType.Video: result = _videoCodecs; break; case CodecType.Audio: result = _audioCodecs; break; } return(result); }
private static void EnumerateCodecs() { { Codec[] videoCodecs = new Codec[NativePlugin.GetVideoCodecCount()]; for (int i = 0; i < videoCodecs.Length; i++) { videoCodecs[i] = new Codec(CodecType.Video, i, NativePlugin.GetVideoCodecName(i), NativePlugin.GetVideoCodecMediaApi(i), NativePlugin.IsConfigureVideoCodecSupported(i)); } _videoCodecs = new CodecList(videoCodecs); } { Codec[] audioCodecs = new Codec[NativePlugin.GetAudioCodecCount()]; for (int i = 0; i < audioCodecs.Length; i++) { audioCodecs[i] = new Codec(CodecType.Audio, i, NativePlugin.GetAudioCodecName(i), NativePlugin.GetAudioCodecMediaApi(i), NativePlugin.IsConfigureAudioCodecSupported(i)); } _audioCodecs = new CodecList(audioCodecs); } _isEnumerated = true; }