75 if (s->
funcs == NULL) {
80 strncpy(s->
name, driver,
sizeof s->
name - 1);
114 printf(
"Available audio capture devices:\n");
142 char *tmp = strdup(const_device_name);
144 char *save_ptr = NULL;
145 char *device_name = strtok_r(tmp,
":", &save_ptr);
146 assert(device_name != NULL);
149 if(strcasecmp(device_name,
"embedded") == 0) {
151 }
else if(strcasecmp(device_name,
"AESEBU") == 0) {
153 }
else if(strcasecmp(device_name,
"analog") == 0) {
170 char *tmp = strdup(const_device_name);
172 char *save_ptr = NULL;
175 strtok_r(tmp,
":", &save_ptr);
176 char *vidcap_index_str = strtok_r(NULL,
":", &save_ptr);
178 if (vidcap_index_str == NULL) {
181 ret = atoi(vidcap_index_str);
This file contains definition of some common audio types.
int audio_capture_init(struct module *parent, const char *driver, const char *cfg, struct state_audio_capture **state)
struct state_audio_capture * audio_capture_init_null_device()
unsigned int audio_capture_get_vidcap_flags(const char *const_device_name)
void audio_capture_done(struct state_audio_capture *s)
void * audio_capture_get_state_pointer(struct state_audio_capture *s)
int audio_capture_get_vidcap_index(const char *const_device_name)
const char * audio_capture_get_driver_name(struct state_audio_capture *s)
struct audio_frame * audio_capture_read(struct state_audio_capture *s)
void audio_capture_print_help(bool full)
#define AUDIO_CAPTURE_ABI_VERSION
void log_msg(int level, const char *format,...)
#define LOG_LEVEL_ERROR
general errors
void list_modules(enum library_class cls, int abi_version, bool full)
const void * load_library(const char *name, enum library_class cls, int abi_version)
@ LIBRARY_CLASS_AUDIO_CAPTURE
struct audio_frame *(* read)(void *state)
void *(* init)(struct module *parent, const char *cfg)
void(* done)(void *state)
struct used to comunicate with audio capture/playback device
const struct audio_capture_info * funcs
#define VIDCAP_FLAG_AUDIO_AESEBU
AES/EBU audio.
#define VIDCAP_FLAG_AUDIO_ANALOG
(balanced) analog audio
#define VIDCAP_FLAG_AUDIO_EMBEDDED
HD-SDI embedded audio.