26 #define ISAAC_MAX_RECEIVE 4194304 //4 MB 55 pthread_mutex_lock(&deep_copy_mutex);
58 pthread_mutex_unlock(&deep_copy_mutex);
62 if (
type ==
NONE && (json_type = json_object_get(
json_root,
"type")) && json_is_string(json_type))
64 const char* str = json_string_value(json_type);
65 if (strcmp(str,
"feedback") == 0)
68 if (strcmp(str,
"hello") == 0)
71 if (strcmp(str,
"register") == 0)
74 if (strcmp(str,
"register video") == 0)
77 if (strcmp(str,
"exit") == 0)
80 if (strcmp(str,
"period video") == 0)
83 if (strcmp(str,
"period") == 0)
86 if (strcmp(str,
"observe") == 0)
89 if (strcmp(str,
"stop") == 0)
92 if (strcmp(str,
"closed") == 0)
95 if (strcmp(str,
"update") == 0)
135 ref_count (ref_count )
137 pthread_mutex_init (&ref_mutex, NULL);
141 pthread_mutex_destroy(&ref_mutex);
145 pthread_mutex_lock (&ref_mutex);
147 pthread_mutex_unlock (&ref_mutex);
151 pthread_mutex_lock (&ref_mutex);
155 pthread_mutex_unlock (&ref_mutex);
160 pthread_mutex_unlock (&ref_mutex);
174 reference( reference ),
175 ref_count( ref_count ),
178 insitu_id( insitu_id )
181 pthread_mutex_init (&json_mutex, NULL);
182 pthread_mutex_init (&payload_mutex, NULL);
192 pthread_mutex_destroy(&json_mutex);
193 pthread_mutex_destroy(&payload_mutex);
InsituConnectorGroup * group
pthread_mutex_t json_mutex
pthread_mutex_t ref_mutex
static pthread_mutex_t deep_copy_mutex
ImageBuffer(uint8_t *buffer, int ref_count)
MessageContainer(MessageType type=NONE, json_t *json_root=NULL, bool keep_json=false, bool drop_able=false)
ImageBufferContainer(ImageBufferType type, uint8_t *buffer, InsituConnectorGroup *group, int ref_count, std::string target="", void *reference=NULL, json_t *json=NULL, json_t *payload=NULL, int insitu_id=0)
pthread_mutex_t payload_mutex