[cheese] Use a realtime preset for video encoder element



commit e7f9908166b64c6755437b825eb010806c043d21
Author: David King <amigadave amigadave com>
Date:   Fri Jun 22 22:18:37 2012 +0100

    Use a realtime preset for video encoder element
    
    Use the âProfile Realtimeâ preset for vp8enc to set reasonable defaults
    for realtime encoding. The preset was added in gst-plugins-bad 0.10.23,
    so fall back to reasonable defaults. Fixes bug 668560 and partially
    fixes bug 674779.

 libcheese/cheese-camera.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index d2384ad..af073f3 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -453,7 +453,11 @@ cheese_camera_set_video_recording (CheeseCamera *camera, GError **error)
     return;
   }
   g_object_set (priv->camerabin, "video-encoder", video_enc, NULL);
-  g_object_set (G_OBJECT (video_enc), "speed", 2, NULL);
+  /* Use a preset, or set some reasonable defaults. */
+  if (!gst_preset_load_preset (GST_PRESET (video_enc), "Profile Realtime"))
+  {
+    g_object_set (G_OBJECT (video_enc), "max-latency", 1, "speed", 2, NULL);
+  }
 
   if ((mux = gst_element_factory_make ("webmmux", "webmmux")) == NULL)
   {



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