Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 8e2e4769e0b5d2d650eba022d03068c0 > files > 6

psimedia-1.0.3-11.fc18.src.rpm

diff --git a/gstprovider/pipeline.cpp b/gstprovider/pipeline.cpp
index c4281f7..b7da9e1 100644
--- a/gstprovider/pipeline.cpp
+++ b/gstprovider/pipeline.cpp
@@ -157,19 +157,22 @@ static GstElement *filter_for_desired_size(const QSize &size)
 	GstElement *capsfilter = gst_element_factory_make("capsfilter", NULL);
 	GstCaps *caps = gst_caps_new_empty();
 
-	for(int n = 0; n < widths.count(); ++n)
-	{
-		GstStructure *cs;
-		cs = gst_structure_new("video/x-raw-yuv",
-			"width", GST_TYPE_INT_RANGE, 1, widths[n],
-			"height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
-		gst_caps_append_structure(caps, cs);
-
-		cs = gst_structure_new("video/x-raw-rgb",
-			"width", GST_TYPE_INT_RANGE, 1, widths[n],
-			"height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
-		gst_caps_append_structure(caps, cs);
-	}
+// 	for(int n = 0; n < widths.count(); ++n)
+// 	{
+// 		GstStructure *cs;
+// 		cs = gst_structure_new("video/x-raw-yuv",
+// 			"width", GST_TYPE_INT_RANGE, 1, widths[n],
+// 			"height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+// 		gst_caps_append_structure(caps, cs);
+// 
+// 		cs = gst_structure_new("video/x-raw-rgb",
+// 			"width", GST_TYPE_INT_RANGE, 1, widths[n],
+// 			"height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+// 		gst_caps_append_structure(caps, cs);
+// 	}
+        caps = gst_caps_from_string("video/x-raw-yuv , width=[320] , "
+			"height=[240] , framerate=[30/1]");
+        g_object_set(G_OBJECT(capsfilter), "caps", caps, NULL);
 
 	GstStructure *cs = gst_structure_new("image/jpeg", NULL);
 	gst_caps_append_structure(caps, cs);