summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2009-10-19 17:07:40 +0200
committerBenjamin Otte <otte@gnome.org>2009-10-19 17:08:35 +0200
commit26f38fd45fce99a5df3fa19c490d1cb4b1c1a389 (patch)
tree5d3a34566aebd786246780ff5e930e3a3f736c19
parent12215317df20282a2c8736d395e1731725b1bb8d (diff)
Make GstCairoBuffer private
It's not needed in the public API anymore as Xlib stuff is handled in the lib now. Also includes some reorganization of included headers because of this.
-rw-r--r--gst-libs/gst/cairo/Makefile.am1
-rw-r--r--gst-libs/gst/cairo/gstcairobuffer-private.h63
-rw-r--r--gst-libs/gst/cairo/gstcairobuffer.c1
-rw-r--r--gst-libs/gst/cairo/gstcairobuffer.h29
-rw-r--r--gst-libs/gst/cairo/gstcairoxbuffer.h3
-rw-r--r--gst-libs/gst/cairo/gstcairoxdisplay.c2
-rw-r--r--gst-libs/gst/cairo/gstcairoxdisplay.h2
7 files changed, 70 insertions, 31 deletions
diff --git a/gst-libs/gst/cairo/Makefile.am b/gst-libs/gst/cairo/Makefile.am
index 71f2a4b..9ad0587 100644
--- a/gst-libs/gst/cairo/Makefile.am
+++ b/gst-libs/gst/cairo/Makefile.am
@@ -23,6 +23,7 @@ libgstcairo_@GST_MAJORMINOR@_la_SOURCES += \
endif
noinst_HEADERS = \
+ gstcairobuffer-private.h \
gstcairocaps2format.h \
gstcairoformat-private.h \
gstcairoxbuffer.h \
diff --git a/gst-libs/gst/cairo/gstcairobuffer-private.h b/gst-libs/gst/cairo/gstcairobuffer-private.h
new file mode 100644
index 0000000..ddda0d1
--- /dev/null
+++ b/gst-libs/gst/cairo/gstcairobuffer-private.h
@@ -0,0 +1,63 @@
+/* GStreamer
+ * Copyright (C) 2009 Benjamin Otte <otte@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GST_CAIRO_BUFFER_PRIVATE_H__
+#define __GST_CAIRO_BUFFER_PRIVATE_H__
+
+#include <cairo.h>
+#include <gst/gst.h>
+#include <gst/cairo/gstcairoformat.h>
+
+G_BEGIN_DECLS
+
+
+typedef struct _GstCairoBuffer GstCairoBuffer;
+typedef struct _GstCairoBufferClass GstCairoBufferClass;
+
+#define GST_TYPE_CAIRO_BUFFER (gst_cairo_buffer_get_type())
+#define GST_CAIRO_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CAIRO_BUFFER, GstCairoBuffer))
+#define GST_IS_CAIRO_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CAIRO_BUFFER))
+#define GST_IS_CAIRO_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_CAIRO_BUFFER))
+#define GST_CAIRO_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CAIRO_BUFFER, GstCairoBufferClass))
+#define GST_CAIRO_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_CAIRO_BUFFER, GstCairoBufferClass))
+
+struct _GstCairoBuffer {
+ GstBuffer buffer;
+
+ /*< protected >*/
+ gboolean fixed; /* TRUE when get_surface has been called */
+ /*< private >*/
+ GstCairoFormat * format; /* format of buffer, can be changed while !fixed */
+};
+
+struct _GstCairoBufferClass {
+ GstBufferClass buffer_class;
+
+ cairo_surface_t * (* get_surface) (GstBuffer * buffer,
+ cairo_surface_t * similar,
+ const GstCairoFormat * format);
+};
+
+GType gst_cairo_buffer_get_type (void);
+
+
+G_END_DECLS
+
+#endif /* __GST_CAIRO_BUFFER_PRIVATE_H__ */
+
diff --git a/gst-libs/gst/cairo/gstcairobuffer.c b/gst-libs/gst/cairo/gstcairobuffer.c
index fea057c..7a70af8 100644
--- a/gst-libs/gst/cairo/gstcairobuffer.c
+++ b/gst-libs/gst/cairo/gstcairobuffer.c
@@ -23,6 +23,7 @@
#include "gstcairobuffer.h"
+#include "gstcairobuffer-private.h"
#include "gstcairoformat-private.h"
#ifdef HAVE_XLIB
# include "gstcairoxbuffer.h"
diff --git a/gst-libs/gst/cairo/gstcairobuffer.h b/gst-libs/gst/cairo/gstcairobuffer.h
index 855a3b6..038d33c 100644
--- a/gst-libs/gst/cairo/gstcairobuffer.h
+++ b/gst-libs/gst/cairo/gstcairobuffer.h
@@ -27,35 +27,6 @@
G_BEGIN_DECLS
-typedef struct _GstCairoBuffer GstCairoBuffer;
-typedef struct _GstCairoBufferClass GstCairoBufferClass;
-
-#define GST_TYPE_CAIRO_BUFFER (gst_cairo_buffer_get_type())
-#define GST_CAIRO_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CAIRO_BUFFER, GstCairoBuffer))
-#define GST_IS_CAIRO_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CAIRO_BUFFER))
-#define GST_IS_CAIRO_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_CAIRO_BUFFER))
-#define GST_CAIRO_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CAIRO_BUFFER, GstCairoBufferClass))
-#define GST_CAIRO_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_CAIRO_BUFFER, GstCairoBufferClass))
-
-struct _GstCairoBuffer {
- GstBuffer buffer;
-
- /*< protected >*/
- gboolean fixed; /* TRUE when get_surface has been called */
- /*< private >*/
- GstCairoFormat * format; /* format of buffer, can be changed while !fixed */
-};
-
-struct _GstCairoBufferClass {
- GstBufferClass buffer_class;
-
- cairo_surface_t * (* get_surface) (GstBuffer * buffer,
- cairo_surface_t * similar,
- const GstCairoFormat * format);
-};
-
-GType gst_cairo_buffer_get_type (void);
-
GstBuffer * gst_cairo_buffer_new (const GstCairoFormat * format);
GstBuffer * gst_cairo_buffer_new_similar (cairo_surface_t * surface,
const GstCairoFormat * format);
diff --git a/gst-libs/gst/cairo/gstcairoxbuffer.h b/gst-libs/gst/cairo/gstcairoxbuffer.h
index b8d9bb0..f70c3ac 100644
--- a/gst-libs/gst/cairo/gstcairoxbuffer.h
+++ b/gst-libs/gst/cairo/gstcairoxbuffer.h
@@ -20,7 +20,8 @@
#ifndef __GST_CAIRO_X_BUFFER_H__
#define __GST_CAIRO_X_BUFFER_H__
-#include <gst/cairo/gstcairobuffer.h>
+#include "gstcairobuffer.h"
+#include "gstcairobuffer-private.h"
#include "gstcairoxdisplay.h"
G_BEGIN_DECLS
diff --git a/gst-libs/gst/cairo/gstcairoxdisplay.c b/gst-libs/gst/cairo/gstcairoxdisplay.c
index efc532e..4fe7648 100644
--- a/gst-libs/gst/cairo/gstcairoxdisplay.c
+++ b/gst-libs/gst/cairo/gstcairoxdisplay.c
@@ -41,6 +41,8 @@
#include <X11/Xlibint.h>
#include <X11/Xutil.h>
+#include "gstcairoxbuffer.h"
+
G_LOCK_DEFINE_STATIC (dlock);
#define DISPLAY_LOCK() G_LOCK (dlock)
#define DISPLAY_UNLOCK() G_UNLOCK (dlock)
diff --git a/gst-libs/gst/cairo/gstcairoxdisplay.h b/gst-libs/gst/cairo/gstcairoxdisplay.h
index 229c451..a7d470e 100644
--- a/gst-libs/gst/cairo/gstcairoxdisplay.h
+++ b/gst-libs/gst/cairo/gstcairoxdisplay.h
@@ -20,7 +20,7 @@
#ifndef __GST_CAIRO_X_DISPLAY_H__
#define __GST_CAIRO_X_DISPLAY_H__
-#include <gst/cairo/gstcairo.h>
+#include <glib.h>
#include <X11/Xlib.h>
G_BEGIN_DECLS