motioncells: use standard macro for boolean
https://bugzilla.gnome.org/show_bug.cgi?id=730141
This commit is contained in:
parent
ab4d8d3d3c
commit
b5cefffb9f
@ -376,19 +376,19 @@ gst_motion_cells_init (GstMotioncells * filter)
|
|||||||
filter->diff_timestamp = -1;
|
filter->diff_timestamp = -1;
|
||||||
gettimeofday (&filter->tv, NULL);
|
gettimeofday (&filter->tv, NULL);
|
||||||
filter->starttime = 1000 * filter->tv.tv_sec;
|
filter->starttime = 1000 * filter->tv.tv_sec;
|
||||||
filter->previous_motion = false;
|
filter->previous_motion = FALSE;
|
||||||
filter->changed_datafile = false;
|
filter->changed_datafile = FALSE;
|
||||||
filter->postallmotion = false;
|
filter->postallmotion = FALSE;
|
||||||
filter->usealpha = true;
|
filter->usealpha = TRUE;
|
||||||
filter->firstdatafile = false;
|
filter->firstdatafile = FALSE;
|
||||||
filter->firstgridx = true;
|
filter->firstgridx = TRUE;
|
||||||
filter->firstgridy = true;
|
filter->firstgridy = TRUE;
|
||||||
filter->changed_gridx = false;
|
filter->changed_gridx = FALSE;
|
||||||
filter->changed_gridy = false;
|
filter->changed_gridy = FALSE;
|
||||||
filter->firstframe = true;
|
filter->firstframe = TRUE;
|
||||||
filter->changed_startime = false;
|
filter->changed_startime = FALSE;
|
||||||
filter->sent_init_error_msg = false;
|
filter->sent_init_error_msg = FALSE;
|
||||||
filter->sent_save_error_msg = false;
|
filter->sent_save_error_msg = FALSE;
|
||||||
filter->thickness = THICKNESS_DEF;
|
filter->thickness = THICKNESS_DEF;
|
||||||
|
|
||||||
filter->datafileidx = 0;
|
filter->datafileidx = 0;
|
||||||
@ -417,14 +417,14 @@ gst_motion_cells_set_property (GObject * object, guint prop_id,
|
|||||||
case PROP_GRID_X:
|
case PROP_GRID_X:
|
||||||
filter->gridx = g_value_get_int (value);
|
filter->gridx = g_value_get_int (value);
|
||||||
if (filter->prevgridx != filter->gridx && !filter->firstframe) {
|
if (filter->prevgridx != filter->gridx && !filter->firstframe) {
|
||||||
filter->changed_gridx = true;
|
filter->changed_gridx = TRUE;
|
||||||
}
|
}
|
||||||
filter->prevgridx = filter->gridx;
|
filter->prevgridx = filter->gridx;
|
||||||
break;
|
break;
|
||||||
case PROP_GRID_Y:
|
case PROP_GRID_Y:
|
||||||
filter->gridy = g_value_get_int (value);
|
filter->gridy = g_value_get_int (value);
|
||||||
if (filter->prevgridy != filter->gridy && !filter->firstframe) {
|
if (filter->prevgridy != filter->gridy && !filter->firstframe) {
|
||||||
filter->changed_gridy = true;
|
filter->changed_gridy = TRUE;
|
||||||
}
|
}
|
||||||
filter->prevgridy = filter->gridy;
|
filter->prevgridy = filter->gridy;
|
||||||
break;
|
break;
|
||||||
@ -457,7 +457,7 @@ gst_motion_cells_set_property (GObject * object, guint prop_id,
|
|||||||
break;
|
break;
|
||||||
case PROP_DATE:
|
case PROP_DATE:
|
||||||
if (!filter->firstframe) {
|
if (!filter->firstframe) {
|
||||||
filter->changed_startime = true;
|
filter->changed_startime = TRUE;
|
||||||
}
|
}
|
||||||
filter->starttime = g_value_get_long (value);
|
filter->starttime = g_value_get_long (value);
|
||||||
break;
|
break;
|
||||||
@ -966,7 +966,7 @@ gst_motion_cells_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||||||
motioncellscolor, motioncells_count, motioncellsidx, starttime,
|
motioncellscolor, motioncells_count, motioncellsidx, starttime,
|
||||||
datafile, changed_datafile, thickness, filter->id);
|
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;
|
char *initfailedreason;
|
||||||
int initerrorcode;
|
int initerrorcode;
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
@ -979,7 +979,7 @@ gst_motion_cells_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||||||
gst_element_post_message (GST_ELEMENT (filter), m);
|
gst_element_post_message (GST_ELEMENT (filter), m);
|
||||||
filter->sent_init_error_msg = TRUE;
|
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;
|
char *savefailedreason;
|
||||||
int saveerrorcode;
|
int saveerrorcode;
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
@ -1019,11 +1019,11 @@ gst_motion_cells_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||||||
detectedmotioncells = getMotionCellsIdx (filter->id);
|
detectedmotioncells = getMotionCellsIdx (filter->id);
|
||||||
if (detectedmotioncells) {
|
if (detectedmotioncells) {
|
||||||
filter->consecutive_motion++;
|
filter->consecutive_motion++;
|
||||||
if ((filter->previous_motion == false)
|
if ((filter->previous_motion == FALSE)
|
||||||
&& (filter->consecutive_motion >= minimum_motion_frames)) {
|
&& (filter->consecutive_motion >= minimum_motion_frames)) {
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
GstMessage *m;
|
GstMessage *m;
|
||||||
filter->previous_motion = true;
|
filter->previous_motion = TRUE;
|
||||||
filter->motion_begin_timestamp = GST_BUFFER_TIMESTAMP (buf);
|
filter->motion_begin_timestamp = GST_BUFFER_TIMESTAMP (buf);
|
||||||
s = gst_structure_new ("motion", "motion_cells_indices",
|
s = gst_structure_new ("motion", "motion_cells_indices",
|
||||||
G_TYPE_STRING, detectedmotioncells, "motion_begin",
|
G_TYPE_STRING, detectedmotioncells, "motion_begin",
|
||||||
@ -1058,7 +1058,7 @@ gst_motion_cells_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||||||
if (filter->previous_motion) {
|
if (filter->previous_motion) {
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
GstMessage *m;
|
GstMessage *m;
|
||||||
filter->previous_motion = false;
|
filter->previous_motion = FALSE;
|
||||||
s = gst_structure_new ("motion", "motion_finished", G_TYPE_UINT64,
|
s = gst_structure_new ("motion", "motion_finished", G_TYPE_UINT64,
|
||||||
filter->last_motion_timestamp, NULL);
|
filter->last_motion_timestamp, NULL);
|
||||||
m = gst_message_new_element (GST_OBJECT (filter), s);
|
m = gst_message_new_element (GST_OBJECT (filter), s);
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#include "motioncells_wrapper.h"
|
#include "motioncells_wrapper.h"
|
||||||
|
|
||||||
static int instanceCounter = 0;
|
static int instanceCounter = 0;
|
||||||
static gboolean element_id_was_max = false;
|
static bool element_id_was_max = false;
|
||||||
|
|
||||||
MotionCells *mc;
|
MotionCells *mc;
|
||||||
char p_str[] = "idx failed";
|
char p_str[] = "idx failed";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user