36 #ifndef MEDIAPROCESSORS_UTILS_SRC_COMM_H_ 37 #define MEDIAPROCESSORS_UTILS_SRC_COMM_H_ 39 #include <sys/types.h> 66 comm_ctx_t* (*open)(
const char *url,
const char *local_url,
69 int (*send)(
comm_ctx_t *comm_ctx,
const void *buf,
size_t count,
70 struct timeval *timeout);
71 int (*recv)(
comm_ctx_t *comm_ctx,
void** ref_buf,
size_t *ref_count,
72 char **ref_from,
struct timeval *timeout);
175 comm_ctx_t* comm_open(
const char *url,
const char *local_url,
180 int comm_send(
comm_ctx_t *comm_ctx,
const void *buf,
size_t count,
181 struct timeval *timeout);
183 int comm_recv(
comm_ctx_t *comm_ctx,
void** ref_buf,
size_t *ref_count,
184 char **ref_from,
struct timeval* timeout);
222 int comm_open_external(pthread_mutex_t *comm_ctx_mutex_external,
223 const char *url,
const char *local_url,
comm_mode_t comm_mode,
226 void comm_close_external(pthread_mutex_t *comm_ctx_mutex_external,
229 int comm_reset_external(pthread_mutex_t *comm_ctx_mutex_external,
230 const char *new_url,
const char *local_url,
comm_mode_t comm_mode,
233 int comm_recv_external(pthread_mutex_t *comm_ctx_mutex_external,
234 comm_ctx_t **ref_comm_ctx,
void** ref_buf,
size_t *ref_count,
235 char **ref_from,
struct timeval* timeout,
log_ctx_t *log_ctx);
pthread_mutex_t api_mutex
struct comm_if_s comm_if_t
int comm_module_opt(const char *tag,...)
struct comm_ctx_s comm_ctx_t
enum comm_mode_enum comm_mode_t
int comm_module_open(log_ctx_t *log_ctx)
const comm_if_t * comm_if