2003-11-10 18:22:20 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2003> Julien Moutte <julien@moutte.net>
|
|
|
|
*
|
|
|
|
* 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_XVIMAGESINK_H__
|
|
|
|
#define __GST_XVIMAGESINK_H__
|
|
|
|
|
2003-11-19 20:43:49 +00:00
|
|
|
#include <gst/video/gstvideosink.h>
|
2003-11-10 18:22:20 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_XSHM
|
|
|
|
#include <sys/ipc.h>
|
|
|
|
#include <sys/shm.h>
|
|
|
|
#endif /* HAVE_XSHM */
|
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_XSHM
|
|
|
|
#include <X11/extensions/XShm.h>
|
|
|
|
#endif /* HAVE_XSHM */
|
|
|
|
|
|
|
|
#include <X11/extensions/Xv.h>
|
|
|
|
#include <X11/extensions/Xvlib.h>
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GST_TYPE_XVIMAGESINK \
|
|
|
|
(gst_xvimagesink_get_type())
|
|
|
|
#define GST_XVIMAGESINK(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_XVIMAGESINK, GstXvImageSink))
|
|
|
|
#define GST_XVIMAGESINK_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_XVIMAGESINK, GstXvImageSink))
|
|
|
|
#define GST_IS_XVIMAGESINK(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_XVIMAGESINK))
|
|
|
|
#define GST_IS_XVIMAGESINK_CLASS(obj) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XVIMAGESINK))
|
|
|
|
|
|
|
|
typedef struct _GstXContext GstXContext;
|
|
|
|
typedef struct _GstXWindow GstXWindow;
|
|
|
|
typedef struct _GstXvImage GstXvImage;
|
2003-11-28 21:47:51 +00:00
|
|
|
typedef struct _GstXvImageFormat GstXvImageFormat;
|
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
typedef struct _GstXvImageSink GstXvImageSink;
|
|
|
|
typedef struct _GstXvImageSinkClass GstXvImageSinkClass;
|
|
|
|
|
|
|
|
/* Global X Context stuff */
|
|
|
|
struct _GstXContext {
|
|
|
|
Display *disp;
|
|
|
|
|
|
|
|
Screen *screen;
|
|
|
|
gint screen_num;
|
|
|
|
|
|
|
|
Visual *visual;
|
|
|
|
|
|
|
|
Window root;
|
|
|
|
|
|
|
|
gulong white, black;
|
|
|
|
|
|
|
|
gint depth;
|
|
|
|
gint bpp;
|
|
|
|
gint endianness;
|
|
|
|
|
|
|
|
gboolean use_xshm;
|
|
|
|
|
|
|
|
XvPortID xv_port_id;
|
|
|
|
gint im_format;
|
|
|
|
|
2003-11-28 21:47:51 +00:00
|
|
|
GList *formats_list;
|
gst-libs/gst/colorbalance/colorbalancechannel.c: Adding safety check in dispose method.
Original commit message from CVS:
2004-01-12 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/colorbalance/colorbalancechannel.c:
(gst_color_balance_channel_dispose): Adding safety check in dispose
method.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xcontext_get),
(gst_xvimagesink_xcontext_clear),
(gst_xvimagesink_interface_supported),
(gst_xvimagesink_colorbalance_list_channels),
(gst_xvimagesink_colorbalance_set_value),
(gst_xvimagesink_colorbalance_get_value),
(gst_xvimagesink_colorbalance_init), (gst_xvimagesink_get_type):
Adding colorbalance interface support to set XV parameters such as
HUE, BRIGHTNESS, CONTRAST, SATURATION.
* sys/xvimage/xvimagesink.h: Adding the channels list for colorbalance
interface.
2004-01-12 19:50:29 +00:00
|
|
|
GList *channels_list;
|
2003-11-28 21:47:51 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
GstCaps *caps;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* XWindow stuff */
|
|
|
|
struct _GstXWindow {
|
|
|
|
Window win;
|
|
|
|
gint width, height;
|
2003-11-17 16:32:29 +00:00
|
|
|
gboolean internal;
|
2003-11-10 18:22:20 +00:00
|
|
|
GC gc;
|
|
|
|
};
|
|
|
|
|
2003-11-28 21:47:51 +00:00
|
|
|
/* XvImage format stuff */
|
|
|
|
struct _GstXvImageFormat {
|
|
|
|
gint format;
|
|
|
|
GstCaps *caps;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* XvImage stuff */
|
2003-11-10 18:22:20 +00:00
|
|
|
struct _GstXvImage {
|
2004-01-11 22:52:29 +00:00
|
|
|
/* Reference to the xvimagesink we belong to */
|
|
|
|
GstXvImageSink *xvimagesink;
|
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
XvImage *xvimage;
|
|
|
|
|
|
|
|
#ifdef HAVE_XSHM
|
|
|
|
XShmSegmentInfo SHMInfo;
|
|
|
|
#endif /* HAVE_XSHM */
|
|
|
|
|
|
|
|
char *data;
|
|
|
|
gint width, height, size;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstXvImageSink {
|
|
|
|
/* Our element stuff */
|
2003-11-19 20:43:49 +00:00
|
|
|
GstVideoSink videosink;
|
2003-11-10 18:22:20 +00:00
|
|
|
|
gst/videofilter/gstvideobalance.c: Fixing videobalance ranges for colorbalance interface implementation.
Original commit message from CVS:
2004-01-14 Julien MOUTTE <julien@moutte.net>
* gst/videofilter/gstvideobalance.c: (gst_videobalance_init),
(gst_videobalance_colorbalance_set_value),
(gst_videobalance_colorbalance_get_value): Fixing videobalance ranges
for colorbalance interface implementation.
* sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get),
(gst_ximagesink_set_property), (gst_ximagesink_get_property),
(gst_ximagesink_dispose), (gst_ximagesink_init),
(gst_ximagesink_class_init): Adding DISPLAY property.
* sys/ximage/ximagesink.h: Adding display_name to store display.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xcontext_get),
(gst_xvimagesink_set_property), (gst_xvimagesink_get_property),
(gst_xvimagesink_dispose), (gst_xvimagesink_init),
(gst_xvimagesink_class_init): Adding DISPLAY property and colorbalance
properties (they still need polishing though for gst-launch use : no
xcontext yet, i ll do that tomorrow).
* sys/xvimage/xvimagesink.h: Adding display_name to store display.
2004-01-14 23:01:49 +00:00
|
|
|
char *display_name;
|
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
GstXContext *xcontext;
|
|
|
|
GstXWindow *xwindow;
|
|
|
|
GstXvImage *xvimage;
|
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
gdouble framerate;
|
2003-11-10 18:22:20 +00:00
|
|
|
GMutex *x_lock;
|
|
|
|
|
|
|
|
/* Unused */
|
|
|
|
gint pixel_width, pixel_height;
|
2003-12-14 05:10:28 +00:00
|
|
|
|
|
|
|
GstClockTime time;
|
2003-11-10 18:22:20 +00:00
|
|
|
|
|
|
|
GMutex *pool_lock;
|
|
|
|
GSList *image_pool;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstXvImageSinkClass {
|
2003-11-19 20:43:49 +00:00
|
|
|
GstVideoSinkClass parent_class;
|
2003-11-10 18:22:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GType gst_xvimagesink_get_type(void);
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_XVIMAGESINK_H__ */
|