remove trailing whitespaces
[nihav.git] / nihav-commonfmt / src / codecs / cinepakenc.rs
index 4271e1a7d1575cb13a174a724f8017c181f6f40c..a77e58a4283f9f4010c6dd92783bdf69e5f838f5 100644 (file)
@@ -945,7 +945,7 @@ impl NAEncoder for CinepakEncoder {
 
                 let buf = alloc_video_buffer(out_info, 2)?;
                 self.lastfrm = Some(buf.get_vbuf().unwrap());
-                
+
                 Ok(stream)
             },
         }
@@ -984,7 +984,7 @@ impl NAEncoder for CinepakEncoder {
 
 const ENCODER_OPTS: &[NAOptionDefinition] = &[
     NAOptionDefinition {
-        name: "key_int", description: "Keyframe interval (0 - automatic)",
+        name: KEYFRAME_OPTION, description: KEYFRAME_OPTION_DESC,
         opt_type: NAOptionDefinitionType::Int(Some(0), Some(128)) },
     NAOptionDefinition {
         name: "nstrips", description: "Number of strips per frame (0 - automatic)",
@@ -998,11 +998,10 @@ impl NAOptionHandler for CinepakEncoder {
     fn get_supported_options(&self) -> &[NAOptionDefinition] { ENCODER_OPTS }
     fn set_options(&mut self, options: &[NAOption]) {
         for option in options.iter() {
-println!("option {}", option.name);
             for opt_def in ENCODER_OPTS.iter() {
                 if opt_def.check(option).is_ok() {
                     match option.name {
-                        "key_int" => {
+                        KEYFRAME_OPTION => {
                             if let NAValue::Int(intval) = option.value {
                                 self.key_int = intval as u8;
                             }
@@ -1030,7 +1029,7 @@ println!("option {}", option.name);
     }
     fn query_option_value(&self, name: &str) -> Option<NAValue> {
         match name {
-            "key_int" => Some(NAValue::Int(i64::from(self.key_int))),
+            KEYFRAME_OPTION => Some(NAValue::Int(i64::from(self.key_int))),
             "nstrips" => Some(NAValue::Int(self.nstrips as i64)),
             "quant_mode" => Some(NAValue::String(self.qmode.to_string())),
             _ => None,