diff options
author | David Schleef <ds@schleef.org> | 2004-01-20 09:25:51 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2004-01-20 09:25:51 +0000 |
commit | 879b0b7ac0d82cfaccb1b1ba8c8fd61c3be1f3d0 (patch) | |
tree | c7d334276b3766f60b400b91502599e0cb255075 /sys | |
parent | bd6bc6d3b72215ff5b8714cde8498f3187248b00 (diff) |
sys/ximage/ximagesink.c: Change to using a framerate of [1,100] instead of [0,MAX], since 0 isn't handled correctly, ...
Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_handle_xevents),
(gst_ximagesink_xcontext_get), (gst_ximagesink_getcaps),
(gst_ximagesink_set_xwindow_id): Change to using a framerate
of [1,100] instead of [0,MAX], since 0 isn't handled correctly,
and neither is 100+, most likely.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support),
(gst_xvimagesink_getcaps): same
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ximage/ximagesink.c | 20 | ||||
-rw-r--r-- | sys/xvimage/xvimagesink.c | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 2a31436e2..941d96b28 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -342,15 +342,15 @@ gst_ximagesink_handle_xevents (GstXImageSink *ximagesink, GstPad *pad) "red_mask", G_TYPE_INT, ximagesink->xcontext->visual->red_mask, "green_mask", G_TYPE_INT, ximagesink->xcontext->visual->green_mask, "blue_mask", G_TYPE_INT, ximagesink->xcontext->visual->blue_mask, - "width", G_TYPE_INT, e.xconfigure.width & ~3, - "height", G_TYPE_INT, e.xconfigure.height & ~3, + "width", G_TYPE_INT, e.xconfigure.width, + "height", G_TYPE_INT, e.xconfigure.height, "framerate", G_TYPE_DOUBLE, ximagesink->framerate, NULL)); if ( (r == GST_PAD_LINK_OK) || (r == GST_PAD_LINK_DONE) ) { - GST_VIDEOSINK_WIDTH (ximagesink) = e.xconfigure.width & ~3; - GST_VIDEOSINK_HEIGHT (ximagesink) = e.xconfigure.height & ~3; + GST_VIDEOSINK_WIDTH (ximagesink) = e.xconfigure.width; + GST_VIDEOSINK_HEIGHT (ximagesink) = e.xconfigure.height; if ( (ximagesink->ximage) && ( (GST_VIDEOSINK_WIDTH (ximagesink) != ximagesink->ximage->width) || @@ -521,7 +521,7 @@ gst_ximagesink_xcontext_get (GstXImageSink *ximagesink) "blue_mask", G_TYPE_INT, xcontext->visual->blue_mask, "width", GST_TYPE_INT_RANGE, 0, G_MAXINT, "height", GST_TYPE_INT_RANGE, 0, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL); g_mutex_unlock (ximagesink->x_lock); @@ -587,7 +587,7 @@ gst_ximagesink_getcaps (GstPad *pad) return gst_caps_copy (ximagesink->xcontext->caps); return gst_caps_from_string ("video/x-raw-rgb, " - "framerate = (double) [ 0, MAX ], " + "framerate = (double) [ 1, 100 ], " "width = (int) [ 0, MAX ], " "height = (int) [ 0, MAX ]"); } @@ -1013,16 +1013,16 @@ gst_ximagesink_set_xwindow_id (GstXOverlay *overlay, XID xwindow_id) "red_mask", G_TYPE_INT, ximagesink->xcontext->visual->red_mask, "green_mask", G_TYPE_INT, ximagesink->xcontext->visual->green_mask, "blue_mask", G_TYPE_INT, ximagesink->xcontext->visual->blue_mask, - "width", G_TYPE_INT, xwindow->width & ~3, - "height", G_TYPE_INT, xwindow->height & ~3, + "width", G_TYPE_INT, xwindow->width, + "height", G_TYPE_INT, xwindow->height, "framerate", G_TYPE_DOUBLE, ximagesink->framerate, NULL)); /* If caps nego succeded updating our size */ if ( (r == GST_PAD_LINK_OK) || (r == GST_PAD_LINK_DONE) ) { - GST_VIDEOSINK_WIDTH (ximagesink) = xwindow->width & ~3; - GST_VIDEOSINK_HEIGHT (ximagesink) = xwindow->height & ~3; + GST_VIDEOSINK_WIDTH (ximagesink) = xwindow->width; + GST_VIDEOSINK_HEIGHT (ximagesink) = xwindow->height; } } } diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 5b39fad08..896260651 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -559,7 +559,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext) "red_mask", G_TYPE_INT, formats[i].blue_mask, "width", GST_TYPE_INT_RANGE, 0, G_MAXINT, "height", GST_TYPE_INT_RANGE, 0, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL); /* For RGB caps we store them and the image @@ -585,7 +585,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext) "format", GST_TYPE_FOURCC,formats[i].id, "width", GST_TYPE_INT_RANGE, 0, G_MAXINT, "height", GST_TYPE_INT_RANGE, 0, G_MAXINT, - "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, + "framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL); break; default: @@ -863,7 +863,7 @@ gst_xvimagesink_getcaps (GstPad *pad) return gst_caps_from_string( "video/x-raw-rgb, " - "framerate = (double) [ 0, MAX ], " + "framerate = (double) [ 1.0, 100.0 ], " "width = (int) [ 0, MAX ], " "height = (int) [ 0, MAX ]; " "video/x-raw-yuv, " |