ext/sdl/sdlvideosink.c: Only allow sane framerates.

Original commit message from CVS:
* ext/sdl/sdlvideosink.c: (gst_sdlvideosink_base_init):  Only allow
sane framerates.
* sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get): same
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support): same
* testsuite/gst-lint: Test for G_GUINT64_FORMAT usage near gettext.
This commit is contained in:
David Schleef 2004-08-09 20:07:10 +00:00
parent d5fccfe4e7
commit b811682326
5 changed files with 42 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2004-08-09 David Schleef <ds@schleef.org>
* ext/sdl/sdlvideosink.c: (gst_sdlvideosink_base_init): Only allow
sane framerates.
* sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get): same
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support): same
* testsuite/gst-lint: Test for G_GUINT64_FORMAT usage near gettext.
2004-08-09 Wim Taymans <wim@fluendo.com>
* gst/tcp/gstmultifdsink.c: (gst_multifdsink_class_init),

View file

@ -63,7 +63,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-raw-rgb, "
"framerate = (double) [ 0.0, MAX ], "
"framerate = (double) [ 1.0, 100.0 ], "
"width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]")
);
@ -826,7 +826,7 @@ gst_ximagesink_xcontext_get (GstXImageSink * ximagesink)
"blue_mask", G_TYPE_INT, xcontext->visual->blue_mask,
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL);
"framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL);
if (ximagesink->par) {
int nom, den;

View file

@ -65,11 +65,11 @@ static GstStaticPadTemplate gst_xvimagesink_sink_template_factory =
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-raw-rgb, "
"framerate = (double) [ 0.0, MAX ], "
"framerate = (double) [ 1.0, 100.0 ], "
"width = (int) [ 1, MAX ], "
"height = (int) [ 1, MAX ]; "
"video/x-raw-yuv, "
"framerate = (double) [ 0.0, MAX ], "
"framerate = (double) [ 1.0, 100.0 ], "
"width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]")
);
@ -768,7 +768,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
"red_mask", G_TYPE_INT, formats[i].blue_mask,
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL);
"framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL);
/* For RGB caps we store them and the image
format so that we can get back the format
@ -792,7 +792,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
"format", GST_TYPE_FOURCC, formats[i].id,
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL);
"framerate", GST_TYPE_DOUBLE_RANGE, 1.0, 100.0, NULL);
break;
default:
g_assert_not_reached ();

View file

@ -46,6 +46,7 @@ sub check_lib_deprecated();
sub check_typo();
sub check_explicit_caps();
sub check_signals();
sub check_gettext();
sub m_check_plugindir();
sub m_check_interfaces();
@ -74,6 +75,7 @@ foreach $filename (<FIND>) {
check_glibisms();
check_explicit_caps();
check_signals();
check_gettext();
# less important stuff
check_license();
@ -525,3 +527,15 @@ sub check_signals()
}
}
#
# Check for things that gettext gets wrong
#
sub check_gettext()
{
if (grep { /\b_\(.*G_GU?INT64_FORMAT/ ||
/\b_\(.*GST_TIME_FORMAT/ ||
/\b_\(.*GST_FOURCC_FORMAT/ } @lines) {
print "E: gettext doesn't handle format strings that are defines\n"
}
}

View file

@ -46,6 +46,7 @@ sub check_lib_deprecated();
sub check_typo();
sub check_explicit_caps();
sub check_signals();
sub check_gettext();
sub m_check_plugindir();
sub m_check_interfaces();
@ -74,6 +75,7 @@ foreach $filename (<FIND>) {
check_glibisms();
check_explicit_caps();
check_signals();
check_gettext();
# less important stuff
check_license();
@ -525,3 +527,15 @@ sub check_signals()
}
}
#
# Check for things that gettext gets wrong
#
sub check_gettext()
{
if (grep { /\b_\(.*G_GU?INT64_FORMAT/ ||
/\b_\(.*GST_TIME_FORMAT/ ||
/\b_\(.*GST_FOURCC_FORMAT/ } @lines) {
print "E: gettext doesn't handle format strings that are defines\n"
}
}