mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
d90ee5bfa3
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:
152 lines
3.3 KiB
C
152 lines
3.3 KiB
C
/* 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_XIMAGESINK_H__
|
|
#define __GST_XIMAGESINK_H__
|
|
|
|
#include <gst/video/videosink.h>
|
|
|
|
#ifdef HAVE_XSHM
|
|
#include <sys/types.h>
|
|
#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 <string.h>
|
|
#include <math.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#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) \
|
|
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_XIMAGESINK, GstXImageSink))
|
|
#define GST_IS_XIMAGESINK(obj) \
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_XIMAGESINK))
|
|
#define GST_IS_XIMAGESINK_CLASS(obj) \
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XIMAGESINK))
|
|
|
|
typedef struct _GstXContext GstXContext;
|
|
typedef struct _GstXWindow GstXWindow;
|
|
|
|
typedef struct _GstXImageBuffer GstXImageBuffer;
|
|
typedef struct _GstXImageBufferClass GstXImageBufferClass;
|
|
|
|
typedef struct _GstXImageSink GstXImageSink;
|
|
typedef struct _GstXImageSinkClass GstXImageSinkClass;
|
|
|
|
/* 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;
|
|
|
|
gint width, height;
|
|
gint widthmm, heightmm;
|
|
GValue *par; /* calculated pixel aspect ratio */
|
|
|
|
gboolean use_xshm;
|
|
|
|
GstCaps *caps;
|
|
};
|
|
|
|
/* XWindow stuff */
|
|
struct _GstXWindow {
|
|
Window win;
|
|
gint width, height;
|
|
gboolean internal;
|
|
GC gc;
|
|
};
|
|
|
|
/* XImage stuff */
|
|
struct _GstXImageBuffer {
|
|
GstBuffer buffer;
|
|
|
|
/* Reference to the ximagesink we belong to */
|
|
GstXImageSink *ximagesink;
|
|
|
|
XImage *ximage;
|
|
|
|
#ifdef HAVE_XSHM
|
|
XShmSegmentInfo SHMInfo;
|
|
#endif /* HAVE_XSHM */
|
|
|
|
gint width, height, size;
|
|
};
|
|
|
|
struct _GstXImageSink {
|
|
/* Our element stuff */
|
|
GstVideoSink videosink;
|
|
|
|
char *display_name;
|
|
|
|
GstXContext *xcontext;
|
|
GstXWindow *xwindow;
|
|
GstXImageBuffer *ximage;
|
|
GstXImageBuffer *cur_image;
|
|
|
|
gdouble framerate;
|
|
GMutex *x_lock;
|
|
GMutex *stream_lock;
|
|
|
|
/* Unused */
|
|
gint pixel_width, pixel_height;
|
|
GValue *par; /* object-set pixel aspect ratio */
|
|
|
|
GstClockTime time;
|
|
|
|
GMutex *pool_lock;
|
|
GSList *image_pool;
|
|
|
|
gboolean synchronous;
|
|
gboolean sw_scaling_failed;
|
|
|
|
GMutex *nav_lock;
|
|
GSList *pend_nav_events;
|
|
};
|
|
|
|
struct _GstXImageSinkClass {
|
|
GstVideoSinkClass parent_class;
|
|
};
|
|
|
|
GType gst_ximagesink_get_type(void);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GST_XIMAGESINK_H__ */
|