ext/libcaca/gstcacasink.c: Fix width and height properties.
[platform/upstream/gst-plugins-good.git] / ext / libcaca / gstcacasink.h
index 3a6d4f2..f955f63 100644 (file)
 #define __GST_CACASINK_H__
 
 #include <gst/gst.h>
-#include <gst/video/videosink.h>
+#include <gst/base/gstbasesink.h>
 #include <gst/video/video.h>
 
 #include <caca.h>
+#ifdef CACA_API_VERSION_1
+#   include <caca0.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -47,41 +50,33 @@ extern "C" {
 #define GST_CACASINK(obj) \
   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CACASINK,GstCACASink))
 #define GST_CACASINK_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CACASINK,GstCACASink))
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CACASINK,GstCACASinkClass))
 #define GST_IS_CACASINK(obj) \
   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CACASINK))
-#define GST_IS_CACASINK_CLASS(obj) \
+#define GST_IS_CACASINK_CLASS(klass) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CACASINK))
 
-typedef enum {
-  GST_CACASINK_OPEN              = GST_ELEMENT_FLAG_LAST,
-
-  GST_CACASINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
-} GstCACASinkFlags;
-
 typedef struct _GstCACASink GstCACASink;
 typedef struct _GstCACASinkClass GstCACASinkClass;
 
 struct _GstCACASink {
-  GstVideoSink videosink;
+  GstBaseSink parent;
 
   GstPad *sinkpad;
 
   gulong format;
+  gint width, height;
   gint screen_width, screen_height;
   guint bpp;
   guint dither;
   gboolean antialiasing;
   guint red_mask, green_mask, blue_mask;
 
-  gint64 correction;
-  GstClockID id;
-
   struct caca_bitmap *bitmap;
 };
 
 struct _GstCACASinkClass {
-  GstVideoSinkClass parent_class;
+  GstBaseSinkClass parent_class;
 
   /* signals */
 };