[longomatch] Some encoder needs bps instead of kbps



commit 79ce66eefaaa62842db99eaadc82f6b668f758b1
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Jul 25 22:58:43 2010 +0200

    Some encoder needs bps instead of kbps

 libcesarplayer/src/gst-video-editor.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libcesarplayer/src/gst-video-editor.c b/libcesarplayer/src/gst-video-editor.c
index 0706c80..363f9e5 100644
--- a/libcesarplayer/src/gst-video-editor.c
+++ b/libcesarplayer/src/gst-video-editor.c
@@ -1011,8 +1011,13 @@ gst_video_editor_set_video_encoder (GstVideoEditor * gve, gchar ** err,
 
       /*Add new encoder element */
       gve->priv->video_encoder = encoder;
-      g_object_set (G_OBJECT (gve->priv->video_encoder), "bitrate",
-          gve->priv->video_bitrate, NULL);
+      if (codec == VIDEO_ENCODER_XVID || codec == VIDEO_ENCODER_MPEG4)
+        g_object_set (G_OBJECT (gve->priv->video_encoder), "bitrate",
+            gve->priv->video_bitrate * 1000, NULL);
+      else {
+        g_object_set (G_OBJECT (gve->priv->video_encoder), "bitrate",
+            gve->priv->video_bitrate, NULL);
+      }
       /*Add first to the encoder bin */
       gst_bin_add (GST_BIN (gve->priv->vencode_bin), gve->priv->video_encoder);
       gst_element_link (gve->priv->queue, gve->priv->video_encoder);



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