[gst-cvs] gst-openmax: base_videoenc: use 0 as automatic bitrate

Felipe Contreras felipec at kemper.freedesktop.org
Sat Sep 19 09:21:16 PDT 2009


Module: gst-openmax
Branch: master
Commit: 6c02b3bc028db2acb654ef206f2c20aa1aae5fe4
URL:    http://cgit.freedesktop.org/gstreamer/gst-openmax/commit/?id=6c02b3bc028db2acb654ef206f2c20aa1aae5fe4

Author: Felipe Contreras <felipe.contreras at nokia.com>
Date:   Tue May 19 18:57:33 2009 +0300

base_videoenc: use 0 as automatic bitrate

So that the omx component can automatically calculate it.

Signed-off-by: Felipe Contreras <felipe.contreras at nokia.com>

---

 omx/gstomx_base_videoenc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/omx/gstomx_base_videoenc.c b/omx/gstomx_base_videoenc.c
index 6b94eba..f788817 100644
--- a/omx/gstomx_base_videoenc.c
+++ b/omx/gstomx_base_videoenc.c
@@ -30,7 +30,7 @@ enum
     ARG_BITRATE,
 };
 
-#define DEFAULT_BITRATE 500000
+#define DEFAULT_BITRATE 0
 
 static GstOmxBaseFilterClass *parent_class;
 
@@ -270,8 +270,8 @@ omx_setup (GstOmxBaseFilter *omx_base)
 
             param.format.video.eCompressionFormat = self->compression_format;
 
-            /** @todo this should be set with a property */
-            param.format.video.nBitrate = self->bitrate;
+            if (self->bitrate != 0)
+                param.format.video.nBitrate = self->bitrate;
 
             OMX_SetParameter (gomx->omx_handle, OMX_IndexParamPortDefinition, &param);
         }





More information about the Gstreamer-commits mailing list