UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
Collaboration diagram for Audio:

Functions

void display_put_audio_frame (struct display *d, const struct audio_frame *frame)
 Puts audio data.
 
bool display_reconfigure_audio (struct display *d, int quant_samples, int channels, int sample_rate)
 

Detailed Description

Audio related functions (embedded audio).

Note
This functions will be called from different thread than video functions.

Function Documentation

◆ display_put_audio_frame()

void display_put_audio_frame ( struct display * d,
const struct audio_frame * frame )

Puts audio data.

Parameters
dvideo display
frameaudio frame to be played

Definition at line 574 of file video_display.c.

575{
576 assert(d->magic == DISPLAY_MAGIC);
578}
struct video_frame * frame
void * state
state of the created video capture driver
const struct video_display_info * funcs
uint32_t magic
For debugging. Conatins DISPLAY_MAGIC.
void(* put_audio_frame)(void *state, const struct audio_frame *frame)
may be NULL
#define DISPLAY_MAGIC

References DISPLAY_MAGIC, frame, display::funcs, display::magic, video_display_info::put_audio_frame, and display::state.

Referenced by display_aggregate_put_audio_frame(), display_multiplier_put_audio_frame(), main(), and vidcap_ug_input_init().

◆ display_reconfigure_audio()

bool display_reconfigure_audio ( struct display * d,
int quant_samples,
int channels,
int sample_rate )

This function instructs video driver to reconfigure itself

Parameters
dvideo display structure
quant_samplesnumber of bits per sample
channelscount of channels
sample_ratesamples per second
Return values
TRUEif reconfiguration succeeded
FALSEif reconfiguration failed

Definition at line 590 of file video_display.c.

591{
592 assert(d->magic == DISPLAY_MAGIC);
593 if (!d->funcs->reconfigure_audio) {
594 log_msg(LOG_LEVEL_FATAL, MOD_NAME "Selected display '%s' doesn't support audio!\n", d->display_name);
596 return FALSE;
597 }
599}
int int int sample_rate
int int channels
int quant_samples
#define FALSE
void log_msg(int level, const char *format,...)
Definition debug.cpp:130
#define LOG_LEVEL_FATAL
errors that prevent UG run
Definition debug.h:58
void exit_uv(int status)
Definition host.cpp:625
#define EXIT_FAIL_USAGE
Definition host.h:61
char * display_name
bool(* reconfigure_audio)(void *state, int quant_samples, int channels, int sample_rate)
#define MOD_NAME

References channels, DISPLAY_MAGIC, display::display_name, EXIT_FAIL_USAGE, exit_uv(), FALSE, display::funcs, LOG_LEVEL_FATAL, log_msg(), display::magic, MOD_NAME, quant_samples, video_display_info::reconfigure_audio, sample_rate, and display::state.

Referenced by display_aggregate_reconfigure_audio(), display_multiplier_reconfigure_audio(), main(), and vidcap_ug_input_init().

Here is the call graph for this function: