g_mutex_unlock (ximagesink->x_lock);
}
-/* This function get the X Display and global infos about it. Everything is
+/* This function gets the X Display and global info about it. Everything is
stored in our object and will be cleaned when the object is disposed. Note
- here that caps for supported format are generated without any window or
+ here that caps for supported format are generated without any window or
image creation */
static GstXContext *
gst_ximagesink_xcontext_get (GstXImageSink * ximagesink)
if ((ximagesink->ximage)
&& ((GST_VIDEOSINK_WIDTH (ximagesink) != ximagesink->ximage->width)
- || (GST_VIDEOSINK_HEIGHT (ximagesink) !=
- ximagesink->ximage->height))) {
+ || (GST_VIDEOSINK_HEIGHT (ximagesink) != ximagesink->ximage->height))) {
/* We renew our ximage only if size changed */
gst_ximagesink_ximage_destroy (ximagesink, ximagesink->ximage);
event = gst_event_new (GST_EVENT_NAVIGATION);
event->event_data.structure.structure = structure;
- /* We are not converting the pointer coordinates as there's no hardware
+ /* We are not converting the pointer coordinates as there's no hardware
scaling done here. The only possible scaling is done by videoscale and
videoscale will have to catch those events and tranform the coordinates
to match the applied scaling. So here we just add the offset if the image
xwindow->gc = XCreateGC (ximagesink->xcontext->disp, xwindow->win, 0, NULL);
g_mutex_unlock (ximagesink->x_lock);
- /* If that new window geometry differs from our one we try to
+ /* If that new window geometry differs from our one we try to
renegotiate caps */
if (gst_pad_is_negotiated (GST_VIDEOSINK_PAD (ximagesink)) &&
(xwindow->width != GST_VIDEOSINK_WIDTH (ximagesink) ||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
-
+
#ifndef __GST_XIMAGESINK_H__
#define __GST_XIMAGESINK_H__
/* 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;
-
+
GstCaps *caps;
};
struct _GstXImage {
/* Reference to the ximagesink we belong to */
GstXImageSink *ximagesink;
-
+
XImage *ximage;
-
+
#ifdef HAVE_XSHM
XShmSegmentInfo SHMInfo;
#endif /* HAVE_XSHM */
-
+
gint width, height, size;
};
GstVideoSink videosink;
char *display_name;
-
+
GstXContext *xcontext;
GstXWindow *xwindow;
GstXImage *ximage;
GstXImage *cur_image;
-
+
gdouble framerate;
GMutex *x_lock;
-
+
/* Unused */
gint pixel_width, pixel_height;
-
+
GstClockTime time;
-
+
GMutex *pool_lock;
GSList *image_pool;
-
+
gboolean synchronous;
gboolean sw_scaling_failed;
};
/* This function generates a caps with all supported format by the first
Xv grabable port we find. We store each one of the supported formats in a
- format list and append the format to a newly created caps that we return
+ format list and append the format to a newly created caps that we return
If this function does not return NULL because of an error, it also grabs
the port via XvGrabPort */
static GstCaps *
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL);
- /* For RGB caps we store them and the image
+ /* For RGB caps we store them and the image
format so that we can get back the format
when sinkconnect will give us a caps without
format property */
return caps;
}
-/* This function get the X Display and global infos about it. Everything is
+/* This function gets the X Display and global info about it. Everything is
stored in our object and will be cleaned when the object is disposed. Note
- here that caps for supported format are generated without any window or
+ here that caps for supported format are generated without any window or
image creation */
static GstXContext *
gst_xvimagesink_xcontext_get (GstXvImageSink * xvimagesink)
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
-
+
#ifndef __GST_XVIMAGESINK_H__
#define __GST_XVIMAGESINK_H__
typedef struct _GstXWindow GstXWindow;
typedef struct _GstXvImage GstXvImage;
typedef struct _GstXvImageFormat GstXvImageFormat;
-
+
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;
-
+
GList *formats_list;
GList *channels_list;
-
+
GstCaps *caps;
};
struct _GstXvImage {
/* Reference to the xvimagesink we belong to */
GstXvImageSink *xvimagesink;
-
+
XvImage *xvimage;
-
+
#ifdef HAVE_XSHM
XShmSegmentInfo SHMInfo;
#endif /* HAVE_XSHM */
-
+
gint width, height, size;
};
struct _GstXvImageSink {
/* Our element stuff */
GstVideoSink videosink;
-
+
char *display_name;
-
+
GstXContext *xcontext;
GstXWindow *xwindow;
GstXvImage *xvimage;
GstXvImage *cur_image;
-
+
gdouble framerate;
-
+
gint brightness;
gint contrast;
gint hue;
gint saturation;
gboolean cb_changed;
-
+
GMutex *x_lock;
-
+
/* Unused */
gint pixel_width, pixel_height;
GstClockTime time;
-
+
GMutex *pool_lock;
GSList *image_pool;