[longomatch] Reconfigure encoding size to match the source size
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Reconfigure encoding size to match the source size
- Date: Tue, 16 Dec 2014 16:01:38 +0000 (UTC)
commit 381e044a6750a5118952944d5611608e452aab46
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Dec 16 17:00:43 2014 +0100
Reconfigure encoding size to match the source size
libcesarplayer/gst-camera-capturer.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libcesarplayer/gst-camera-capturer.c b/libcesarplayer/gst-camera-capturer.c
index bb7bebd..9f111d1 100644
--- a/libcesarplayer/gst-camera-capturer.c
+++ b/libcesarplayer/gst-camera-capturer.c
@@ -837,12 +837,19 @@ gst_camera_capturer_find_highest_res (GstCameraCapturer *gcc, GstCaps *caps)
if (max_width == 0 || max_height == 0) {
max_width = gcc->priv->output_width;
max_height = gcc->priv->output_height;
+ } else if (max_width < gcc->priv->output_width &&
+ max_height < gcc->priv->output_height) {
+ gcc->priv->output_width = max_width;
+ gcc->priv->output_height = max_height;
+ GST_INFO_OBJECT (gcc, "Reconfiguring the output size to %dx%d",
+ gcc->priv->output_width, gcc->priv->output_height);
}
caps_str = g_strdup_printf ("video/x-raw-yuv, width=%d, height=%d;"
"video/x-raw-rgb, width=%d, height=%d;"
"video/x-dv, systemstream=true, width=%d, height=%d",
max_width, max_height, max_width, max_height, max_width, max_height);
+ GST_INFO_OBJECT (gcc, "Source caps configured to: %s", caps_str);
rcaps = gst_caps_from_string (caps_str);
g_free (caps_str);
return rcaps;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]