]> git.pld-linux.org Git - packages/camorama.git/blob - fixes.patch
- updated to 0.20.7 from linuxtv.org fork
[packages/camorama.git] / fixes.patch
1 --- camorama-0.19/src/callbacks.c       2007-09-16 15:36:55.000000000 +0200
2 +++ camorama-0.19.new/src/callbacks.c   2008-06-29 22:22:44.000000000 +0200
3 @@ -387,9 +387,6 @@
4          }
5      }
6  
7 -    cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
8 -    gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
9 -                                 cam->x, cam->y);
10  
11      /*
12       * if(cam->read == FALSE) {
13 @@ -441,6 +438,11 @@
14       * * } 
15       */
16      get_win_info (cam);
17 +
18 +    cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
19 +    gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
20 +                                 cam->x, cam->y);
21 +
22      frame = 0;
23      gtk_window_resize (GTK_WINDOW
24                         (glade_xml_get_widget (cam->xml, "main_window")), 320,
25 @@ -520,8 +522,14 @@
26      gtk_widget_show (about);
27  }
28  
29 +void
30 +camorama_filter_color_filter(void* filter, guchar *image, int x, int y, int depth);
31 +
32  static void
33  apply_filters(cam* cam) {
34 +       /* v4l has reverse rgb order from what camora expect so call the color
35 +          filter to fix things up before running the user selected filters */
36 +       camorama_filter_color_filter(NULL, cam->pic_buf, cam->x, cam->y, cam->depth);
37         camorama_filter_chain_apply(cam->filter_chain, cam->pic_buf, cam->x, cam->y, cam->depth);
38  #warning "FIXME: enable the threshold channel filter"
39  //     if((effect_mask & CAMORAMA_FILTER_THRESHOLD_CHANNEL)  != 0) 
40 --- camorama-0.19/src/filter.c  2007-09-16 14:48:50.000000000 +0200
41 +++ camorama-0.19.new/src/filter.c      2008-06-29 22:11:42.000000000 +0200
42 @@ -151,12 +151,12 @@
43  static void
44  camorama_filter_color_init(CamoramaFilterColor* self) {}
45  
46 -static void
47 +void
48  camorama_filter_color_filter(CamoramaFilterColor* filter, guchar *image, int x, int y, int depth) {
49         int i;
50         char tmp;
51         i = x * y;
52 -       while (--i) {
53 +       while (i--) {
54                 tmp = image[0];
55                 image[0] = image[2];
56                 image[2] = tmp;
57 --- camorama-0.19/src/main.c    2007-09-16 15:36:55.000000000 +0200
58 +++ camorama-0.19.new/src/main.c        2008-06-29 22:20:04.000000000 +0200
59 @@ -224,8 +224,7 @@
60  
61      /* get picture attributes */
62      get_pic_info (cam);
63 -//     set_pic_info(cam);
64 -    /* set_pic_info(cam); */
65 +    set_pic_info (cam);
66      cam->contrast = cam->vid_pic.contrast;
67      cam->brightness = cam->vid_pic.brightness;
68      cam->colour = cam->vid_pic.colour;
69 --- camorama-0.19/src/v4l.c     2007-09-16 14:48:05.000000000 +0200
70 +++ camorama-0.19.new/src/v4l.c 2008-06-29 22:20:23.000000000 +0200
71 @@ -158,8 +158,8 @@
72         if(cam->debug) {
73                 g_message("SET PIC");
74         }
75 -       //cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
76 -       //cam->vid_pic.depth = 24;
77 +       cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
78 +       cam->vid_pic.depth = 24;
79         //cam->vid_pic.palette = VIDEO_PALETTE_YUV420P;
80         if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
81                 if(cam->debug) {
82 @@ -232,6 +232,8 @@
83        exit(0);
84     }
85  
86 +   cam->x = cam->vid_win.width;
87 +   cam->y = cam->vid_win.height;
88  }
89  
90  void set_buffer(cam * cam)
91 --- camorama-0.19/src/camorama-window.c~        2007-09-16 15:36:55.000000000 +0200
92 +++ camorama-0.19/src/camorama-window.c 2009-06-23 20:19:16.000000000 +0200
93 @@ -209,11 +209,7 @@ load_interface(cam* cam) {
94  
95      logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), CAMORAMA_STOCK_WEBCAM, 24, 0, NULL);
96      gtk_window_set_default_icon(logo);
97 -    logo = (GdkPixbuf *) create_pixbuf (PACKAGE_DATA_DIR "/pixmaps/camorama.png");
98 -    if (logo == NULL) {
99 -        printf ("\n\nLOGO NO GO\n\n");
100 -    }
101 -
102 +    logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), "camorama", 48, 0, NULL);
103      if (cam->show_adjustments == FALSE) {
104          gtk_widget_hide (glade_xml_get_widget
105                           (cam->xml, "adjustments_table"));
This page took 0.064249 seconds and 3 git commands to generate.