? zoom.patch
? src/backend/.cvsignore
Index: src/backend/bacon-video-widget-gst.c
===================================================================
RCS file: /cvs/gnome/totem/src/backend/bacon-video-widget-gst.c,v
retrieving revision 1.174
diff -u -r1.174 bacon-video-widget-gst.c
--- src/backend/bacon-video-widget-gst.c	5 Apr 2005 18:07:59 -0000	1.174
+++ src/backend/bacon-video-widget-gst.c	8 Apr 2005 19:01:18 -0000
@ -2480,7 +2480,7 @@
 gboolean
 bacon_video_widget_can_set_zoom (BaconVideoWidget *bvw)
 {
-  return FALSE;
+  return TRUE;
 }
 
 void
@@ -2490,7 +2490,18 @@
   g_return_if_fail (bvw != NULL);
   g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
 
-  /* implement me */
+  int oldzoom = 0;
+  
+  GstElement *videosink, *videocrop;
+  
+  g_object_get(G_OBJECT(bvw->priv->play), "video-sink",&videosink ,NULL);
+  videocrop = gst_bin_get_by_name(GST_BIN(videosink), "cropelement");
+  g_object_get(videocrop,"top",&oldzoom,NULL);
+  g_object_set(videocrop,"top",zoom-100);
+  g_object_set(videocrop,"bottom",zoom-100);
+
+  bvw->priv->video_height = bvw->priv->video_height-2*(zoom-100-oldzoom);
+
 }
 
 int
@@ -2499,7 +2510,14 @@
   g_return_val_if_fail (bvw != NULL, 100);
   g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), 100);
 
-  return 100;
+  GstElement *videosink,*videocrop;
+  int zoom = 0;
+  
+  g_object_get(G_OBJECT(bvw->priv->play), "video-sink", &videosink,NULL);
+  videocrop = gst_bin_get_by_name(GST_BIN(videosink),"cropelement");
+  g_object_get(videocrop,"top",&zoom,NULL);
+
+  return zoom+100;
 }
 
 int
@@ -3160,7 +3178,15 @@
         return NULL;
     } else {
       GDate d;
+      GstElement *bin, *videocrop;
 
+      bin = gst_bin_new("videosinkbin");
+      videocrop = gst_element_factory_make("videocrop","cropelement");
+      g_assert(videocrop);
+      gst_bin_add_many(GST_BIN(bin), videocrop, video_sink, NULL);
+      gst_element_link (videocrop, video_sink);
+      gst_element_add_ghost_pad(bin,gst_element_get_pad(videocrop, "sink"),"sink");
+      
       g_date_clear (&d, 1);
       g_date_set_time (&d, time (NULL));
       if (g_date_day (&d) == 1 && g_date_month (&d) == G_DATE_APRIL) {
@@ -3176,16 +3202,16 @@
 
           puzzle = gst_element_factory_make ("puzzle", NULL);
           if (puzzle) {
-            GstElement *bin = gst_bin_new ("videosinkbin");
-
-            gst_bin_add_many (GST_BIN (bin), puzzle, video_sink, NULL);
-            gst_element_link (puzzle, video_sink);
+            gst_bin_add_many (GST_BIN (bin), puzzle, NULL);
+            gst_element_link (puzzle, videocrop);
+	    gst_element_remove_ghost_pad(bin,
+		gst_element_get_pad (bin, "sink"));
             gst_element_add_ghost_pad (bin,
                 gst_element_get_pad (puzzle, "sink"), "sink");
-            video_sink = bin;
           }
         }
       }
+      video_sink = bin;
     }
   }
 
