[pitivi/ges: 281/287] Compact the video codec names some more



commit 02677b83293fd182d22db6227feff1052bee6669
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Tue Feb 14 21:35:33 2012 -0500

    Compact the video codec names some more

 pitivi/render.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/render.py b/pitivi/render.py
index f5c0ec5..28efc02 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -254,14 +254,22 @@ def available_combinations():
 
 
 def beautify_factoryname(factory):
-    """Returns a nice name for the specified gst.ElementFactory instance."""
+    """
+    Returns a nice name for the specified gst.ElementFactory instance.
+    This is intended to remove redundant words and shorten the codec names.
+    """
     # only replace lowercase versions of "format", "video", "audio"
     # otherwise they might be part of a trademark name
     words_to_remove = ["Muxer", "muxer", "Encoder", "encoder",
-            "format", "video", "audio", "instead"]
+            "format", "video", "audio", "instead",
+            "Flash Video (FLV) /",  # Incorrect naming for Sorenson Spark
+            ]
+    words_to_replace = [["version ", "v"], ["Microsoft", "MS"], ]
     name = factory.get_longname()
     for word in words_to_remove:
         name = name.replace(word, "")
+    for match, replacement in words_to_replace:
+        name = name.replace(match, replacement)
     return " ".join(word for word in name.split())
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]