52#include <condition_variable>
60#define DEFAULT_BUF_SIZE_MS 100L
62#define FRAME_NETWORK 0
63#define FRAME_CAPTURE 1
64#define MOD_NAME "[acap.] "
66using std::condition_variable;
67using std::chrono::milliseconds;
70using std::unique_lock;
88 const char *dev,
const char *
name)
91 strncpy((*available_devices)[0].
dev,
dev,
sizeof (*available_devices)[0].
dev - 1);
92 strncpy((*available_devices)[0].
name,
name,
sizeof (*available_devices)[0].
name - 1);
93 snprintf((*available_devices)[0].
extra,
sizeof (*available_devices)[0].
extra,
"\"isEmbeddedAudio\":\"t\"");
118 if (strcmp(cfg,
"help") == 0) {
119 printf(
"Available vidcap audio devices:\n");
123 printf(
"\t\twhere <index> is index of vidcap device "
124 "to be taken audio from.\n");
135 unique_lock<mutex> lk(s->
lock);
158 for(
int i = 0; i < 2; ++i) {
165 if(strcmp(driver_name,
"embedded") == 0) {
166 printf(
"\tembedded[:<index>] : SDI audio (if available)\n");
167 }
else if(strcmp(driver_name,
"AESEBU") == 0) {
168 printf(
"\tAESEBU[:<index>] : separately connected AES/EBU to a grabbing card (if available)\n");
169 }
else if(strcmp(driver_name,
"analog") == 0) {
170 printf(
"\tanalog[:<index>] : analog input of grabbing card (if available)\n");
180 unique_lock<mutex> lk(s->
lock);
struct video_frame * frame
int void(** deleter)(void *))
This file contains definition of some common audio types.
#define AUDIO_CAPTURE_ABI_VERSION
#define LOG_LEVEL_WARNING
less severe errors
std::unordered_map< std::string, std::string > commandline_params
@ LIBRARY_CLASS_AUDIO_CAPTURE
#define REGISTER_MODULE(name, info, lclass, abi)
Registers module to global modules' registry.
void sdi_capture_new_incoming_frame(void *state, struct audio_frame *frame)
static void audio_cap_sdi_probe_embedded(struct device_info **available_devices, int *count, void(**deleter)(void *))
static const struct audio_capture_info acap_sdi_info_aesebu
static void audio_cap_sdi_probe_analog(struct device_info **available_devices, int *count, void(**deleter)(void *))
static const struct audio_capture_info acap_sdi_info_analog
static const struct audio_capture_info acap_sdi_info_embedded
static void audio_cap_sdi_probe_common(struct device_info **available_devices, int *count, const char *dev, const char *name)
static void audio_cap_sdi_help(const char *driver_name)
static void audio_cap_sdi_probe_aesebu(struct device_info **available_devices, int *count, void(**deleter)(void *))
static void audio_cap_sdi_done(void *state)
static void * audio_cap_sdi_init(struct module *parent, const char *cfg)
#define DEFAULT_BUF_SIZE_MS
static struct audio_frame * audio_cap_sdi_read(void *state)
struct used to comunicate with audio capture/playback device
condition_variable audio_frame_ready_cv
struct audio_frame audio_frame[2]
This file contains some common data types.
@ TIMESTAMP_VALID
timestamp set by source (in 90 kHz clock)