From 23a2a0e224d7cae02c9db3f0512d9722b1009ed6 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 20 Apr 2007 10:42:24 +0000 Subject: [PATCH] gst/subparse/: Use GST_DISABLE_XML here Original commit message from CVS: * gst/subparse/gstsubparse.c: * gst/subparse/samiparse.c: Use GST_DISABLE_XML here * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_put), (gst_xvimagesink_xwindow_new), (gst_xvimagesink_get_xv_support), (gst_xvimagesink_buffer_alloc), (gst_xvimagesink_navigation_send_event): * sys/xvimage/xvimagesink.h: Include stdlib.h when using atoi. * tests/check/elements/playbin.c: (playbin_suite): Use GST_DISABLE_REGISTRY here --- ChangeLog | 16 ++++++++++++++++ gst/subparse/gstsubparse.c | 2 +- gst/subparse/samiparse.c | 6 +++--- sys/xvimage/xvimagesink.c | 34 +++++++++++++++++----------------- sys/xvimage/xvimagesink.h | 15 ++++++++------- tests/check/elements/playbin.c | 6 +++--- 6 files changed, 48 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6b79b2bdc..a3efd4e5c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-04-20 Stefan Kost + + * gst/subparse/gstsubparse.c: + * gst/subparse/samiparse.c: + Use GST_DISABLE_XML here + + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_put), + (gst_xvimagesink_xwindow_new), (gst_xvimagesink_get_xv_support), + (gst_xvimagesink_buffer_alloc), + (gst_xvimagesink_navigation_send_event): + * sys/xvimage/xvimagesink.h: + Include stdlib.h when using atoi. + + * tests/check/elements/playbin.c: (playbin_suite): + Use GST_DISABLE_REGISTRY here + 2007-04-19 Michael Smith * ext/theora/gsttheoraenc.h: diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index 93cd1a1fe7..189a69c172 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -59,7 +59,7 @@ GST_ELEMENT_DETAILS ("Subtitle parser", "Gustavo J. A. M. Carneiro \n" "Ronald S. Bultje "); -#ifndef GST_DISABLE_LOADSAVE_REGISTRY +#ifndef GST_DISABLE_XML static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, diff --git a/gst/subparse/samiparse.c b/gst/subparse/samiparse.c index 148576456b..2702411060 100644 --- a/gst/subparse/samiparse.c +++ b/gst/subparse/samiparse.c @@ -20,7 +20,7 @@ #include "samiparse.h" /* FIXME: use Makefile stuff */ -#ifndef GST_DISABLE_LOADSAVE_REGISTRY +#ifndef GST_DISABLE_XML #include #include @@ -435,7 +435,7 @@ parse_sami (ParserState * state, const gchar * line) return NULL; } -#else /* GST_DISABLE_LOADSAVE_REGISTRY */ +#else /* GST_DISABLE_XML */ gchar * parse_sami (ParserState * state, const gchar * line) @@ -462,4 +462,4 @@ sami_context_reset (ParserState * state) return; } -#endif /* GST_DISABLE_LOADSAVE_REGISTRY */ +#endif /* GST_DISABLE_XML */ diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 1d2bcda141..17add05c58 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -23,19 +23,19 @@ * * * XvImageSink renders video frames to a drawable (XWindow) on a local display - * using the XVideo extension. Rendering to a remote display is theorically - * possible but i doubt that the XVideo extension is actually available when + * using the XVideo extension. Rendering to a remote display is theorically + * possible but i doubt that the XVideo extension is actually available when * connecting to a remote display. This element can receive a Window ID from the * application through the XOverlay interface and will then render video frames - * in this drawable. If no Window ID was provided by the application, the + * in this drawable. If no Window ID was provided by the application, the * element will create its own internal window and render into it. * * Scaling * - * The XVideo extension, when it's available, handles hardware accelerated + * The XVideo extension, when it's available, handles hardware accelerated * scaling of video frames. This means that the element will just accept * incoming video frames no matter their geometry and will then put them to the - * drawable scaling them on the fly. Using the + * drawable scaling them on the fly. Using the * force-aspect-ratio * property it is possible to enforce scaling with a constant aspect ratio, * which means drawing black borders around the video frame. @@ -43,7 +43,7 @@ * Events * * XvImageSink creates a thread to handle events coming from the drawable. There - * are several kind of events that can be grouped in 2 big categories: input + * are several kind of events that can be grouped in 2 big categories: input * events and window state related events. Input events will be translated to * navigation events and pushed upstream for other elements to react on them. * This includes events such as pointer moves, key press/release, clicks etc... @@ -59,7 +59,7 @@ * display property or the * default display if nothing specified. Once this connection is open it will * inspect the display configuration including the physical display geometry and - * then calculate the pixel aspect ratio. When receiving video frames with a + * then calculate the pixel aspect ratio. When receiving video frames with a * different pixel aspect ratio, XvImageSink will use hardware scaling to * display the video frames correctly on display's pixel aspect ratio. * Sometimes the calculated pixel aspect ratio can be wrong, it is @@ -87,13 +87,13 @@ * gst-launch -v videotestsrc ! navigationtest ! xvimagesink * * While moving the mouse pointer over the test signal you will see a black box - * following the mouse pointer. If you press the mouse button somewhere on the + * following the mouse pointer. If you press the mouse button somewhere on the * video and release it somewhere else a green box will appear where you pressed * the button and a red one where you released it. (The navigationtest element * is part of gst-plugins-good.) You can observe here that even if the images * are scaled through hardware the pointer coordinates are converted back to the - * original video frame geometry so that the box can be drawn to the correct - * position. This also handles borders correctly, limiting coordinates to the + * original video frame geometry so that the box can be drawn to the correct + * position. This also handles borders correctly, limiting coordinates to the * image area * * @@ -103,9 +103,9 @@ * * This is faking a 4/3 pixel aspect ratio caps on video frames produced by * videotestsrc, in most cases the pixel aspect ratio of the display will be - * 1/1. This means that XvImageSink will have to do the scaling to convert + * 1/1. This means that XvImageSink will have to do the scaling to convert * incoming frames to a size that will match the display pixel aspect ratio - * (from 320x240 to 320x180 in this case). Note that you might have to escape + * (from 320x240 to 320x180 in this case). Note that you might have to escape * some characters for your shell like '\(fraction\)'. * * @@ -741,7 +741,7 @@ gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink, gst_xvimagesink_xwindow_update_geometry (xvimagesink, xvimagesink->xwindow); - /* We use the calculated geometry from _setcaps as a source to respect + /* We use the calculated geometry from _setcaps as a source to respect source and screen pixel aspect ratios. */ src.w = GST_VIDEO_SINK_WIDTH (xvimagesink); src.h = GST_VIDEO_SINK_HEIGHT (xvimagesink); @@ -856,7 +856,7 @@ gst_xvimagesink_xwindow_new (GstXvImageSink * xvimagesink, 0, 0, xwindow->width, xwindow->height, 0, 0, xvimagesink->xcontext->black); - /* We have to do that to prevent X from redrawing the background on + /* We have to do that to prevent X from redrawing the background on * ConfigureNotify. This takes away flickering of video when resizing. */ XSetWindowBackgroundPixmap (xvimagesink->xcontext->disp, xwindow->win, None); @@ -1288,7 +1288,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink, bits++; /* set a colorkey in the right format RGB565/RGB888 - * note that the colorkey is independent from the display + * note that the colorkey is independent from the display * depth (xcontext->depth). We only handle these 2 cases, because * they're the only types of devices we've encountered. If we don't * recognise it, leave it alone */ @@ -2226,7 +2226,7 @@ gst_xvimagesink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, image_format = gst_xvimagesink_get_format_from_caps (xvimagesink, intersection); - /* Store our caps and format as the last_caps to avoid expensive + /* Store our caps and format as the last_caps to avoid expensive * caps intersection next time */ gst_caps_replace (&xvimagesink->xcontext->last_caps, intersection); xvimagesink->xcontext->last_format = image_format; @@ -2335,7 +2335,7 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation, return; } - /* We get the frame position using the calculated geometry from _setcaps + /* We get the frame position using the calculated geometry from _setcaps that respect pixel aspect ratios */ src.w = GST_VIDEO_SINK_WIDTH (xvimagesink); src.h = GST_VIDEO_SINK_HEIGHT (xvimagesink); diff --git a/sys/xvimage/xvimagesink.h b/sys/xvimage/xvimagesink.h index c893d7cc52..767a15a33d 100644 --- a/sys/xvimage/xvimagesink.h +++ b/sys/xvimage/xvimagesink.h @@ -40,6 +40,7 @@ #include #include +#include G_BEGIN_DECLS @@ -79,7 +80,7 @@ typedef struct _GstXvImageSinkClass GstXvImageSinkClass; * @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, + * @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 @@ -207,7 +208,7 @@ struct _GstXvImageBuffer { * @pool_lock: used to protect the buffer pool * @image_pool: a list of #GstXvImageBuffer that could be reused at next buffer * allocation call - * @synchronous: used to store if XSynchronous should be used or not (for + * @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 @@ -233,26 +234,26 @@ struct _GstXvImageSink { GstXWindow *xwindow; GstXvImageBuffer *xvimage; GstXvImageBuffer *cur_image; - + GThread *event_thread; gboolean running; gint fps_n; gint fps_d; - + GMutex *x_lock; GMutex *flow_lock; /* object-set pixel aspect ratio */ GValue *par; - + GMutex *pool_lock; GSList *image_pool; - + gboolean synchronous; gboolean keep_aspect; gboolean handle_events; - + gint brightness; gint contrast; gint hue; diff --git a/tests/check/elements/playbin.c b/tests/check/elements/playbin.c index ae18efdb31..9ae0e1469f 100644 --- a/tests/check/elements/playbin.c +++ b/tests/check/elements/playbin.c @@ -26,7 +26,7 @@ #include #include -#ifndef GST_DISABLE_LOADSAVE_REGISTRY +#ifndef GST_DISABLE_REGISTRY #define DEFINE_TEST(func) \ static void func (void); \ @@ -591,7 +591,7 @@ GST_PLUGIN_DEFINE_STATIC "static elements for the playbin unit test", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN); -#endif /* GST_DISABLE_LOADSAVE_REGISTRY */ +#endif /* GST_DISABLE_REGISTRY */ static Suite * @@ -602,7 +602,7 @@ playbin_suite (void) suite_add_tcase (s, tc_chain); -#ifndef GST_DISABLE_LOADSAVE_REGISTRY +#ifndef GST_DISABLE_REGISTRY /* with the old decodebin */ tcase_add_test (tc_chain, test_sink_usage_video_only_stream_decodebin1); tcase_add_test (tc_chain, test_suburi_error_wrongproto_decodebin1);