mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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
This commit is contained in:
parent
38db14cb22
commit
23a2a0e224
6 changed files with 48 additions and 31 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
||||||
|
2007-04-20 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* 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 <msmith@fluendo.com>
|
2007-04-19 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* ext/theora/gsttheoraenc.h:
|
* ext/theora/gsttheoraenc.h:
|
||||||
|
|
|
@ -59,7 +59,7 @@ GST_ELEMENT_DETAILS ("Subtitle parser",
|
||||||
"Gustavo J. A. M. Carneiro <gjc@inescporto.pt>\n"
|
"Gustavo J. A. M. Carneiro <gjc@inescporto.pt>\n"
|
||||||
"Ronald S. Bultje <rbultje@ronald.bitfreak.net>");
|
"Ronald S. Bultje <rbultje@ronald.bitfreak.net>");
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
#ifndef GST_DISABLE_XML
|
||||||
static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "samiparse.h"
|
#include "samiparse.h"
|
||||||
|
|
||||||
/* FIXME: use Makefile stuff */
|
/* FIXME: use Makefile stuff */
|
||||||
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
#ifndef GST_DISABLE_XML
|
||||||
#include <libxml/HTMLparser.h>
|
#include <libxml/HTMLparser.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -435,7 +435,7 @@ parse_sami (ParserState * state, const gchar * line)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* GST_DISABLE_LOADSAVE_REGISTRY */
|
#else /* GST_DISABLE_XML */
|
||||||
|
|
||||||
gchar *
|
gchar *
|
||||||
parse_sami (ParserState * state, const gchar * line)
|
parse_sami (ParserState * state, const gchar * line)
|
||||||
|
@ -462,4 +462,4 @@ sami_context_reset (ParserState * state)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* GST_DISABLE_LOADSAVE_REGISTRY */
|
#endif /* GST_DISABLE_XML */
|
||||||
|
|
|
@ -23,19 +23,19 @@
|
||||||
* <refsect2>
|
* <refsect2>
|
||||||
* <para>
|
* <para>
|
||||||
* XvImageSink renders video frames to a drawable (XWindow) on a local display
|
* XvImageSink renders video frames to a drawable (XWindow) on a local display
|
||||||
* using the XVideo extension. Rendering to a remote display is theorically
|
* using the XVideo extension. Rendering to a remote display is theorically
|
||||||
* possible but i doubt that the XVideo extension is actually available when
|
* 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
|
* 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
|
* 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.
|
* element will create its own internal window and render into it.
|
||||||
* </para>
|
* </para>
|
||||||
* <title>Scaling</title>
|
* <title>Scaling</title>
|
||||||
* <para>
|
* <para>
|
||||||
* 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
|
* 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
|
* 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
|
||||||
* <link linkend="GstXvImageSink--force-aspect-ratio">force-aspect-ratio</link>
|
* <link linkend="GstXvImageSink--force-aspect-ratio">force-aspect-ratio</link>
|
||||||
* property it is possible to enforce scaling with a constant aspect ratio,
|
* property it is possible to enforce scaling with a constant aspect ratio,
|
||||||
* which means drawing black borders around the video frame.
|
* which means drawing black borders around the video frame.
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
* <title>Events</title>
|
* <title>Events</title>
|
||||||
* <para>
|
* <para>
|
||||||
* XvImageSink creates a thread to handle events coming from the drawable. There
|
* 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
|
* events and window state related events. Input events will be translated to
|
||||||
* navigation events and pushed upstream for other elements to react on them.
|
* navigation events and pushed upstream for other elements to react on them.
|
||||||
* This includes events such as pointer moves, key press/release, clicks etc...
|
* This includes events such as pointer moves, key press/release, clicks etc...
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
* <link linkend="GstXvImageSink--display">display</link> property or the
|
* <link linkend="GstXvImageSink--display">display</link> property or the
|
||||||
* default display if nothing specified. Once this connection is open it will
|
* default display if nothing specified. Once this connection is open it will
|
||||||
* inspect the display configuration including the physical display geometry and
|
* 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
|
* different pixel aspect ratio, XvImageSink will use hardware scaling to
|
||||||
* display the video frames correctly on display's pixel aspect ratio.
|
* display the video frames correctly on display's pixel aspect ratio.
|
||||||
* Sometimes the calculated pixel aspect ratio can be wrong, it is
|
* Sometimes the calculated pixel aspect ratio can be wrong, it is
|
||||||
|
@ -87,13 +87,13 @@
|
||||||
* gst-launch -v videotestsrc ! navigationtest ! xvimagesink
|
* gst-launch -v videotestsrc ! navigationtest ! xvimagesink
|
||||||
* </programlisting>
|
* </programlisting>
|
||||||
* While moving the mouse pointer over the test signal you will see a black box
|
* 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
|
* 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
|
* 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
|
* 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
|
* 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
|
* original video frame geometry so that the box can be drawn to the correct
|
||||||
* position. This also handles borders correctly, limiting coordinates to the
|
* position. This also handles borders correctly, limiting coordinates to the
|
||||||
* image area
|
* image area
|
||||||
* </para>
|
* </para>
|
||||||
* <para>
|
* <para>
|
||||||
|
@ -103,9 +103,9 @@
|
||||||
* </programlisting>
|
* </programlisting>
|
||||||
* This is faking a 4/3 pixel aspect ratio caps on video frames produced by
|
* 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
|
* 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
|
* 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\)'.
|
* some characters for your shell like '\(fraction\)'.
|
||||||
* </para>
|
* </para>
|
||||||
* <para>
|
* <para>
|
||||||
|
@ -741,7 +741,7 @@ gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink,
|
||||||
|
|
||||||
gst_xvimagesink_xwindow_update_geometry (xvimagesink, xvimagesink->xwindow);
|
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. */
|
source and screen pixel aspect ratios. */
|
||||||
src.w = GST_VIDEO_SINK_WIDTH (xvimagesink);
|
src.w = GST_VIDEO_SINK_WIDTH (xvimagesink);
|
||||||
src.h = GST_VIDEO_SINK_HEIGHT (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, xwindow->width, xwindow->height,
|
||||||
0, 0, xvimagesink->xcontext->black);
|
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. */
|
* ConfigureNotify. This takes away flickering of video when resizing. */
|
||||||
XSetWindowBackgroundPixmap (xvimagesink->xcontext->disp, xwindow->win, None);
|
XSetWindowBackgroundPixmap (xvimagesink->xcontext->disp, xwindow->win, None);
|
||||||
|
|
||||||
|
@ -1288,7 +1288,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
|
||||||
bits++;
|
bits++;
|
||||||
|
|
||||||
/* set a colorkey in the right format RGB565/RGB888
|
/* 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
|
* depth (xcontext->depth). We only handle these 2 cases, because
|
||||||
* they're the only types of devices we've encountered. If we don't
|
* they're the only types of devices we've encountered. If we don't
|
||||||
* recognise it, leave it alone */
|
* 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,
|
image_format = gst_xvimagesink_get_format_from_caps (xvimagesink,
|
||||||
intersection);
|
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 */
|
* caps intersection next time */
|
||||||
gst_caps_replace (&xvimagesink->xcontext->last_caps, intersection);
|
gst_caps_replace (&xvimagesink->xcontext->last_caps, intersection);
|
||||||
xvimagesink->xcontext->last_format = image_format;
|
xvimagesink->xcontext->last_format = image_format;
|
||||||
|
@ -2335,7 +2335,7 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
|
||||||
return;
|
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 */
|
that respect pixel aspect ratios */
|
||||||
src.w = GST_VIDEO_SINK_WIDTH (xvimagesink);
|
src.w = GST_VIDEO_SINK_WIDTH (xvimagesink);
|
||||||
src.h = GST_VIDEO_SINK_HEIGHT (xvimagesink);
|
src.h = GST_VIDEO_SINK_HEIGHT (xvimagesink);
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ typedef struct _GstXvImageSinkClass GstXvImageSinkClass;
|
||||||
* @height: the height in pixels of Display @disp
|
* @height: the height in pixels of Display @disp
|
||||||
* @widthmm: the width in millimeters of Display @disp
|
* @widthmm: the width in millimeters of Display @disp
|
||||||
* @heightmm: the height 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
|
* @heightmm ratio
|
||||||
* @use_xshm: used to known wether of not XShm extension is usable or not even
|
* @use_xshm: used to known wether of not XShm extension is usable or not even
|
||||||
* if the Extension is present
|
* if the Extension is present
|
||||||
|
@ -207,7 +208,7 @@ struct _GstXvImageBuffer {
|
||||||
* @pool_lock: used to protect the buffer pool
|
* @pool_lock: used to protect the buffer pool
|
||||||
* @image_pool: a list of #GstXvImageBuffer that could be reused at next buffer
|
* @image_pool: a list of #GstXvImageBuffer that could be reused at next buffer
|
||||||
* allocation call
|
* 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)
|
* debugging purpose only)
|
||||||
* @keep_aspect: used to remember if reverse negotiation scaling should respect
|
* @keep_aspect: used to remember if reverse negotiation scaling should respect
|
||||||
* aspect ratio
|
* aspect ratio
|
||||||
|
@ -233,26 +234,26 @@ struct _GstXvImageSink {
|
||||||
GstXWindow *xwindow;
|
GstXWindow *xwindow;
|
||||||
GstXvImageBuffer *xvimage;
|
GstXvImageBuffer *xvimage;
|
||||||
GstXvImageBuffer *cur_image;
|
GstXvImageBuffer *cur_image;
|
||||||
|
|
||||||
GThread *event_thread;
|
GThread *event_thread;
|
||||||
gboolean running;
|
gboolean running;
|
||||||
|
|
||||||
gint fps_n;
|
gint fps_n;
|
||||||
gint fps_d;
|
gint fps_d;
|
||||||
|
|
||||||
GMutex *x_lock;
|
GMutex *x_lock;
|
||||||
GMutex *flow_lock;
|
GMutex *flow_lock;
|
||||||
|
|
||||||
/* object-set pixel aspect ratio */
|
/* object-set pixel aspect ratio */
|
||||||
GValue *par;
|
GValue *par;
|
||||||
|
|
||||||
GMutex *pool_lock;
|
GMutex *pool_lock;
|
||||||
GSList *image_pool;
|
GSList *image_pool;
|
||||||
|
|
||||||
gboolean synchronous;
|
gboolean synchronous;
|
||||||
gboolean keep_aspect;
|
gboolean keep_aspect;
|
||||||
gboolean handle_events;
|
gboolean handle_events;
|
||||||
|
|
||||||
gint brightness;
|
gint brightness;
|
||||||
gint contrast;
|
gint contrast;
|
||||||
gint hue;
|
gint hue;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <gst/base/gstpushsrc.h>
|
#include <gst/base/gstpushsrc.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
#ifndef GST_DISABLE_REGISTRY
|
||||||
|
|
||||||
#define DEFINE_TEST(func) \
|
#define DEFINE_TEST(func) \
|
||||||
static void func (void); \
|
static void func (void); \
|
||||||
|
@ -591,7 +591,7 @@ GST_PLUGIN_DEFINE_STATIC
|
||||||
"static elements for the playbin unit test",
|
"static elements for the playbin unit test",
|
||||||
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
|
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
|
||||||
|
|
||||||
#endif /* GST_DISABLE_LOADSAVE_REGISTRY */
|
#endif /* GST_DISABLE_REGISTRY */
|
||||||
|
|
||||||
|
|
||||||
static Suite *
|
static Suite *
|
||||||
|
@ -602,7 +602,7 @@ playbin_suite (void)
|
||||||
|
|
||||||
suite_add_tcase (s, tc_chain);
|
suite_add_tcase (s, tc_chain);
|
||||||
|
|
||||||
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
#ifndef GST_DISABLE_REGISTRY
|
||||||
/* with the old decodebin */
|
/* with the old decodebin */
|
||||||
tcase_add_test (tc_chain, test_sink_usage_video_only_stream_decodebin1);
|
tcase_add_test (tc_chain, test_sink_usage_video_only_stream_decodebin1);
|
||||||
tcase_add_test (tc_chain, test_suburi_error_wrongproto_decodebin1);
|
tcase_add_test (tc_chain, test_suburi_error_wrongproto_decodebin1);
|
||||||
|
|
Loading…
Reference in a new issue