use std::fmt;
-#[derive(Debug,Clone,Copy)]
+#[derive(Debug,Clone,Copy,PartialEq)]
#[allow(dead_code)]
pub enum CodecType {
Video,
const CODEC_CAP_HYBRID:u32 = 0x000008;
const CODEC_CAP_SCALABLE:u32 = 0x000010;
+#[derive(Clone)]
pub struct CodecDescription {
name: &'static str,
fname: &'static str,
}
pub fn get_codec_description(name: &str) -> Option<&'static CodecDescription> {
- for i in 0..CODEC_REGISTER.len() {
- if CODEC_REGISTER[i].name == name {
- return Some(&CODEC_REGISTER[i]);
+ for reg in CODEC_REGISTER {
+ if reg.name == name {
+ return Some(reg);
}
}
None