amlv4l2dec: CB2 statistics of decoded error frames [1/1]

PD#SWPL-175658

Problem:
statistics of decoded error frames

Solution:
add property of decoding-error-frames
to statistics of decoded error frames

Verify:
ap222

Change-Id: Ibdb01eba31308f87b145d25003beabe06a44613d
Signed-off-by: fei.deng <fei.deng@amlogic.com>
diff --git a/src/gstamlv4l2object.c b/src/gstamlv4l2object.c
index 10cda33..792752e 100644
--- a/src/gstamlv4l2object.c
+++ b/src/gstamlv4l2object.c
@@ -429,6 +429,11 @@
                                     g_param_spec_boolean ("enable-nr",
                                                           "enable nr in di",
                                                           "0: disable; 1: enable", FALSE, G_PARAM_READWRITE));
+
+    g_object_class_install_property(gobject_class, PROP_DECODING_ERROR_FRAMES,
+                                    g_param_spec_int("decoding-error-frames", "decoding error frames",
+                                                         "get number of decoding error frames",
+                                                         0, G_MAXINT32, 0, G_PARAM_READABLE));
 }
 
 /* Support for 32bit off_t, this wrapper is casting off_t to gint64 */
@@ -539,6 +544,7 @@
     v4l2object->old_other_pool = NULL;
     v4l2object->old_old_other_pool = NULL;
     v4l2object->outstanding_buf_num = 0;
+    v4l2object->num_error_frames = 0;
     return v4l2object;
 }
 
@@ -826,6 +832,9 @@
     case PROP_LOW_LATENCY_MODE:
         g_value_set_boolean(value, v4l2object->low_latency_mode);
         break;
+    case PROP_DECODING_ERROR_FRAMES:
+        g_value_set_int(value, v4l2object->num_error_frames);
+        break;
     default:
         return FALSE;
         break;