sys/xvimage/xvimagesink.c: xvimage assumed that XV_COLORKEY can be set in RGB888 format (fixes #354773), use gst_util...
Original commit message from CVS: * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support), (gst_xvimagesink_get_times): xvimage assumed that XV_COLORKEY can be set in RGB888 format (fixes #354773), use gst_util_uint64_scale_int in _get_times()
This commit is contained in:
parent
de788829fe
commit
d8bba5d8c2
@ -1,3 +1,10 @@
|
|||||||
|
2006-09-18 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support),
|
||||||
|
(gst_xvimagesink_get_times):
|
||||||
|
xvimage assumed that XV_COLORKEY can be set in RGB888 format (fixes
|
||||||
|
#354773), use gst_util_uint64_scale_int in _get_times()
|
||||||
|
|
||||||
2006-09-18 Michael Smith <msmith@fluendo.com>
|
2006-09-18 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* ext/ogg/gstoggmux.c: (gst_ogg_mux_push_buffer):
|
* ext/ogg/gstoggmux.c: (gst_ogg_mux_push_buffer):
|
||||||
|
@ -1191,9 +1191,31 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
|
|||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
if (!strcmp (attr[i].name, colorkey)) {
|
if (!strcmp (attr[i].name, colorkey)) {
|
||||||
const Atom atom = XInternAtom (xcontext->disp, colorkey, False);
|
const Atom atom = XInternAtom (xcontext->disp, colorkey, False);
|
||||||
|
int ckey = 0;
|
||||||
|
|
||||||
XvSetPortAttribute (xcontext->disp, xcontext->xv_port_id, atom,
|
/* set a colorkey in the right format RGB555/RGB565/RGB888 */
|
||||||
0x010203);
|
switch (xcontext->depth) {
|
||||||
|
case 15:
|
||||||
|
ckey = (1 << 10) | (2 << 5) | 3;
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
ckey = (1 << 11) | (2 << 5) | 3;
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
case 32:
|
||||||
|
ckey = (1 << 16) | (2 << 8) | 3;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
GST_WARNING ("unsupported color depth");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ckey = CLAMP (ckey, attr[i].min_value, attr[i].max_value);
|
||||||
|
|
||||||
|
GST_LOG_OBJECT (xvimagesink,
|
||||||
|
"Setting color key for display depth %d to 0x%x",
|
||||||
|
xcontext->depth, ckey);
|
||||||
|
|
||||||
|
XvSetPortAttribute (xcontext->disp, xcontext->xv_port_id, atom, ckey);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1953,7 +1975,9 @@ gst_xvimagesink_get_times (GstBaseSink * bsink, GstBuffer * buf,
|
|||||||
*end = *start + GST_BUFFER_DURATION (buf);
|
*end = *start + GST_BUFFER_DURATION (buf);
|
||||||
} else {
|
} else {
|
||||||
if (xvimagesink->fps_n > 0) {
|
if (xvimagesink->fps_n > 0) {
|
||||||
*end = *start + (GST_SECOND * xvimagesink->fps_d) / xvimagesink->fps_n;
|
*end = *start +
|
||||||
|
gst_util_uint64_scale_int (GST_SECOND, xvimagesink->fps_d,
|
||||||
|
xvimagesink->fps_n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user