diff --speed-large-files --minimal -ru gst-plugins-bad-0.10.22.orig/ext/dc1394/gstdc1394.c gst-plugins-bad-0.10.22/ext/dc1394/gstdc1394.c
--- gst-plugins-bad-0.10.22.orig/ext/dc1394/gstdc1394.c	2011-01-07 16:30:28.000000000 +0100
+++ gst-plugins-bad-0.10.22/ext/dc1394/gstdc1394.c	2011-11-25 16:46:09.773088930 +0100
@@ -76,6 +76,8 @@
 static gboolean gst_dc1394_parse_caps (const GstCaps * caps,
     gint * width,
     gint * height,
+    gint * roi_left,
+    gint * roi_top,
     gint * rate_numerator, gint * rate_denominator, gint * vmode, gint * bpp);
 
 static gint gst_dc1394_caps_set_format_vmode_caps (GstStructure * st,
@@ -178,6 +180,9 @@
   src->camnum = 0;
   src->n_frames = 0;
 
+  src->roi_left=0;
+  src->roi_top=0;
+
   gst_pad_set_fixatecaps_function (GST_BASE_SRC_PAD (src),
       gst_dc1394_src_fixate);
 
@@ -192,7 +197,6 @@
   GstDc1394 *src = GST_DC1394 (gst_pad_get_parent (pad));
   GstStructure *structure;
   int i;
-
   GST_LOG_OBJECT (src, " fixating caps to closest to 320x240 , 30 fps");
 
   for (i = 0; i < gst_caps_get_size (caps); ++i) {
@@ -200,6 +204,12 @@
 
     gst_structure_fixate_field_nearest_int (structure, "width", 320);
     gst_structure_fixate_field_nearest_int (structure, "height", 240);
+    if (gst_structure_has_field(structure, "roi_top")) {
+	gst_structure_fixate_field_nearest_int (structure, "roi_top", 0);
+    }
+    if (gst_structure_has_field(structure, "roi_left")) {
+        gst_structure_fixate_field_nearest_int (structure, "roi_left", 0);
+    }
     gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1);
   }
   gst_object_unref (GST_OBJECT (src));
@@ -288,6 +298,9 @@
   gboolean res = TRUE;
   GstDc1394 *dc1394;
   gint width, height, rate_denominator, rate_numerator;
+  gint roi_top=0;
+  gint roi_left=0;
+
   gint bpp, vmode;
 
   dc1394 = GST_DC1394 (bsrc);
@@ -298,19 +311,20 @@
 
   dc1394->caps = gst_caps_copy (caps);
 
-  res = gst_dc1394_parse_caps (caps, &width, &height,
+  res = gst_dc1394_parse_caps (caps, &width, &height,&roi_left,&roi_top,
       &rate_numerator, &rate_denominator, &vmode, &bpp);
 
   if (res) {
     /* looks ok here */
     dc1394->width = width;
     dc1394->height = height;
+    dc1394->roi_top = roi_top;
+    dc1394->roi_left = roi_left;
     dc1394->vmode = vmode;
     dc1394->rate_numerator = rate_numerator;
     dc1394->rate_denominator = rate_denominator;
     dc1394->bpp = bpp;
   }
-
   return res;
 }
 
@@ -401,6 +415,8 @@
 gst_dc1394_parse_caps (const GstCaps * caps,
     gint * width,
     gint * height,
+    gint * roi_left,
+    gint * roi_top,
     gint * rate_numerator, gint * rate_denominator, gint * vmode, gint * bpp)
 {
   const GstStructure *structure;
@@ -415,6 +431,14 @@
   ret = gst_structure_get_int (structure, "width", width);
   ret &= gst_structure_get_int (structure, "height", height);
 
+  if (gst_structure_has_field(structure, "roi_top")) {
+    ret &= gst_structure_get_int (structure, "roi_top", roi_top);
+  }
+  if (gst_structure_has_field(structure, "roi_left")) {
+    ret &= gst_structure_get_int (structure, "roi_left", roi_left);
+  }
+
+
   framerate = gst_structure_get_value (structure, "framerate");
 
   ret &= gst_structure_get_int (structure, "vmode", vmode);
@@ -847,7 +882,9 @@
         "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
     gst_structure_set (gs,
         "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, //NULL);
+	"roi_left", GST_TYPE_INT_RANGE, 0, G_MAXINT,
+	"roi_top", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
 
     if (gst_dc1394_set_caps_color (gs, i)) {
       gst_caps_append_structure (gcaps, gs);
@@ -1143,14 +1180,14 @@
   // set any format-7 parameters if this is a format-7 mode
   if (src->vmode >= DC1394_VIDEO_MODE_FORMAT7_MIN &&
       src->vmode <= DC1394_VIDEO_MODE_FORMAT7_MAX) {
-    // the big thing we care about right now is frame size
-    err = dc1394_format7_set_image_size (src->camera, src->vmode,
-        src->width, src->height);
+
+
+    err = dc1394_format7_set_roi(src->camera,  src->vmode, DC1394_QUERY_FROM_CAMERA, DC1394_QUERY_FROM_CAMERA,  src->roi_left,   src->roi_top,  src->width,  src->height);
     if (err != DC1394_SUCCESS) {
       GST_ELEMENT_ERROR (src, RESOURCE, FAILED,
-          ("Could not set format 7 image size to %d x %d", src->width,
-              src->height), ("Could not set format 7 image size to %d x %d",
-              src->width, src->height));
+          ("Could not set format 7 image size to %d x %d ROI left %d top %d", src->width,
+              src->height, src->roi_left,   src->roi_top), ("Could not set format 7 image size to %d x %d ROI left %d top %d",
+              src->width, src->height, src->roi_left,   src->roi_top));
 
       goto error;
     }
diff --speed-large-files --minimal -ru gst-plugins-bad-0.10.22.orig/ext/dc1394/gstdc1394.h gst-plugins-bad-0.10.22/ext/dc1394/gstdc1394.h
--- gst-plugins-bad-0.10.22.orig/ext/dc1394/gstdc1394.h	2010-04-29 10:59:29.000000000 +0200
+++ gst-plugins-bad-0.10.22/ext/dc1394/gstdc1394.h	2011-11-25 14:48:46.466985416 +0100
@@ -47,6 +47,8 @@
   /* video state */
   gint width;
   gint height;
+  gint roi_left;
+  gint roi_top;
   gint vmode; 
 
   gint bpp;
