[gnome-shell] recorder: Port to new gstreamer vp8enc api



commit e71c0164776f45c3406969a954029316289c96a3
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Mon Sep 17 18:55:02 2012 +0200

    recorder: Port to new gstreamer vp8enc api
    
    The speed and quality properties have been removed in favor of properties
    closer to the upstream library.
    
    Removing the properies from the pipeline would result into a huge
    slowdown so we have to map the old values to the new ones.
    
    According to the source code of the old vp8enc element quality maps to
    (int)(63 - quality * 6.2) for min_quantizer and max_quantizer, while
    speed maps to cpu-used = speed == 0 ? 0 : (speed - 1).
    
    So set min_quantizer and min_quantizer to 13, and cpu-used to 5 based on
    the above formulas.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684206

 data/org.gnome.shell.gschema.xml.in.in |    2 +-
 src/shell-recorder.c                   |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/data/org.gnome.shell.gschema.xml.in.in b/data/org.gnome.shell.gschema.xml.in.in
index d9a1ae8..18eac2c 100644
--- a/data/org.gnome.shell.gschema.xml.in.in
+++ b/data/org.gnome.shell.gschema.xml.in.in
@@ -132,7 +132,7 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
         take care of its own output - this might be used to send the output
         to an icecast server via shout2send or similar. When unset or set
         to an empty value, the default pipeline will be used. This is currently
-        'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux'
+        'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux'
         and records to WEBM using the VP8 codec. %T is used as a placeholder
         for a guess at the optimal thread count on the system.
       </_description>
diff --git a/src/shell-recorder.c b/src/shell-recorder.c
index 2c82fda..9dd7482 100644
--- a/src/shell-recorder.c
+++ b/src/shell-recorder.c
@@ -143,7 +143,7 @@ G_DEFINE_TYPE(ShellRecorder, shell_recorder, G_TYPE_OBJECT);
  * (Theora does have some support for frames at non-uniform times, but
  * things seem to break down if there are large gaps.)
  */
-#define DEFAULT_PIPELINE "vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux"
+#define DEFAULT_PIPELINE "vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux"
 
 /* If we can find the amount of memory on the machine, we use half
  * of that for memory_target, otherwise, we use this value, in kB.
@@ -1598,7 +1598,7 @@ shell_recorder_set_filename (ShellRecorder *recorder,
  * might be used to send the output to an icecast server
  * via shout2send or similar.
  *
- * The default value is 'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux'
+ * The default value is 'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux'
  */
 void
 shell_recorder_set_pipeline (ShellRecorder *recorder,



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