2003-11-06 21:51:14 +00:00
|
|
|
/* GStreamer
|
2005-11-27 18:12:23 +00:00
|
|
|
* Copyright (C) <2005> Julien Moutte <julien@moutte.net>
|
2003-11-06 21:51:14 +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-06 21:51:14 +00:00
|
|
|
#ifndef __GST_XIMAGESINK_H__
|
|
|
|
#define __GST_XIMAGESINK_H__
|
|
|
|
|
2005-11-28 17:32:55 +00:00
|
|
|
#include <gst/video/gstvideosink.h>
|
2003-11-06 21:51:14 +00:00
|
|
|
|
2003-11-12 03:06:07 +00:00
|
|
|
#ifdef HAVE_XSHM
|
2004-04-16 23:42:12 +00:00
|
|
|
#include <sys/types.h>
|
2003-11-06 21:51:14 +00:00
|
|
|
#include <sys/ipc.h>
|
|
|
|
#include <sys/shm.h>
|
2003-11-12 03:06:07 +00:00
|
|
|
#endif /* HAVE_XSHM */
|
2003-11-06 21:51:14 +00:00
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
|
2003-11-12 03:06:07 +00:00
|
|
|
#ifdef HAVE_XSHM
|
2003-11-06 21:51:14 +00:00
|
|
|
#include <X11/extensions/XShm.h>
|
2003-11-12 03:06:07 +00:00
|
|
|
#endif /* HAVE_XSHM */
|
2003-11-06 21:51:14 +00:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
#define GST_TYPE_XIMAGESINK \
|
|
|
|
(gst_ximagesink_get_type())
|
|
|
|
#define GST_XIMAGESINK(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_XIMAGESINK, GstXImageSink))
|
|
|
|
#define GST_XIMAGESINK_CLASS(klass) \
|
2006-06-01 19:19:51 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_XIMAGESINK, GstXImageSinkClass))
|
2003-11-06 21:51:14 +00:00
|
|
|
#define GST_IS_XIMAGESINK(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_XIMAGESINK))
|
2006-06-01 19:19:51 +00:00
|
|
|
#define GST_IS_XIMAGESINK_CLASS(klass) \
|
2003-11-06 21:51:14 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XIMAGESINK))
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
typedef struct _GstXContext GstXContext;
|
|
|
|
typedef struct _GstXWindow GstXWindow;
|
Port from GstData to GstMiniObject.
Original commit message from CVS:
Port from GstData to GstMiniObject.
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_dispose):
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page),
(gst_ogg_mux_queue_pads), (gst_ogg_mux_set_header_on_caps),
(gst_ogg_mux_collected):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_chain):
* ext/theora/theoradec.c: (theora_handle_comment_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (theora_buffer_from_packet),
(theora_set_header_on_caps), (theora_enc_chain):
* ext/vorbis/vorbisdec.c: (vorbis_dec_sink_event),
(vorbis_handle_comment_packet):
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_set_header_on_caps):
* ext/vorbis/vorbisparse.c: (vorbis_parse_set_header_on_caps):
* gst-libs/gst/audio/gstaudiofilter.c: (gst_audiofilter_chain):
* gst-libs/gst/tag/gstvorbistag.c: (gst_vorbis_tag_chain):
* gst/audioconvert/gstaudioconvert.c:
(gst_audio_convert_get_buffer):
* gst/playback/gstdecodebin.c: (gst_decode_bin_class_init):
* gst/playback/gstplaybasebin.c: (check_queue), (probe_triggered),
(mute_stream), (silence_stream):
* gst/playback/gstplaybin.c: (gst_play_bin_class_init):
* gst/volume/gstvolume.c: (volume_transform):
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
(gst_ximage_buffer_init), (gst_ximage_buffer_class_init),
(gst_ximage_buffer_get_type), (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy),
(gst_ximagesink_ximage_put), (gst_ximagesink_imagepool_clear),
(gst_ximagesink_show_frame), (gst_ximagesink_buffer_free),
(gst_ximagesink_buffer_alloc):
* sys/ximage/ximagesink.h:
2005-05-16 15:35:52 +00:00
|
|
|
|
|
|
|
typedef struct _GstXImageBuffer GstXImageBuffer;
|
|
|
|
typedef struct _GstXImageBufferClass GstXImageBufferClass;
|
2003-11-06 21:51:14 +00:00
|
|
|
|
|
|
|
typedef struct _GstXImageSink GstXImageSink;
|
|
|
|
typedef struct _GstXImageSinkClass GstXImageSinkClass;
|
|
|
|
|
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
|
|
|
|
* @par: the pixel aspect ratio calculated from @width, @widthmm and @height,
|
|
|
|
* @heightmm ratio
|
|
|
|
* @use_xshm: used to known wether of not XShm extension is usable or not even
|
|
|
|
* if the Extension is present
|
|
|
|
* @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-06 21:51:14 +00:00
|
|
|
Display *disp;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
Screen *screen;
|
|
|
|
gint screen_num;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
Visual *visual;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
Window root;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
gulong white, black;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +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-07-28 21:28:34 +00:00
|
|
|
GValue *par; /* calculated pixel aspect ratio */
|
2004-07-27 16:43:24 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
gboolean use_xshm;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
GstCaps *caps;
|
|
|
|
};
|
|
|
|
|
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-06 21:51:14 +00:00
|
|
|
Window win;
|
|
|
|
gint width, height;
|
examples/gstplay/player.c: Adding some new lines in g_print calls.
Original commit message from CVS:
* examples/gstplay/player.c: (got_time_tick), (got_stream_length),
(got_video_size): Adding some new lines in g_print calls.
* sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_new),
(gst_ximagesink_xwindow_destroy), (gst_ximagesink_xwindow_resize),
(gst_ximagesink_handle_xevents), (gst_ximagesink_fixate),
(gst_ximagesink_sinkconnect), (gst_ximagesink_change_state),
(gst_ximagesink_chain), (gst_ximagesink_buffer_new),
(gst_ximagesink_set_xwindow_id), (gst_ximagesink_get_desired_size):
Complete code review, reverting some stuff i disagree with, adding
some fixes : time synchronization on invalid timestamps, renegotiation
of private window.
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_destroy),
(gst_xvimagesink_xwindow_resize), (gst_xvimagesink_handle_xevents),
(gst_xvimagesink_get_xv_support), (gst_xvimagesink_xcontext_get),
(gst_xvimagesink_fixate), (gst_xvimagesink_sinkconnect),
(gst_xvimagesink_change_state), (gst_xvimagesink_chain),
(gst_xvimagesink_buffer_new),
(gst_xvimagesink_navigation_send_event),
(gst_xvimagesink_set_xwindow_id),
(gst_xvimagesink_get_desired_size),
(gst_xvimagesink_xoverlay_init): Complete code review, reverting some
stuff i disagree with, adding some fixes : Renegotiation of private
window, implementing get_desired_size.
2004-01-07 15:33:42 +00:00
|
|
|
gboolean internal;
|
2003-11-06 21:51:14 +00:00
|
|
|
GC gc;
|
|
|
|
};
|
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
/**
|
|
|
|
* GstXImageBuffer:
|
|
|
|
* @ximagesink: a reference to our #GstXImageSink
|
|
|
|
* @ximage: the XImage of this buffer
|
|
|
|
* @width: the width in pixels of XImage @ximage
|
|
|
|
* @height: the height in pixels of XImage @ximage
|
|
|
|
* @size: the size in bytes of XImage @ximage
|
|
|
|
*
|
|
|
|
* Subclass of #GstBuffer containing additional information about an XImage.
|
|
|
|
*/
|
Port from GstData to GstMiniObject.
Original commit message from CVS:
Port from GstData to GstMiniObject.
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_dispose):
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page),
(gst_ogg_mux_queue_pads), (gst_ogg_mux_set_header_on_caps),
(gst_ogg_mux_collected):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_chain):
* ext/theora/theoradec.c: (theora_handle_comment_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (theora_buffer_from_packet),
(theora_set_header_on_caps), (theora_enc_chain):
* ext/vorbis/vorbisdec.c: (vorbis_dec_sink_event),
(vorbis_handle_comment_packet):
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_set_header_on_caps):
* ext/vorbis/vorbisparse.c: (vorbis_parse_set_header_on_caps):
* gst-libs/gst/audio/gstaudiofilter.c: (gst_audiofilter_chain):
* gst-libs/gst/tag/gstvorbistag.c: (gst_vorbis_tag_chain):
* gst/audioconvert/gstaudioconvert.c:
(gst_audio_convert_get_buffer):
* gst/playback/gstdecodebin.c: (gst_decode_bin_class_init):
* gst/playback/gstplaybasebin.c: (check_queue), (probe_triggered),
(mute_stream), (silence_stream):
* gst/playback/gstplaybin.c: (gst_play_bin_class_init):
* gst/volume/gstvolume.c: (volume_transform):
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
(gst_ximage_buffer_init), (gst_ximage_buffer_class_init),
(gst_ximage_buffer_get_type), (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy),
(gst_ximagesink_ximage_put), (gst_ximagesink_imagepool_clear),
(gst_ximagesink_show_frame), (gst_ximagesink_buffer_free),
(gst_ximagesink_buffer_alloc):
* sys/ximage/ximagesink.h:
2005-05-16 15:35:52 +00:00
|
|
|
struct _GstXImageBuffer {
|
|
|
|
GstBuffer buffer;
|
|
|
|
|
2004-01-11 22:52:29 +00:00
|
|
|
/* Reference to the ximagesink we belong to */
|
|
|
|
GstXImageSink *ximagesink;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
XImage *ximage;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-12 03:06:07 +00:00
|
|
|
#ifdef HAVE_XSHM
|
2003-11-06 21:51:14 +00:00
|
|
|
XShmSegmentInfo SHMInfo;
|
2004-03-15 16:32:55 +00:00
|
|
|
#endif /* HAVE_XSHM */
|
2004-07-19 11:21:10 +00:00
|
|
|
|
sys/ximage/ximagesink.*: Refactoring of ximagesink.
Original commit message from CVS:
2005-11-18 Julien MOUTTE <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
(gst_ximagesink_check_xshm_calls), (gst_ximagesink_ximage_new),
(gst_ximagesink_ximage_destroy),
(gst_ximagesink_xwindow_draw_borders),
(gst_ximagesink_ximage_put),
(gst_ximagesink_xwindow_new),
(gst_ximagesink_xwindow_update_geometry),
(gst_ximagesink_handle_xevents), (gst_ximagesink_event_thread),
(gst_ximagesink_xcontext_get), (gst_ximagesink_xcontext_clear),
(gst_ximagesink_bufferpool_clear), (gst_ximagesink_getcaps),
(gst_ximagesink_setcaps), (gst_ximagesink_change_state),
(gst_ximagesink_show_frame), (gst_ximagesink_buffer_alloc),
(gst_ximagesink_navigation_send_event),
(gst_ximagesink_set_xwindow_id), (gst_ximagesink_expose),
(gst_ximagesink_set_property), (gst_ximagesink_get_property),
(gst_ximagesink_finalize), (gst_ximagesink_init),
(gst_ximagesink_class_init):
* sys/ximage/ximagesink.h: Refactoring of ximagesink.
This new version brings correct software scaling, non flickering
window while resizing, pixel aspect ratio handling, usage of
hardware buffer pools, out of data flow event thread for
navigation and handling of expose events even when being PAUSED,
a new property to keep video aspect ratio when resizing, etc...
2005-11-18 17:58:12 +00:00
|
|
|
gint width, height;
|
|
|
|
size_t size;
|
2003-11-06 21:51:14 +00:00
|
|
|
};
|
|
|
|
|
2005-11-27 11:41:55 +00:00
|
|
|
/**
|
|
|
|
* GstXImageSink:
|
|
|
|
* @display_name: the name of the Display we want to render to
|
|
|
|
* @xcontext: our instance's #GstXContext
|
|
|
|
* @xwindow: the #GstXWindow we are rendering to
|
|
|
|
* @ximage: internal #GstXImage used to store incoming buffers and render when
|
|
|
|
* not using the buffer_alloc optimization mechanism
|
|
|
|
* @cur_image: a reference to the last #GstXImage 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
|
|
|
|
* @buffer_pool: a list of #GstXImageBuffer that could be reused at next buffer
|
|
|
|
* allocation call
|
|
|
|
* @synchronous: used to store if XSynchronous should be used or not (for
|
|
|
|
* 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
|
|
|
*
|
|
|
|
* The #GstXImageSink data structure.
|
|
|
|
*/
|
2004-03-15 16:32:55 +00:00
|
|
|
struct _GstXImageSink {
|
2003-11-06 21:51:14 +00:00
|
|
|
/* Our element stuff */
|
2003-11-19 20:43:49 +00:00
|
|
|
GstVideoSink videosink;
|
2004-01-04 18:53:53 +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;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
GstXContext *xcontext;
|
|
|
|
GstXWindow *xwindow;
|
Port from GstData to GstMiniObject.
Original commit message from CVS:
Port from GstData to GstMiniObject.
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_dispose):
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page),
(gst_ogg_mux_queue_pads), (gst_ogg_mux_set_header_on_caps),
(gst_ogg_mux_collected):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_chain):
* ext/theora/theoradec.c: (theora_handle_comment_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (theora_buffer_from_packet),
(theora_set_header_on_caps), (theora_enc_chain):
* ext/vorbis/vorbisdec.c: (vorbis_dec_sink_event),
(vorbis_handle_comment_packet):
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_set_header_on_caps):
* ext/vorbis/vorbisparse.c: (vorbis_parse_set_header_on_caps):
* gst-libs/gst/audio/gstaudiofilter.c: (gst_audiofilter_chain):
* gst-libs/gst/tag/gstvorbistag.c: (gst_vorbis_tag_chain):
* gst/audioconvert/gstaudioconvert.c:
(gst_audio_convert_get_buffer):
* gst/playback/gstdecodebin.c: (gst_decode_bin_class_init):
* gst/playback/gstplaybasebin.c: (check_queue), (probe_triggered),
(mute_stream), (silence_stream):
* gst/playback/gstplaybin.c: (gst_play_bin_class_init):
* gst/volume/gstvolume.c: (volume_transform):
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
(gst_ximage_buffer_init), (gst_ximage_buffer_class_init),
(gst_ximage_buffer_get_type), (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy),
(gst_ximagesink_ximage_put), (gst_ximagesink_imagepool_clear),
(gst_ximagesink_show_frame), (gst_ximagesink_buffer_free),
(gst_ximagesink_buffer_alloc):
* sys/ximage/ximagesink.h:
2005-05-16 15:35:52 +00:00
|
|
|
GstXImageBuffer *ximage;
|
|
|
|
GstXImageBuffer *cur_image;
|
sys/ximage/ximagesink.*: Refactoring of ximagesink.
Original commit message from CVS:
2005-11-18 Julien MOUTTE <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
(gst_ximagesink_check_xshm_calls), (gst_ximagesink_ximage_new),
(gst_ximagesink_ximage_destroy),
(gst_ximagesink_xwindow_draw_borders),
(gst_ximagesink_ximage_put),
(gst_ximagesink_xwindow_new),
(gst_ximagesink_xwindow_update_geometry),
(gst_ximagesink_handle_xevents), (gst_ximagesink_event_thread),
(gst_ximagesink_xcontext_get), (gst_ximagesink_xcontext_clear),
(gst_ximagesink_bufferpool_clear), (gst_ximagesink_getcaps),
(gst_ximagesink_setcaps), (gst_ximagesink_change_state),
(gst_ximagesink_show_frame), (gst_ximagesink_buffer_alloc),
(gst_ximagesink_navigation_send_event),
(gst_ximagesink_set_xwindow_id), (gst_ximagesink_expose),
(gst_ximagesink_set_property), (gst_ximagesink_get_property),
(gst_ximagesink_finalize), (gst_ximagesink_init),
(gst_ximagesink_class_init):
* sys/ximage/ximagesink.h: Refactoring of ximagesink.
This new version brings correct software scaling, non flickering
window while resizing, pixel aspect ratio handling, usage of
hardware buffer pools, out of data flow event thread for
navigation and handling of expose events even when being PAUSED,
a new property to keep video aspect ratio when resizing, etc...
2005-11-18 17:58:12 +00:00
|
|
|
|
|
|
|
GThread *event_thread;
|
|
|
|
gboolean running;
|
2005-07-01 17:13:02 +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
|
|
|
/* Framerate numerator and denominator */
|
|
|
|
gint fps_n;
|
|
|
|
gint fps_d;
|
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
GMutex *x_lock;
|
sys/ximage/ximagesink.*: Refactoring of ximagesink.
Original commit message from CVS:
2005-11-18 Julien MOUTTE <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
(gst_ximagesink_check_xshm_calls), (gst_ximagesink_ximage_new),
(gst_ximagesink_ximage_destroy),
(gst_ximagesink_xwindow_draw_borders),
(gst_ximagesink_ximage_put),
(gst_ximagesink_xwindow_new),
(gst_ximagesink_xwindow_update_geometry),
(gst_ximagesink_handle_xevents), (gst_ximagesink_event_thread),
(gst_ximagesink_xcontext_get), (gst_ximagesink_xcontext_clear),
(gst_ximagesink_bufferpool_clear), (gst_ximagesink_getcaps),
(gst_ximagesink_setcaps), (gst_ximagesink_change_state),
(gst_ximagesink_show_frame), (gst_ximagesink_buffer_alloc),
(gst_ximagesink_navigation_send_event),
(gst_ximagesink_set_xwindow_id), (gst_ximagesink_expose),
(gst_ximagesink_set_property), (gst_ximagesink_get_property),
(gst_ximagesink_finalize), (gst_ximagesink_init),
(gst_ximagesink_class_init):
* sys/ximage/ximagesink.h: Refactoring of ximagesink.
This new version brings correct software scaling, non flickering
window while resizing, pixel aspect ratio handling, usage of
hardware buffer pools, out of data flow event thread for
navigation and handling of expose events even when being PAUSED,
a new property to keep video aspect ratio when resizing, etc...
2005-11-18 17:58:12 +00:00
|
|
|
GMutex *flow_lock;
|
2005-11-27 11:41:55 +00:00
|
|
|
|
|
|
|
/* object-set pixel aspect ratio */
|
|
|
|
GValue *par;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
GMutex *pool_lock;
|
sys/ximage/ximagesink.*: Refactoring of ximagesink.
Original commit message from CVS:
2005-11-18 Julien MOUTTE <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
(gst_ximagesink_check_xshm_calls), (gst_ximagesink_ximage_new),
(gst_ximagesink_ximage_destroy),
(gst_ximagesink_xwindow_draw_borders),
(gst_ximagesink_ximage_put),
(gst_ximagesink_xwindow_new),
(gst_ximagesink_xwindow_update_geometry),
(gst_ximagesink_handle_xevents), (gst_ximagesink_event_thread),
(gst_ximagesink_xcontext_get), (gst_ximagesink_xcontext_clear),
(gst_ximagesink_bufferpool_clear), (gst_ximagesink_getcaps),
(gst_ximagesink_setcaps), (gst_ximagesink_change_state),
(gst_ximagesink_show_frame), (gst_ximagesink_buffer_alloc),
(gst_ximagesink_navigation_send_event),
(gst_ximagesink_set_xwindow_id), (gst_ximagesink_expose),
(gst_ximagesink_set_property), (gst_ximagesink_get_property),
(gst_ximagesink_finalize), (gst_ximagesink_init),
(gst_ximagesink_class_init):
* sys/ximage/ximagesink.h: Refactoring of ximagesink.
This new version brings correct software scaling, non flickering
window while resizing, pixel aspect ratio handling, usage of
hardware buffer pools, out of data flow event thread for
navigation and handling of expose events even when being PAUSED,
a new property to keep video aspect ratio when resizing, etc...
2005-11-18 17:58:12 +00:00
|
|
|
GSList *buffer_pool;
|
2004-07-19 11:21:10 +00:00
|
|
|
|
2004-01-18 12:32:19 +00:00
|
|
|
gboolean synchronous;
|
sys/ximage/ximagesink.*: Refactoring of ximagesink.
Original commit message from CVS:
2005-11-18 Julien MOUTTE <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
(gst_ximagesink_check_xshm_calls), (gst_ximagesink_ximage_new),
(gst_ximagesink_ximage_destroy),
(gst_ximagesink_xwindow_draw_borders),
(gst_ximagesink_ximage_put),
(gst_ximagesink_xwindow_new),
(gst_ximagesink_xwindow_update_geometry),
(gst_ximagesink_handle_xevents), (gst_ximagesink_event_thread),
(gst_ximagesink_xcontext_get), (gst_ximagesink_xcontext_clear),
(gst_ximagesink_bufferpool_clear), (gst_ximagesink_getcaps),
(gst_ximagesink_setcaps), (gst_ximagesink_change_state),
(gst_ximagesink_show_frame), (gst_ximagesink_buffer_alloc),
(gst_ximagesink_navigation_send_event),
(gst_ximagesink_set_xwindow_id), (gst_ximagesink_expose),
(gst_ximagesink_set_property), (gst_ximagesink_get_property),
(gst_ximagesink_finalize), (gst_ximagesink_init),
(gst_ximagesink_class_init):
* sys/ximage/ximagesink.h: Refactoring of ximagesink.
This new version brings correct software scaling, non flickering
window while resizing, pixel aspect ratio handling, usage of
hardware buffer pools, out of data flow event thread for
navigation and handling of expose events even when being PAUSED,
a new property to keep video aspect ratio when resizing, etc...
2005-11-18 17:58:12 +00:00
|
|
|
gboolean keep_aspect;
|
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;
|
2003-11-06 21:51:14 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 16:32:55 +00:00
|
|
|
struct _GstXImageSinkClass {
|
2003-11-19 20:43:49 +00:00
|
|
|
GstVideoSinkClass parent_class;
|
2003-11-06 21:51:14 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 16:32:55 +00:00
|
|
|
GType gst_ximagesink_get_type(void);
|
2003-11-06 21:51:14 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2003-11-06 21:51:14 +00:00
|
|
|
#endif /* __GST_XIMAGESINK_H__ */
|