[longomatch] Bitrate is in bps for xvidenc and ffenc_mpeg4
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Bitrate is in bps for xvidenc and ffenc_mpeg4
- Date: Sun, 25 Jul 2010 15:34:52 +0000 (UTC)
commit 4d14cb8ee04ccbe925547d312fe995b99eb8122c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Jul 23 22:33:21 2010 +0200
Bitrate is in bps for xvidenc and ffenc_mpeg4
libcesarplayer/src/gst-camera-capturer.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libcesarplayer/src/gst-camera-capturer.c b/libcesarplayer/src/gst-camera-capturer.c
index 55503d5..39de425 100644
--- a/libcesarplayer/src/gst-camera-capturer.c
+++ b/libcesarplayer/src/gst-camera-capturer.c
@@ -266,10 +266,13 @@ static void
gst_camera_capturer_set_video_bit_rate (GstCameraCapturer * gcc, gint bitrate)
{
gcc->priv->video_bitrate = bitrate;
- g_object_set (gcc->priv->videoenc, "bitrate", gcc->priv->video_bitrate, NULL);
+ if (gcc->priv->video_encoder_type == VIDEO_ENCODER_MPEG4 ||
+ gcc->priv->video_encoder_type == VIDEO_ENCODER_XVID)
+ g_object_set (gcc->priv->videoenc, "bitrate", bitrate * 1000, NULL);
+ else
+ g_object_set (gcc->priv->videoenc, "bitrate", gcc->priv->video_bitrate, NULL);
GST_INFO_OBJECT (gcc, "Changed video bitrate to :\n%d",
gcc->priv->video_bitrate);
-
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]