ext/sdl/sdlvideosink.c: Only allow sane framerates.
authorDavid Schleef <ds@schleef.org>
Mon, 9 Aug 2004 20:07:10 +0000 (20:07 +0000)
committerDavid Schleef <ds@schleef.org>
Mon, 9 Aug 2004 20:07:10 +0000 (20:07 +0000)
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.

ChangeLog
sys/ximage/ximagesink.c
sys/xvimage/xvimagesink.c
tests/old/testsuite/gst-lint
testsuite/gst-lint

index 94765b5..d89e2fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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),
index d2851f0..07f3d49 100644 (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;
 
index 4077d46..389bd96 100644 (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 ();
index c385acd..19bdc8d 100755 (executable)
@@ -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"
+       }
+}
+
index c385acd..19bdc8d 100755 (executable)
@@ -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"
+       }
+}
+