motioncells: use standard macro for boolean
authorNicola Murino <nicola.murino@gmail.com>
Tue, 20 May 2014 05:25:20 +0000 (07:25 +0200)
committerThiago Santos <ts.santos@sisa.samsung.com>
Fri, 30 May 2014 19:58:59 +0000 (16:58 -0300)
https://bugzilla.gnome.org/show_bug.cgi?id=730141

ext/opencv/gstmotioncells.c
ext/opencv/motioncells_wrapper.cpp

index d5e037ebdb736563092c6c1b99c0815284824a0e..483083b01ae9224973d32e375f391aa275d5e3a6 100644 (file)
@@ -376,19 +376,19 @@ gst_motion_cells_init (GstMotioncells * filter)
   filter->diff_timestamp = -1;
   gettimeofday (&filter->tv, NULL);
   filter->starttime = 1000 * filter->tv.tv_sec;
-  filter->previous_motion = false;
-  filter->changed_datafile = false;
-  filter->postallmotion = false;
-  filter->usealpha = true;
-  filter->firstdatafile = false;
-  filter->firstgridx = true;
-  filter->firstgridy = true;
-  filter->changed_gridx = false;
-  filter->changed_gridy = false;
-  filter->firstframe = true;
-  filter->changed_startime = false;
-  filter->sent_init_error_msg = false;
-  filter->sent_save_error_msg = false;
+  filter->previous_motion = FALSE;
+  filter->changed_datafile = FALSE;
+  filter->postallmotion = FALSE;
+  filter->usealpha = TRUE;
+  filter->firstdatafile = FALSE;
+  filter->firstgridx = TRUE;
+  filter->firstgridy = TRUE;
+  filter->changed_gridx = FALSE;
+  filter->changed_gridy = FALSE;
+  filter->firstframe = TRUE;
+  filter->changed_startime = FALSE;
+  filter->sent_init_error_msg = FALSE;
+  filter->sent_save_error_msg = FALSE;
   filter->thickness = THICKNESS_DEF;
 
   filter->datafileidx = 0;
@@ -417,14 +417,14 @@ gst_motion_cells_set_property (GObject * object, guint prop_id,
     case PROP_GRID_X:
       filter->gridx = g_value_get_int (value);
       if (filter->prevgridx != filter->gridx && !filter->firstframe) {
-        filter->changed_gridx = true;
+        filter->changed_gridx = TRUE;
       }
       filter->prevgridx = filter->gridx;
       break;
     case PROP_GRID_Y:
       filter->gridy = g_value_get_int (value);
       if (filter->prevgridy != filter->gridy && !filter->firstframe) {
-        filter->changed_gridy = true;
+        filter->changed_gridy = TRUE;
       }
       filter->prevgridy = filter->gridy;
       break;
@@ -457,7 +457,7 @@ gst_motion_cells_set_property (GObject * object, guint prop_id,
       break;
     case PROP_DATE:
       if (!filter->firstframe) {
-        filter->changed_startime = true;
+        filter->changed_startime = TRUE;
       }
       filter->starttime = g_value_get_long (value);
       break;
@@ -966,7 +966,7 @@ gst_motion_cells_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
           motioncellscolor, motioncells_count, motioncellsidx, starttime,
           datafile, changed_datafile, thickness, filter->id);
 
-      if ((success == 1) && (filter->sent_init_error_msg == false)) {
+      if ((success == 1) && (filter->sent_init_error_msg == FALSE)) {
         char *initfailedreason;
         int initerrorcode;
         GstStructure *s;
@@ -979,7 +979,7 @@ gst_motion_cells_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
         gst_element_post_message (GST_ELEMENT (filter), m);
         filter->sent_init_error_msg = TRUE;
       }
-      if ((success == -1) && (filter->sent_save_error_msg == false)) {
+      if ((success == -1) && (filter->sent_save_error_msg == FALSE)) {
         char *savefailedreason;
         int saveerrorcode;
         GstStructure *s;
@@ -1019,11 +1019,11 @@ gst_motion_cells_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
         detectedmotioncells = getMotionCellsIdx (filter->id);
         if (detectedmotioncells) {
           filter->consecutive_motion++;
-          if ((filter->previous_motion == false)
+          if ((filter->previous_motion == FALSE)
               && (filter->consecutive_motion >= minimum_motion_frames)) {
             GstStructure *s;
             GstMessage *m;
-            filter->previous_motion = true;
+            filter->previous_motion = TRUE;
             filter->motion_begin_timestamp = GST_BUFFER_TIMESTAMP (buf);
             s = gst_structure_new ("motion", "motion_cells_indices",
                 G_TYPE_STRING, detectedmotioncells, "motion_begin",
@@ -1058,7 +1058,7 @@ gst_motion_cells_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
           if (filter->previous_motion) {
             GstStructure *s;
             GstMessage *m;
-            filter->previous_motion = false;
+            filter->previous_motion = FALSE;
             s = gst_structure_new ("motion", "motion_finished", G_TYPE_UINT64,
                 filter->last_motion_timestamp, NULL);
             m = gst_message_new_element (GST_OBJECT (filter), s);
index 9452216652f4d1c596f1cd709612555f38e739e3..dc52443eefbf4a81680baea5e3fc6a629c654123 100644 (file)
@@ -54,7 +54,7 @@
 #include "motioncells_wrapper.h"
 
 static int instanceCounter = 0;
-static gboolean element_id_was_max = false;
+static bool element_id_was_max = false;
 
 MotionCells *mc;
 char p_str[] = "idx failed";