#define __GST_CACASINK_H__
#include <gst/gst.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" {
-#endif /* __cplusplus */
-
-
-#define GST_CACA_DEFAULT_IMAGE_WIDTH 320
-#define GST_CACA_DEFAULT_IMAGE_HEIGHT 240
-#define GST_CACA_DEFAULT_BPP 32
-#define GST_CACA_DEFAULT_RED_MASK R_MASK_32
-#define GST_CACA_DEFAULT_GREEN_MASK G_MASK_32
-#define GST_CACA_DEFAULT_BLUE_MASK B_MASK_32
+G_BEGIN_DECLS
#define GST_TYPE_CACASINK \
(gst_cacasink_get_type())
#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 {
- GstElement element;
-
- GstPad *sinkpad;
+ GstBaseSink parent;
- gulong format;
+ GstVideoInfo info;
gint screen_width, screen_height;
- gint image_width, image_height;
- guint bpp;
- guint dither;
- guint red_mask, green_mask, blue_mask;
-
- gint frames_displayed;
- guint64 frame_time;
- GstClock *clock;
+ guint dither;
+ gboolean antialiasing;
struct caca_bitmap *bitmap;
};
struct _GstCACASinkClass {
- GstElementClass parent_class;
+ GstBaseSinkClass parent_class;
/* signals */
- void (*frame_displayed) (GstElement *element);
- void (*have_size) (GstElement *element, guint width, guint height);
};
GType gst_cacasink_get_type(void);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+G_END_DECLS
-#endif /* __GST_CACASINKE_H__ */
+#endif /* __GST_CACASINK_H__ */