whitespace and style cleanup

Original commit message from CVS:
whitespace and style cleanup
This commit is contained in:
Thomas Vander Stichele 2004-07-19 11:21:10 +00:00
parent e8adc3fbf0
commit 4c536aef8c
4 changed files with 47 additions and 48 deletions

View File

@ -617,9 +617,9 @@ gst_ximagesink_handle_xevents (GstXImageSink * ximagesink, GstPad * pad)
g_mutex_unlock (ximagesink->x_lock); 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 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 */ image creation */
static GstXContext * static GstXContext *
gst_ximagesink_xcontext_get (GstXImageSink * ximagesink) gst_ximagesink_xcontext_get (GstXImageSink * ximagesink)
@ -837,8 +837,7 @@ gst_ximagesink_sink_link (GstPad * pad, const GstCaps * caps)
if ((ximagesink->ximage) if ((ximagesink->ximage)
&& ((GST_VIDEOSINK_WIDTH (ximagesink) != ximagesink->ximage->width) && ((GST_VIDEOSINK_WIDTH (ximagesink) != ximagesink->ximage->width)
|| (GST_VIDEOSINK_HEIGHT (ximagesink) != || (GST_VIDEOSINK_HEIGHT (ximagesink) != ximagesink->ximage->height))) {
ximagesink->ximage->height))) {
/* We renew our ximage only if size changed */ /* We renew our ximage only if size changed */
gst_ximagesink_ximage_destroy (ximagesink, ximagesink->ximage); gst_ximagesink_ximage_destroy (ximagesink, ximagesink->ximage);
@ -1079,7 +1078,7 @@ gst_ximagesink_navigation_send_event (GstNavigation * navigation,
event = gst_event_new (GST_EVENT_NAVIGATION); event = gst_event_new (GST_EVENT_NAVIGATION);
event->event_data.structure.structure = structure; 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 scaling done here. The only possible scaling is done by videoscale and
videoscale will have to catch those events and tranform the coordinates 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 to match the applied scaling. So here we just add the offset if the image
@ -1170,7 +1169,7 @@ gst_ximagesink_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id)
xwindow->gc = XCreateGC (ximagesink->xcontext->disp, xwindow->win, 0, NULL); xwindow->gc = XCreateGC (ximagesink->xcontext->disp, xwindow->win, 0, NULL);
g_mutex_unlock (ximagesink->x_lock); 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 */ renegotiate caps */
if (gst_pad_is_negotiated (GST_VIDEOSINK_PAD (ximagesink)) && if (gst_pad_is_negotiated (GST_VIDEOSINK_PAD (ximagesink)) &&
(xwindow->width != GST_VIDEOSINK_WIDTH (ximagesink) || (xwindow->width != GST_VIDEOSINK_WIDTH (ximagesink) ||

View File

@ -16,7 +16,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef __GST_XIMAGESINK_H__ #ifndef __GST_XIMAGESINK_H__
#define __GST_XIMAGESINK_H__ #define __GST_XIMAGESINK_H__
@ -61,22 +61,22 @@ typedef struct _GstXImageSinkClass GstXImageSinkClass;
/* Global X Context stuff */ /* Global X Context stuff */
struct _GstXContext { struct _GstXContext {
Display *disp; Display *disp;
Screen *screen; Screen *screen;
gint screen_num; gint screen_num;
Visual *visual; Visual *visual;
Window root; Window root;
gulong white, black; gulong white, black;
gint depth; gint depth;
gint bpp; gint bpp;
gint endianness; gint endianness;
gboolean use_xshm; gboolean use_xshm;
GstCaps *caps; GstCaps *caps;
}; };
@ -92,13 +92,13 @@ struct _GstXWindow {
struct _GstXImage { struct _GstXImage {
/* Reference to the ximagesink we belong to */ /* Reference to the ximagesink we belong to */
GstXImageSink *ximagesink; GstXImageSink *ximagesink;
XImage *ximage; XImage *ximage;
#ifdef HAVE_XSHM #ifdef HAVE_XSHM
XShmSegmentInfo SHMInfo; XShmSegmentInfo SHMInfo;
#endif /* HAVE_XSHM */ #endif /* HAVE_XSHM */
gint width, height, size; gint width, height, size;
}; };
@ -107,23 +107,23 @@ struct _GstXImageSink {
GstVideoSink videosink; GstVideoSink videosink;
char *display_name; char *display_name;
GstXContext *xcontext; GstXContext *xcontext;
GstXWindow *xwindow; GstXWindow *xwindow;
GstXImage *ximage; GstXImage *ximage;
GstXImage *cur_image; GstXImage *cur_image;
gdouble framerate; gdouble framerate;
GMutex *x_lock; GMutex *x_lock;
/* Unused */ /* Unused */
gint pixel_width, pixel_height; gint pixel_width, pixel_height;
GstClockTime time; GstClockTime time;
GMutex *pool_lock; GMutex *pool_lock;
GSList *image_pool; GSList *image_pool;
gboolean synchronous; gboolean synchronous;
gboolean sw_scaling_failed; gboolean sw_scaling_failed;
}; };

View File

@ -629,7 +629,7 @@ gst_xvimagesink_handle_xevents (GstXvImageSink * xvimagesink, GstPad * pad)
/* This function generates a caps with all supported format by the first /* 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 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 If this function does not return NULL because of an error, it also grabs
the port via XvGrabPort */ the port via XvGrabPort */
static GstCaps * static GstCaps *
@ -732,7 +732,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); "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 format so that we can get back the format
when sinkconnect will give us a caps without when sinkconnect will give us a caps without
format property */ format property */
@ -780,9 +780,9 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
return caps; 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 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 */ image creation */
static GstXContext * static GstXContext *
gst_xvimagesink_xcontext_get (GstXvImageSink * xvimagesink) gst_xvimagesink_xcontext_get (GstXvImageSink * xvimagesink)

View File

@ -16,7 +16,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef __GST_XVIMAGESINK_H__ #ifndef __GST_XVIMAGESINK_H__
#define __GST_XVIMAGESINK_H__ #define __GST_XVIMAGESINK_H__
@ -58,35 +58,35 @@ typedef struct _GstXContext GstXContext;
typedef struct _GstXWindow GstXWindow; typedef struct _GstXWindow GstXWindow;
typedef struct _GstXvImage GstXvImage; typedef struct _GstXvImage GstXvImage;
typedef struct _GstXvImageFormat GstXvImageFormat; typedef struct _GstXvImageFormat GstXvImageFormat;
typedef struct _GstXvImageSink GstXvImageSink; typedef struct _GstXvImageSink GstXvImageSink;
typedef struct _GstXvImageSinkClass GstXvImageSinkClass; typedef struct _GstXvImageSinkClass GstXvImageSinkClass;
/* Global X Context stuff */ /* Global X Context stuff */
struct _GstXContext { struct _GstXContext {
Display *disp; Display *disp;
Screen *screen; Screen *screen;
gint screen_num; gint screen_num;
Visual *visual; Visual *visual;
Window root; Window root;
gulong white, black; gulong white, black;
gint depth; gint depth;
gint bpp; gint bpp;
gint endianness; gint endianness;
gboolean use_xshm; gboolean use_xshm;
XvPortID xv_port_id; XvPortID xv_port_id;
gint im_format; gint im_format;
GList *formats_list; GList *formats_list;
GList *channels_list; GList *channels_list;
GstCaps *caps; GstCaps *caps;
}; };
@ -108,42 +108,42 @@ struct _GstXvImageFormat {
struct _GstXvImage { struct _GstXvImage {
/* Reference to the xvimagesink we belong to */ /* Reference to the xvimagesink we belong to */
GstXvImageSink *xvimagesink; GstXvImageSink *xvimagesink;
XvImage *xvimage; XvImage *xvimage;
#ifdef HAVE_XSHM #ifdef HAVE_XSHM
XShmSegmentInfo SHMInfo; XShmSegmentInfo SHMInfo;
#endif /* HAVE_XSHM */ #endif /* HAVE_XSHM */
gint width, height, size; gint width, height, size;
}; };
struct _GstXvImageSink { struct _GstXvImageSink {
/* Our element stuff */ /* Our element stuff */
GstVideoSink videosink; GstVideoSink videosink;
char *display_name; char *display_name;
GstXContext *xcontext; GstXContext *xcontext;
GstXWindow *xwindow; GstXWindow *xwindow;
GstXvImage *xvimage; GstXvImage *xvimage;
GstXvImage *cur_image; GstXvImage *cur_image;
gdouble framerate; gdouble framerate;
gint brightness; gint brightness;
gint contrast; gint contrast;
gint hue; gint hue;
gint saturation; gint saturation;
gboolean cb_changed; gboolean cb_changed;
GMutex *x_lock; GMutex *x_lock;
/* Unused */ /* Unused */
gint pixel_width, pixel_height; gint pixel_width, pixel_height;
GstClockTime time; GstClockTime time;
GMutex *pool_lock; GMutex *pool_lock;
GSList *image_pool; GSList *image_pool;