mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
sys/xvimage/xvimagesink.c: xcontext->im_format is only for testing XShm support (as the header file comments document...
Original commit message from CVS: * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new), (gst_xvimagesink_get_xv_support), (gst_xvimagesink_setcaps): xcontext->im_format is only for testing XShm support (as the header file comments document). Use xvimage->im_format for everything else. Avoids spurious warnings on buffer allocation before setcaps.
This commit is contained in:
parent
9b2fb4d824
commit
11cf0dcd6b
2 changed files with 12 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-07-20 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
|
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new),
|
||||||
|
(gst_xvimagesink_get_xv_support), (gst_xvimagesink_setcaps):
|
||||||
|
xcontext->im_format is only for testing XShm support (as the header
|
||||||
|
file comments document). Use xvimage->im_format for everything else.
|
||||||
|
Avoids spurious warnings on buffer allocation before setcaps.
|
||||||
|
|
||||||
2007-07-20 Stefan Kost <ensonic@users.sf.net>
|
2007-07-20 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* tests/examples/volume/Makefile.am:
|
* tests/examples/volume/Makefile.am:
|
||||||
|
|
|
@ -571,7 +571,7 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps)
|
||||||
|
|
||||||
/* calculate the expected size. This is only for sanity checking the
|
/* calculate the expected size. This is only for sanity checking the
|
||||||
* number we get from X. */
|
* number we get from X. */
|
||||||
switch (xvimagesink->xcontext->im_format) {
|
switch (xvimage->im_format) {
|
||||||
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
||||||
expected_size =
|
expected_size =
|
||||||
GST_ROUND_UP_2 (xvimage->height) * GST_ROUND_UP_4 (xvimage->width);
|
GST_ROUND_UP_2 (xvimage->height) * GST_ROUND_UP_4 (xvimage->width);
|
||||||
|
@ -1411,9 +1411,8 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
|
||||||
GstCaps *format_caps = NULL;
|
GstCaps *format_caps = NULL;
|
||||||
gboolean is_rgb_format = FALSE;
|
gboolean is_rgb_format = FALSE;
|
||||||
|
|
||||||
/* We set the image format of the xcontext to an existing one. Sink
|
/* We set the image format of the xcontext to an existing one. This
|
||||||
connect method will override that but we need to have at least a
|
is just some valid image format for making our xshm calls check before
|
||||||
valid image format so that we can make our xshm calls check before
|
|
||||||
caps negotiation really happens. */
|
caps negotiation really happens. */
|
||||||
xcontext->im_format = formats[i].id;
|
xcontext->im_format = formats[i].id;
|
||||||
|
|
||||||
|
@ -2041,15 +2040,13 @@ gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
||||||
(video_height != xvimagesink->xvimage->height))) {
|
(video_height != xvimagesink->xvimage->height))) {
|
||||||
GST_DEBUG_OBJECT (xvimagesink,
|
GST_DEBUG_OBJECT (xvimagesink,
|
||||||
"old format %" GST_FOURCC_FORMAT ", new format %" GST_FOURCC_FORMAT,
|
"old format %" GST_FOURCC_FORMAT ", new format %" GST_FOURCC_FORMAT,
|
||||||
GST_FOURCC_ARGS (xvimagesink->xcontext->im_format),
|
GST_FOURCC_ARGS (xvimagesink->xvimage->im_format),
|
||||||
GST_FOURCC_ARGS (im_format));
|
GST_FOURCC_ARGS (im_format));
|
||||||
GST_DEBUG_OBJECT (xvimagesink, "renewing xvimage");
|
GST_DEBUG_OBJECT (xvimagesink, "renewing xvimage");
|
||||||
gst_buffer_unref (GST_BUFFER (xvimagesink->xvimage));
|
gst_buffer_unref (GST_BUFFER (xvimagesink->xvimage));
|
||||||
xvimagesink->xvimage = NULL;
|
xvimagesink->xvimage = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
xvimagesink->xcontext->im_format = im_format;
|
|
||||||
|
|
||||||
g_mutex_unlock (xvimagesink->flow_lock);
|
g_mutex_unlock (xvimagesink->flow_lock);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue