[gstreamer-bugs] [Bug 623063] [jpegdec] add "max-errors" property

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Aug 9 17:02:23 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=623063
  GStreamer | gst-plugins-good | 0.10.22

--- Comment #5 from David Hoyt <dhoyt at llnl.gov> 2010-08-10 00:02:17 UTC ---
Review of attachment 167466:
 --> (https://bugzilla.gnome.org/review?bug=623063&attachment=167466)

::: ext/jpeg/gstjpegdec.h
@@ +117,3 @@
+ 
+  /* number of errors we're currently at before reporting GST_FLOW_ERROR */
+  gint     max_error_count;

Not a problem.

::: ext/jpeg/gstjpegdec.c
@@ +54,2 @@
 #define JPEG_DEFAULT_IDCT_METHOD    JDCT_FASTEST
+#define JPEG_DEFAULT_MAX_ERRORS    -1

-1 means to always do the default behavior. In the future it could be expanded
to mean different things for different modes.

My goal here was to reduce impact to the maximum extent possible.

@@ +195,3 @@
+ 
+  g_object_class_install_property (gobject_class, PROP_MAX_ERRORS,
+      g_param_spec_int ("error-after", "Error After", "Error after N buffers",

Good catch.

@@ +196,3 @@
+  g_object_class_install_property (gobject_class, PROP_MAX_ERRORS,
+      g_param_spec_int ("error-after", "Error After", "Error after N buffers",
+          G_MININT, G_MAXINT, JPEG_DEFAULT_MAX_ERRORS,

Good catch.

@@ +1681,3 @@
       break;
+    case PROP_MAX_ERRORS:
+      dec->max_errors = g_value_get_int (value);

What do you suggest be done? Leave it as is since it's mirroring other
properties?

@@ +1722,3 @@
   switch (transition) {
     case GST_STATE_CHANGE_READY_TO_PAUSED:
+      dec->max_error_count = dec->max_errors;

Elsewhere we're setting the error count to zero when good frames come in. This
just ensures that the error count is capped at every ready -> paused transition
(in case you had more than max_errors before the pipeline was able to
shutdown).

I don't think it would hurt to reset it to 0.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list