2 * Copyright (C) <2003> Julien Moutte <julien@moutte.net>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __GST_XIMAGESINK_H__
21 #define __GST_XIMAGESINK_H__
23 #include <gst/video/videosink.h>
26 #include <sys/types.h>
29 #endif /* HAVE_XSHM */
32 #include <X11/Xutil.h>
35 #include <X11/extensions/XShm.h>
36 #endif /* HAVE_XSHM */
43 #define GST_TYPE_XIMAGESINK \
44 (gst_ximagesink_get_type())
45 #define GST_XIMAGESINK(obj) \
46 (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_XIMAGESINK, GstXImageSink))
47 #define GST_XIMAGESINK_CLASS(klass) \
48 (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_XIMAGESINK, GstXImageSink))
49 #define GST_IS_XIMAGESINK(obj) \
50 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_XIMAGESINK))
51 #define GST_IS_XIMAGESINK_CLASS(obj) \
52 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XIMAGESINK))
54 typedef struct _GstXContext GstXContext;
55 typedef struct _GstXWindow GstXWindow;
56 typedef struct _GstXImage GstXImage;
58 typedef struct _GstXImageSink GstXImageSink;
59 typedef struct _GstXImageSinkClass GstXImageSinkClass;
61 /* Global X Context stuff */
79 gint widthmm, heightmm;
80 GValue *par; /* calculated pixel aspect ratio */
97 /* Reference to the ximagesink we belong to */
98 GstXImageSink *ximagesink;
103 XShmSegmentInfo SHMInfo;
104 #endif /* HAVE_XSHM */
106 gint width, height, size;
109 struct _GstXImageSink {
110 /* Our element stuff */
111 GstVideoSink videosink;
116 GstXContext *xcontext;
119 GstXImage *cur_image;
125 gint pixel_width, pixel_height;
126 GValue *par; /* object-set pixel aspect ratio */
133 gboolean synchronous;
134 gboolean sw_scaling_failed;
137 struct _GstXImageSinkClass {
138 GstVideoSinkClass parent_class;
141 GType gst_ximagesink_get_type(void);
145 #endif /* __GST_XIMAGESINK_H__ */