![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include "config_unix.h"#include "config_win32.h"#include "compat/platform_pipe.h"#include <stdlib.h>#include <stdio.h>#include <thread>#include <mutex>#include <algorithm>#include <string_view>#include "astat.h"
Go to the source code of this file.
Classes | |
| struct | ug_connection |
Macros | |
| #define | MSG_DONTWAIT 0 |
| #define | MSG_NOSIGNAL 0 |
Functions | |
| bool | astat_parse_line (const char *str, double volpeak[CH_COUNT], double volrms[CH_COUNT]) |
| static void | parse_and_store (ug_connection &c, const char *str) |
| void | ug_control_cleanup () |
| void | ug_control_connection_done (struct ug_connection *c) |
| struct ug_connection * | ug_control_connection_init (int local_port) |
| bool | ug_control_get_volumes (struct ug_connection *c, double peak[], double rms[], int *count) |
| void | ug_control_init () |
| static void | worker (ug_connection &) |
| static ssize_t | write_all (fd_t fd, const void *buf, size_t count) |
| #define MSG_DONTWAIT 0 |
Definition at line 22 of file astat.cpp.
Referenced by ug_control_connection_done().
| #define MSG_NOSIGNAL 0 |
Definition at line 18 of file astat.cpp.
Referenced by write_all().
| bool astat_parse_line | ( | const char * | str, |
| double | volpeak[CH_COUNT], | ||
| double | volrms[CH_COUNT] ) |
Definition at line 62 of file astat.cpp.
References CH_COUNT.
Referenced by parse_and_store().
|
static |
Definition at line 86 of file astat.cpp.
References astat_parse_line(), CH_COUNT, ug_connection::lock, ug_connection::sample_count, ug_connection::volpeak, and ug_connection::volrms.
Referenced by worker().

| void ug_control_cleanup | ( | ) |
| void ug_control_connection_done | ( | struct ug_connection * | c | ) |
Definition at line 205 of file astat.cpp.
References CLOSESOCKET, ug_connection::fd, MSG_DONTWAIT, platform_pipe_close(), ug_connection::should_exit, ug_connection::should_exit_fd, and ug_connection::t.

| struct ug_connection * ug_control_connection_init | ( | int | local_port | ) |
| local_port | UltraGrid control port to connect to |
Definition at line 177 of file astat.cpp.
References CLOSESOCKET, ug_connection::fd, platform_pipe_init(), ug_connection::should_exit_fd, and write_all().

| bool ug_control_get_volumes | ( | struct ug_connection * | c, |
| double | peak[], | ||
| double | rms[], | ||
| int * | count ) |
| peak | Returns peak volume for 2 channels. Must be array of 2 doubles. |
| rms | Returns RMS volume for 2 channels. Must be array of 2 doubles. |
| false | if connection was closed |
Definition at line 227 of file astat.cpp.
References ug_connection::connection_lost, count, ug_connection::lock, ug_connection::sample_count, ug_connection::volpeak, and ug_connection::volrms.
| void ug_control_init | ( | ) |
|
static |
Definition at line 105 of file astat.cpp.
References ug_connection::connection_lost, ug_connection::fd, ug_connection::lock, parse_and_store(), ug_connection::should_exit, and ug_connection::should_exit_fd.

|
static |
Definition at line 30 of file astat.cpp.
References count, and MSG_NOSIGNAL.
Referenced by ug_control_connection_init().