gst-libs/gst/colorbalance/colorbalance.c: Adding a default type.
authorJulien Moutte <julien@moutte.net>
Wed, 14 Jan 2004 17:15:34 +0000 (17:15 +0000)
committerJulien Moutte <julien@moutte.net>
Wed, 14 Jan 2004 17:15:34 +0000 (17:15 +0000)
Original commit message from CVS:
2004-01-14  Julien MOUTTE <julien@moutte.net>

* gst-libs/gst/colorbalance/colorbalance.c:
(gst_color_balance_class_init): Adding a default type.
* gst-libs/gst/colorbalance/colorbalance.h: Adding a macro to access
the type.
* gst/videofilter/gstvideobalance.c: (gst_videobalance_get_type),
(gst_videobalance_dispose), (gst_videobalance_class_init),
(gst_videobalance_init), (gst_videobalance_interface_supported),
(gst_videobalance_interface_init),
(gst_videobalance_colorbalance_list_channels),
(gst_videobalance_colorbalance_set_value),
(gst_videobalance_colorbalance_get_value),
(gst_videobalance_colorbalance_init): Implementing colorbalance
interface.
* gst/videofilter/gstvideobalance.h: Adding colorbalance channels
list.
* sys/ximage/ximagesink.c: (gst_ximagesink_set_xwindow_id): Fixing a
bug which was triggering a BadAccess X error when setting an overlay
before pad was really negotiated.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_colorbalance_init):
Using the colorbalance type macro.

ChangeLog
gst-libs/gst/colorbalance/colorbalance.c
gst-libs/gst/colorbalance/colorbalance.h
gst-libs/gst/interfaces/colorbalance.c
gst-libs/gst/interfaces/colorbalance.h
sys/ximage/ximagesink.c
sys/xvimage/xvimagesink.c

index aafaea342d73a9d3e97416506f1394c928c494e2..b8bf8932fb398c5bfcb04391697345f8ccbb977b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2004-01-14  Julien MOUTTE <julien@moutte.net>
+
+       * gst-libs/gst/colorbalance/colorbalance.c:
+       (gst_color_balance_class_init): Adding a default type.
+       * gst-libs/gst/colorbalance/colorbalance.h: Adding a macro to access
+       the type.
+       * gst/videofilter/gstvideobalance.c: (gst_videobalance_get_type),
+       (gst_videobalance_dispose), (gst_videobalance_class_init),
+       (gst_videobalance_init), (gst_videobalance_interface_supported),
+       (gst_videobalance_interface_init),
+       (gst_videobalance_colorbalance_list_channels),
+       (gst_videobalance_colorbalance_set_value),
+       (gst_videobalance_colorbalance_get_value),
+       (gst_videobalance_colorbalance_init): Implementing colorbalance
+       interface.
+       * gst/videofilter/gstvideobalance.h: Adding colorbalance channels
+       list.
+       * sys/ximage/ximagesink.c: (gst_ximagesink_set_xwindow_id): Fixing a
+       bug which was triggering a BadAccess X error when setting an overlay
+       before pad was really negotiated.
+       * sys/xvimage/xvimagesink.c: (gst_xvimagesink_colorbalance_init):
+       Using the colorbalance type macro.
+
 2004-01-14  Benjamin Otte  <in7y118@public.uni-hamburg.de>
 
        * ext/flac/gstflacenc.c: (gst_flacenc_set_metadata),
index 163111cd6927e05a96fbe89de69bc8e73746b14d..272b7eb990e30dcc2c2e85d1a216f2ff4a803e30 100644 (file)
@@ -82,6 +82,8 @@ gst_color_balance_class_init (GstColorBalanceClass *klass)
     initialized = TRUE;
   }
 
+  klass->balance_type = GST_COLOR_BALANCE_SOFTWARE;
+  
   /* default virtual functions */
   klass->list_channels = NULL;
   klass->set_value = NULL;
index 3f365485d28868aa8832fec92c646373ff8cb7ad..3eb126cf21f7985cd9f6d8713590c9086399e9cc 100644 (file)
@@ -41,6 +41,8 @@ G_BEGIN_DECLS
   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE))
 #define GST_COLOR_BALANCE_GET_CLASS(inst) \
   (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceClass))
+  
+#define GST_COLOR_BALANCE_TYPE(klass) (klass->balance_type)
 
 typedef struct _GstColorBalance GstColorBalance;
   
index 163111cd6927e05a96fbe89de69bc8e73746b14d..272b7eb990e30dcc2c2e85d1a216f2ff4a803e30 100644 (file)
@@ -82,6 +82,8 @@ gst_color_balance_class_init (GstColorBalanceClass *klass)
     initialized = TRUE;
   }
 
+  klass->balance_type = GST_COLOR_BALANCE_SOFTWARE;
+  
   /* default virtual functions */
   klass->list_channels = NULL;
   klass->set_value = NULL;
index 3f365485d28868aa8832fec92c646373ff8cb7ad..3eb126cf21f7985cd9f6d8713590c9086399e9cc 100644 (file)
@@ -41,6 +41,8 @@ G_BEGIN_DECLS
   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE))
 #define GST_COLOR_BALANCE_GET_CLASS(inst) \
   (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceClass))
+  
+#define GST_COLOR_BALANCE_TYPE(klass) (klass->balance_type)
 
 typedef struct _GstColorBalance GstColorBalance;
   
index 69c004166fc7ea20a5a43a9b55299e85896f06c2..2035670e31a93b5e965c3feca389fdab74c26269 100644 (file)
@@ -1002,8 +1002,9 @@ gst_ximagesink_set_xwindow_id (GstXOverlay *overlay, XID xwindow_id)
       
       /* If that new window geometry differs from our one we try to 
          renegotiate caps */
-      if (xwindow->width != GST_VIDEOSINK_WIDTH (ximagesink) ||
-          xwindow->height != GST_VIDEOSINK_HEIGHT (ximagesink))
+      if (gst_pad_is_negotiated (GST_VIDEOSINK_PAD (ximagesink)) &&
+          (xwindow->width != GST_VIDEOSINK_WIDTH (ximagesink) ||
+           xwindow->height != GST_VIDEOSINK_HEIGHT (ximagesink)))
         {
           GstPadLinkReturn r;
           r = gst_pad_try_set_caps (GST_VIDEOSINK_PAD (ximagesink),
index 34f18ec9843f1c90772457b247baa3b20114c295..51b604424d447f675bec42533a6a0782c44b56da 100644 (file)
@@ -1297,7 +1297,7 @@ gst_xvimagesink_colorbalance_get_value (GstColorBalance        *balance,
 static void
 gst_xvimagesink_colorbalance_init (GstColorBalanceClass *iface)
 {
-  iface->balance_type = GST_COLOR_BALANCE_HARDWARE;
+  GST_COLOR_BALANCE_TYPE (iface) = GST_COLOR_BALANCE_HARDWARE;
   iface->list_channels = gst_xvimagesink_colorbalance_list_channels;
   iface->set_value = gst_xvimagesink_colorbalance_set_value;
   iface->get_value = gst_xvimagesink_colorbalance_get_value;