2003-11-10 18:22:20 +00:00
|
|
|
/* GStreamer
|
2005-11-27 18:12:23 +00:00
|
|
|
* Copyright (C) <2005> Julien Moutte <julien@moutte.net>
|
2003-11-10 18:22:20 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
#ifndef __GST_XVIMAGESINK_H__
|
|
|
|
#define __GST_XVIMAGESINK_H__
|
|
|
|
|
2005-11-28 17:32:55 +00:00
|
|
|
#include <gst/video/gstvideosink.h>
|
2003-11-10 18:22:20 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_XSHM
|
2004-04-16 23:42:12 +00:00
|
|
|
#include <sys/types.h>
|
2003-11-10 18:22:20 +00:00
|
|
|
#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>
|
2007-04-20 10:42:24 +00:00
|
|
|
#include <stdlib.h>
|
2003-11-10 18:22:20 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
#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) \
|
2006-06-01 19:19:51 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_XVIMAGESINK, GstXvImageSinkClass))
|
2003-11-10 18:22:20 +00:00
|
|
|
#define GST_IS_XVIMAGESINK(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_XVIMAGESINK))
|
2006-06-01 19:19:51 +00:00
|
|
|
#define GST_IS_XVIMAGESINK_CLASS(klass) \
|
2003-11-10 18:22:20 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XVIMAGESINK))
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
typedef struct _GstXContext GstXContext;
|
|
|
|
typedef struct _GstXWindow GstXWindow;
|
2003-11-28 21:47:51 +00:00
|
|
|
typedef struct _GstXvImageFormat GstXvImageFormat;
|
sys/: Port xvimagesink to new MiniObject.
Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimage_buffer_finalize),
(gst_xvimage_buffer_init), (gst_xvimage_buffer_class_init),
(gst_xvimage_buffer_get_type), (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_put),
(gst_xvimagesink_imagepool_clear), (gst_xvimagesink_setcaps),
(gst_xvimagesink_change_state), (gst_xvimagesink_show_frame),
(gst_xvimagesink_buffer_free), (gst_xvimagesink_buffer_alloc),
(gst_xvimagesink_set_xwindow_id):
* sys/xvimage/xvimagesink.h:
Port xvimagesink to new MiniObject.
2005-05-17 12:00:42 +00:00
|
|
|
typedef struct _GstXvImageBuffer GstXvImageBuffer;
|
|
|
|
typedef struct _GstXvImageBufferClass GstXvImageBufferClass;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
typedef struct _GstXvImageSink GstXvImageSink;
|
|
|
|
typedef struct _GstXvImageSinkClass GstXvImageSinkClass;
|
|
|
|
|
2008-10-22 12:29:30 +00:00
|
|
|
/*
|
2005-11-27 11:41:55 +00:00
|
|
|
* GstXContext:
|
|
|
|
* @disp: the X11 Display of this context
|
|
|
|
* @screen: the default Screen of Display @disp
|
|
|
|
* @screen_num: the Screen number of @screen
|
|
|
|
* @visual: the default Visual of Screen @screen
|
|
|
|
* @root: the root Window of Display @disp
|
|
|
|
* @white: the value of a white pixel on Screen @screen
|
|
|
|
* @black: the value of a black pixel on Screen @screen
|
|
|
|
* @depth: the color depth of Display @disp
|
|
|
|
* @bpp: the number of bits per pixel on Display @disp
|
|
|
|
* @endianness: the endianness of image bytes on Display @disp
|
|
|
|
* @width: the width in pixels of Display @disp
|
|
|
|
* @height: the height in pixels of Display @disp
|
|
|
|
* @widthmm: the width in millimeters of Display @disp
|
|
|
|
* @heightmm: the height in millimeters of Display @disp
|
2007-04-20 10:42:24 +00:00
|
|
|
* @par: the pixel aspect ratio calculated from @width, @widthmm and @height,
|
2005-11-27 11:41:55 +00:00
|
|
|
* @heightmm ratio
|
|
|
|
* @use_xshm: used to known wether of not XShm extension is usable or not even
|
|
|
|
* if the Extension is present
|
|
|
|
* @xv_port_id: the XVideo port ID
|
|
|
|
* @im_format: used to store at least a valid format for XShm calls checks
|
|
|
|
* @formats_list: list of supported image formats on @xv_port_id
|
|
|
|
* @channels_list: list of #GstColorBalanceChannels
|
|
|
|
* @caps: the #GstCaps that Display @disp can accept
|
|
|
|
*
|
|
|
|
* Structure used to store various informations collected/calculated for a
|
|
|
|
* Display.
|
|
|
|
*/
|
2004-03-15 16:32:55 +00:00
|
|
|
struct _GstXContext {
|
2003-11-10 18:22:20 +00:00
|
|
|
Display *disp;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
Screen *screen;
|
|
|
|
gint screen_num;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
Visual *visual;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
Window root;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
gulong white, black;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
gint depth;
|
|
|
|
gint bpp;
|
|
|
|
gint endianness;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2004-07-27 16:43:24 +00:00
|
|
|
gint width, height;
|
|
|
|
gint widthmm, heightmm;
|
2004-08-02 10:04:08 +00:00
|
|
|
GValue *par; /* calculated pixel aspect ratio */
|
2004-07-27 16:43:24 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
gboolean use_xshm;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
XvPortID xv_port_id;
|
sys/xvimage/xvimagesink.*: Implement PropertyProbe Interface for XVAdaptors so that one can choose the adaptor to use...
Original commit message from CVS:
2007-02-06 Julien MOUTTE <julien@moutte.net>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_handle_xevents),
(gst_xvimagesink_get_xv_support),
(gst_xvimagesink_xcontext_clear),
(gst_xvimagesink_interface_supported),
(gst_xvimagesink_probe_get_properties),
(gst_xvimagesink_probe_probe_property),
(gst_xvimagesink_probe_needs_probe),
(gst_xvimagesink_probe_get_values),
(gst_xvimagesink_property_probe_interface_init),
(gst_xvimagesink_set_property), (gst_xvimagesink_get_property),
(gst_xvimagesink_init), (gst_xvimagesink_class_init),
(gst_xvimagesink_get_type):
* sys/xvimage/xvimagesink.h: Implement PropertyProbe Interface
for XVAdaptors so that one can choose the adaptor to use with
gstreamer-properties.
2007-02-06 17:47:32 +00:00
|
|
|
guint nb_adaptors;
|
|
|
|
gchar ** adaptors;
|
2003-11-10 18:22:20 +00:00
|
|
|
gint im_format;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
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;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
GstCaps *caps;
|
2006-05-19 11:50:17 +00:00
|
|
|
|
|
|
|
/* Optimisation storage for buffer_alloc return */
|
|
|
|
GstCaps *last_caps;
|
|
|
|
gint last_format;
|
2008-11-13 18:18:32 +00:00
|
|
|
gint last_width;
|
|
|
|
gint last_height;
|
2003-11-10 18:22:20 +00:00
|
|
|
};
|
|
|
|
|
2008-10-22 12:29:30 +00:00
|
|
|
/*
|
2005-11-27 11:41:55 +00:00
|
|
|
* GstXWindow:
|
|
|
|
* @win: the Window ID of this X11 window
|
|
|
|
* @width: the width in pixels of Window @win
|
|
|
|
* @height: the height in pixels of Window @win
|
|
|
|
* @internal: used to remember if Window @win was created internally or passed
|
|
|
|
* through the #GstXOverlay interface
|
|
|
|
* @gc: the Graphical Context of Window @win
|
|
|
|
*
|
|
|
|
* Structure used to store informations about a Window.
|
|
|
|
*/
|
2004-03-15 16:32:55 +00:00
|
|
|
struct _GstXWindow {
|
2003-11-10 18:22:20 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
/**
|
|
|
|
* GstXvImageFormat:
|
|
|
|
* @format: the image format
|
|
|
|
* @caps: generated #GstCaps for this image format
|
|
|
|
*
|
|
|
|
* Structure storing image format to #GstCaps association.
|
|
|
|
*/
|
2004-03-15 16:32:55 +00:00
|
|
|
struct _GstXvImageFormat {
|
2003-11-28 21:47:51 +00:00
|
|
|
gint format;
|
|
|
|
GstCaps *caps;
|
|
|
|
};
|
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
/**
|
|
|
|
* GstXImageBuffer:
|
|
|
|
* @xvimagesink: a reference to our #GstXvImageSink
|
|
|
|
* @xvimage: the XvImage of this buffer
|
|
|
|
* @width: the width in pixels of XvImage @xvimage
|
|
|
|
* @height: the height in pixels of XvImage @xvimage
|
|
|
|
* @im_format: the image format of XvImage @xvimage
|
|
|
|
* @size: the size in bytes of XvImage @xvimage
|
|
|
|
*
|
|
|
|
* Subclass of #GstBuffer containing additional information about an XvImage.
|
|
|
|
*/
|
sys/: Port xvimagesink to new MiniObject.
Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimage_buffer_finalize),
(gst_xvimage_buffer_init), (gst_xvimage_buffer_class_init),
(gst_xvimage_buffer_get_type), (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_put),
(gst_xvimagesink_imagepool_clear), (gst_xvimagesink_setcaps),
(gst_xvimagesink_change_state), (gst_xvimagesink_show_frame),
(gst_xvimagesink_buffer_free), (gst_xvimagesink_buffer_alloc),
(gst_xvimagesink_set_xwindow_id):
* sys/xvimage/xvimagesink.h:
Port xvimagesink to new MiniObject.
2005-05-17 12:00:42 +00:00
|
|
|
struct _GstXvImageBuffer {
|
|
|
|
GstBuffer buffer;
|
|
|
|
|
2004-01-11 22:52:29 +00:00
|
|
|
/* Reference to the xvimagesink we belong to */
|
|
|
|
GstXvImageSink *xvimagesink;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
XvImage *xvimage;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
#ifdef HAVE_XSHM
|
|
|
|
XShmSegmentInfo SHMInfo;
|
2004-03-15 16:32:55 +00:00
|
|
|
#endif /* HAVE_XSHM */
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
gint width, height, im_format;
|
|
|
|
size_t size;
|
2003-11-10 18:22:20 +00:00
|
|
|
};
|
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
/**
|
|
|
|
* GstXvImageSink:
|
|
|
|
* @display_name: the name of the Display we want to render to
|
|
|
|
* @xcontext: our instance's #GstXContext
|
|
|
|
* @xwindow: the #GstXWindow we are rendering to
|
|
|
|
* @xvimage: internal #GstXvImage used to store incoming buffers and render when
|
|
|
|
* not using the buffer_alloc optimization mechanism
|
|
|
|
* @cur_image: a reference to the last #GstXvImage that was put to @xwindow. It
|
|
|
|
* is used when Expose events are received to redraw the latest video frame
|
|
|
|
* @event_thread: a thread listening for events on @xwindow and handling them
|
|
|
|
* @running: used to inform @event_thread if it should run/shutdown
|
|
|
|
* @fps_n: the framerate fraction numerator
|
|
|
|
* @fps_d: the framerate fraction denominator
|
|
|
|
* @x_lock: used to protect X calls as we are not using the XLib in threaded
|
|
|
|
* mode
|
|
|
|
* @flow_lock: used to protect data flow routines from external calls such as
|
|
|
|
* events from @event_thread or methods from the #GstXOverlay interface
|
|
|
|
* @par: used to override calculated pixel aspect ratio from @xcontext
|
|
|
|
* @pool_lock: used to protect the buffer pool
|
|
|
|
* @image_pool: a list of #GstXvImageBuffer that could be reused at next buffer
|
|
|
|
* allocation call
|
2007-04-20 10:42:24 +00:00
|
|
|
* @synchronous: used to store if XSynchronous should be used or not (for
|
2005-11-27 11:41:55 +00:00
|
|
|
* debugging purpose only)
|
|
|
|
* @keep_aspect: used to remember if reverse negotiation scaling should respect
|
|
|
|
* aspect ratio
|
Add a method to the XOverlay interface to allow disabling of event handling in x[v]imagesink elements. This will let ...
Original commit message from CVS:
2007-01-04 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/interfaces/xoverlay.c:
(gst_x_overlay_handle_events):
* gst-libs/gst/interfaces/xoverlay.h:
* sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_new),
(gst_ximagesink_set_xwindow_id),
(gst_ximagesink_set_event_handling),
(gst_ximagesink_xoverlay_init), (gst_ximagesink_set_property),
(gst_ximagesink_get_property), (gst_ximagesink_init),
(gst_ximagesink_class_init):
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_new),
(gst_xvimagesink_set_xwindow_id),
(gst_xvimagesink_set_event_handling),
(gst_xvimagesink_xoverlay_init), (gst_xvimagesink_set_property),
(gst_xvimagesink_get_property), (gst_xvimagesink_init),
(gst_xvimagesink_class_init):
* sys/xvimage/xvimagesink.h:
* tests/icles/stress-xoverlay.c: (toggle_events),
(create_window):
Add a method to the XOverlay interface to allow disabling of
event handling in x[v]imagesink elements. This will let X events
propagate to parent windows which can be usefull in some cases.
Be carefull that the application is then responsible of pushing
navigation events and expose events to the video sink.
Fixes: #387138.
2007-01-04 11:30:53 +00:00
|
|
|
* @handle_events: used to know if we should handle select XEvents or not
|
2005-11-27 11:41:55 +00:00
|
|
|
* @brightness: used to store the user settings for color balance brightness
|
|
|
|
* @contrast: used to store the user settings for color balance contrast
|
|
|
|
* @hue: used to store the user settings for color balance hue
|
|
|
|
* @saturation: used to store the user settings for color balance saturation
|
|
|
|
* @cb_changed: used to store if the color balance settings where changed
|
|
|
|
* @video_width: the width of incoming video frames in pixels
|
|
|
|
* @video_height: the height of incoming video frames in pixels
|
|
|
|
*
|
|
|
|
* The #GstXvImageSink data structure.
|
|
|
|
*/
|
2004-03-15 16:32:55 +00:00
|
|
|
struct _GstXvImageSink {
|
2003-11-10 18:22:20 +00:00
|
|
|
/* Our element stuff */
|
2003-11-19 20:43:49 +00:00
|
|
|
GstVideoSink videosink;
|
2004-07-19 11:21:10 +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;
|
sys/xvimage/xvimagesink.*: Implement PropertyProbe Interface for XVAdaptors so that one can choose the adaptor to use...
Original commit message from CVS:
2007-02-06 Julien MOUTTE <julien@moutte.net>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_handle_xevents),
(gst_xvimagesink_get_xv_support),
(gst_xvimagesink_xcontext_clear),
(gst_xvimagesink_interface_supported),
(gst_xvimagesink_probe_get_properties),
(gst_xvimagesink_probe_probe_property),
(gst_xvimagesink_probe_needs_probe),
(gst_xvimagesink_probe_get_values),
(gst_xvimagesink_property_probe_interface_init),
(gst_xvimagesink_set_property), (gst_xvimagesink_get_property),
(gst_xvimagesink_init), (gst_xvimagesink_class_init),
(gst_xvimagesink_get_type):
* sys/xvimage/xvimagesink.h: Implement PropertyProbe Interface
for XVAdaptors so that one can choose the adaptor to use with
gstreamer-properties.
2007-02-06 17:47:32 +00:00
|
|
|
guint adaptor_no;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
GstXContext *xcontext;
|
|
|
|
GstXWindow *xwindow;
|
sys/: Port xvimagesink to new MiniObject.
Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimage_buffer_finalize),
(gst_xvimage_buffer_init), (gst_xvimage_buffer_class_init),
(gst_xvimage_buffer_get_type), (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_put),
(gst_xvimagesink_imagepool_clear), (gst_xvimagesink_setcaps),
(gst_xvimagesink_change_state), (gst_xvimagesink_show_frame),
(gst_xvimagesink_buffer_free), (gst_xvimagesink_buffer_alloc),
(gst_xvimagesink_set_xwindow_id):
* sys/xvimage/xvimagesink.h:
Port xvimagesink to new MiniObject.
2005-05-17 12:00:42 +00:00
|
|
|
GstXvImageBuffer *xvimage;
|
|
|
|
GstXvImageBuffer *cur_image;
|
2007-04-20 10:42:24 +00:00
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
GThread *event_thread;
|
|
|
|
gboolean running;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
Convert elements to use fractions for their framerate.
Original commit message from CVS:
* ext/libvisual/visual.c: (gst_visual_src_setcaps), (get_buffer),
(gst_visual_chain):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_chain):
* ext/theora/theoradec.c: (theora_handle_type_packet):
* ext/theora/theoraenc.c: (theora_enc_sink_setcaps),
(theora_enc_chain):
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps):
* gst-libs/gst/video/video.c: (gst_video_frame_rate):
* gst-libs/gst/video/video.h:
* gst/ffmpegcolorspace/avcodec.h:
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
(gst_ffmpeg_caps_to_pixfmt):
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
(gst_ffmpegcsp_set_caps):
* gst/videorate/gstvideorate.c: (gst_videorate_transformcaps),
(gst_videorate_setcaps), (gst_videorate_blank_data),
(gst_videorate_chain):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_videotestsrc_src_fixate), (gst_videotestsrc_getcaps),
(gst_videotestsrc_parse_caps), (gst_videotestsrc_setcaps),
(gst_videotestsrc_event), (gst_videotestsrc_create):
* gst/videotestsrc/gstvideotestsrc.h:
* sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get),
(gst_ximagesink_setcaps), (gst_ximagesink_change_state),
(gst_ximagesink_get_times), (gst_ximagesink_init):
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support),
(gst_xvimagesink_setcaps), (gst_xvimagesink_change_state),
(gst_xvimagesink_get_times), (gst_xvimagesink_init):
* sys/xvimage/xvimagesink.h:
Convert elements to use fractions for their framerate.
V4L elements to come later tonight.
2005-11-22 16:08:37 +00:00
|
|
|
gint fps_n;
|
|
|
|
gint fps_d;
|
2007-04-20 10:42:24 +00:00
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
GMutex *x_lock;
|
|
|
|
GMutex *flow_lock;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
/* object-set pixel aspect ratio */
|
|
|
|
GValue *par;
|
2007-04-20 10:42:24 +00:00
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
GMutex *pool_lock;
|
2009-02-25 12:16:32 +00:00
|
|
|
gboolean pool_invalid;
|
2005-11-27 11:41:55 +00:00
|
|
|
GSList *image_pool;
|
2007-04-20 10:42:24 +00:00
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
gboolean synchronous;
|
2007-07-14 18:33:15 +00:00
|
|
|
gboolean double_buffer;
|
2005-11-27 11:41:55 +00:00
|
|
|
gboolean keep_aspect;
|
2008-09-04 13:46:52 +00:00
|
|
|
gboolean redraw_border;
|
Add a method to the XOverlay interface to allow disabling of event handling in x[v]imagesink elements. This will let ...
Original commit message from CVS:
2007-01-04 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/interfaces/xoverlay.c:
(gst_x_overlay_handle_events):
* gst-libs/gst/interfaces/xoverlay.h:
* sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_new),
(gst_ximagesink_set_xwindow_id),
(gst_ximagesink_set_event_handling),
(gst_ximagesink_xoverlay_init), (gst_ximagesink_set_property),
(gst_ximagesink_get_property), (gst_ximagesink_init),
(gst_ximagesink_class_init):
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_new),
(gst_xvimagesink_set_xwindow_id),
(gst_xvimagesink_set_event_handling),
(gst_xvimagesink_xoverlay_init), (gst_xvimagesink_set_property),
(gst_xvimagesink_get_property), (gst_xvimagesink_init),
(gst_xvimagesink_class_init):
* sys/xvimage/xvimagesink.h:
* tests/icles/stress-xoverlay.c: (toggle_events),
(create_window):
Add a method to the XOverlay interface to allow disabling of
event handling in x[v]imagesink elements. This will let X events
propagate to parent windows which can be usefull in some cases.
Be carefull that the application is then responsible of pushing
navigation events and expose events to the video sink.
Fixes: #387138.
2007-01-04 11:30:53 +00:00
|
|
|
gboolean handle_events;
|
2007-07-14 18:20:41 +00:00
|
|
|
gboolean handle_expose;
|
2007-04-20 10:42:24 +00:00
|
|
|
|
sys/xvimage/xvimagesink.c: Implementing correct colorbalance properties. They can now be set when the element is stil...
Original commit message from CVS:
2004-01-16 Julien MOUTTE <julien@moutte.net>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_update_colorbalance),
(gst_xvimagesink_xcontext_get), (gst_xvimagesink_change_state),
(gst_xvimagesink_set_xwindow_id),
(gst_xvimagesink_colorbalance_set_value),
(gst_xvimagesink_colorbalance_get_value),
(gst_xvimagesink_set_property), (gst_xvimagesink_get_property),
(gst_xvimagesink_init), (gst_xvimagesink_class_init): Implementing
correct colorbalance properties. They can now be set when the element
is still in NULL state. The values will be committed to the Xv Port
when xcontext is initialized.
* sys/xvimage/xvimagesink.h: Added hue, saturation, contrast,
brightness int values in the GstXvImagesink structure.
2004-01-16 15:43:35 +00:00
|
|
|
gint brightness;
|
|
|
|
gint contrast;
|
|
|
|
gint hue;
|
|
|
|
gint saturation;
|
gst-libs/gst/play/gstplay.c: Reworked the pipeline from scratch. Visualization is back and switch went out as i reali...
Original commit message from CVS:
2004-01-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/play/gstplay.c: (gst_play_pipeline_setup),
(gst_play_set_location), (gst_play_seek_to_time),
(gst_play_set_audio_sink), (gst_play_set_visualization),
(gst_play_connect_visualization), (gst_play_get_sink_element): Reworked
the pipeline from scratch. Visualization is back and switch went out as
i realized it was not possible to use the way i wanted.
* sys/ximage/ximagesink.c: (gst_ximagesink_imagepool_clear),
(gst_ximagesink_change_state), (gst_ximagesink_dispose): Move xcontext
clearing in state change from READY to NULL. So that one can clean the
X ressources keeping the element.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xcontext_get),
(gst_xvimagesink_imagepool_clear), (gst_xvimagesink_change_state),
(gst_xvimagesink_colorbalance_set_value),
(gst_xvimagesink_colorbalance_get_value),
(gst_xvimagesink_set_property), (gst_xvimagesink_dispose),
(gst_xvimagesink_init): Same xcontext cleaning than ximagesink in state
change from READY to NULL and fixed some stupid bugs in colorbalance
get/set values. Also added the following feature : when nobody tries to
set some values to the colorbalance levels before the xcontext is
grabbed, then when creating channels list from Xv attributes we set the
internal values to the Xv defaults. This way we handle buggy Xv drivers
that set default hue values far from the middle of the range (Thanks
to Jon Trowbridge for pointing that issue).
* sys/xvimage/xvimagesink.h: Adding a cb_changed boolean to know if
colorbalance levels have been set before xcontext is grabbed.
2004-01-22 23:54:34 +00:00
|
|
|
gboolean cb_changed;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2008-07-29 08:59:32 +00:00
|
|
|
/* size of incoming video, used as the size for XvImage */
|
|
|
|
guint video_width, video_height;
|
|
|
|
|
2008-11-13 18:18:32 +00:00
|
|
|
/* display sizes, used for clipping the image */
|
|
|
|
gint disp_x, disp_y;
|
|
|
|
gint disp_width, disp_height;
|
|
|
|
|
2008-07-29 08:59:32 +00:00
|
|
|
/* port attributes */
|
|
|
|
gboolean autopaint_colorkey;
|
|
|
|
gint colorkey;
|
2008-09-04 13:46:52 +00:00
|
|
|
|
|
|
|
gboolean draw_borders;
|
2008-10-22 12:25:02 +00:00
|
|
|
|
|
|
|
/* port features */
|
|
|
|
gboolean have_autopaint_colorkey;
|
|
|
|
gboolean have_colorkey;
|
|
|
|
gboolean have_double_buffer;
|
2003-11-10 18:22:20 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 16:32:55 +00:00
|
|
|
struct _GstXvImageSinkClass {
|
2003-11-19 20:43:49 +00:00
|
|
|
GstVideoSinkClass parent_class;
|
2003-11-10 18:22:20 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 16:32:55 +00:00
|
|
|
GType gst_xvimagesink_get_type(void);
|
2003-11-10 18:22:20 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2003-11-10 18:22:20 +00:00
|
|
|
#endif /* __GST_XVIMAGESINK_H__ */
|