![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include <jack/jack.h>#include <limits.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "audio/jack.h"#include "audio/types.h"#include "jack_common.h"#include "pthread.h"#include "rtp/pbuf.h"#include "rtp/rtp.h"
Go to the source code of this file.
Classes | |
| struct | state_jack |
Macros | |
| #define | BUFF_ELEM (1<<16) |
| #define | BUFF_SIZE (BUFF_ELEM * sizeof(float)) |
| #define | CLIENT_NAME "UltraGrid Transport" |
| #define | MAX_PORTS 8 |
| #define | MOD_NAME "[JACK trans.] " |
Functions | |
| static int | attach_input_ports (struct state_jack *s) |
| int | is_jack_receiver (void *state) |
| int | is_jack_sender (void *state) |
| int | jack_process_callback (jack_nframes_t nframes, void *arg) |
| bool | jack_receive (void *state, void *data) |
| Receives data from JACK. | |
| int | jack_samplerate_changed_callback (jack_nframes_t nframes, void *arg) |
| void | jack_send (void *state, struct audio_frame *frame) |
| void * | jack_start (const char *cfg) |
| void | reconfigure_send_ch_count (struct state_jack *s, int ch_count) |
| static int | settings_init (struct state_jack *s, char *cfg) |
| #define BUFF_SIZE (BUFF_ELEM * sizeof(float)) |
Definition at line 58 of file jack.c.
Referenced by jack_process_callback(), jack_receive(), jack_send(), jack_start(), and reconfigure_send_ch_count().
| #define CLIENT_NAME "UltraGrid Transport" |
Definition at line 56 of file jack.c.
Referenced by jack_start().
|
static |
Definition at line 237 of file jack.c.
References audio_frame::ch_count, state_jack::client, libjack_connection::connect, FALSE, libjack_connection::get_ports, state_jack::in_ch_count, state_jack::in_port_pattern, state_jack::input_port, state_jack::libjack, LOG_LEVEL_ERROR, log_msg(), MOD_NAME, libjack_connection::port_name, state_jack::record, and TRUE.
Referenced by jack_start().

| int is_jack_receiver | ( | void * | state | ) |
Definition at line 426 of file jack.c.
References state.
Referenced by audio_start().
| int is_jack_sender | ( | void * | state | ) |
| static int jack_process_callback | ( | jack_nframes_t | nframes, |
| void * | arg ) |
Definition at line 94 of file jack.c.
References BUFF_SIZE, audio_frame::ch_count, state_jack::input_port, state_jack::libjack, state_jack::out_channel_count, state_jack::output_port, state_jack::play_buffer, state_jack::play_buffer_end, state_jack::play_buffer_start, libjack_connection::port_get_buffer, state_jack::rec_buffer, state_jack::rec_buffer_end, and state_jack::record.
| bool jack_receive | ( | void * | state, |
| void * | data ) |
Receives data from JACK.
| [in] | state | state returned by jack_init() |
| [out] | data | pbuf_audio_data |
| true | if some data are receied |
| false | if no data were receied |
Definition at line 387 of file jack.c.
References audio_frame::bps, BUFF_SIZE, pbuf_audio_data::buffer, audio_frame::ch_count, audio_frame::data, audio_frame::data_len, state_jack::rec_buffer, state_jack::rec_buffer_end, state_jack::rec_buffer_start, state_jack::record, audio_frame::sample_rate, and state.
Referenced by audio_receiver_thread().
| static int jack_samplerate_changed_callback | ( | jack_nframes_t | nframes, |
| void * | arg ) |
Definition at line 140 of file jack.c.
References state_jack::record, and audio_frame::sample_rate.
| void jack_send | ( | void * | state, |
| struct audio_frame * | frame ) |
Definition at line 355 of file jack.c.
References BUFF_SIZE, channels, frame, state_jack::out_channel_count, state_jack::play_buffer, state_jack::play_buffer_end, reconfigure_send_ch_count(), and state.
Referenced by audio_sender_thread().

| void * jack_start | ( | const char * | cfg | ) |
Definition at line 264 of file jack.c.
References libjack_connection::activate, attach_input_ports(), audio_frame::bps, BUFF_SIZE, audio_frame::ch_count, state_jack::client, CLIENT_NAME, libjack_connection::client_open, close_libjack(), audio_frame::data, FALSE, libjack_connection::get_sample_rate, state_jack::in_ch_count, state_jack::in_port_pattern, state_jack::input_port, jack_process_callback(), jack_samplerate_changed_callback(), state_jack::libjack, LOG_LEVEL_ERROR, log_msg(), MAX_PORTS, MOD_NAME, name, open_libjack(), state_jack::out_channel_count, state_jack::out_channel_count_req, state_jack::out_port_pattern, state_jack::output_port, state_jack::play_buffer_end, state_jack::play_buffer_start, libjack_connection::port_register, state_jack::rec_buffer, state_jack::rec_buffer_end, state_jack::rec_buffer_start, state_jack::receiver, state_jack::record, audio_frame::sample_rate, state_jack::sender, libjack_connection::set_process_callback, libjack_connection::set_sample_rate_callback, and settings_init().
Referenced by audio_start().

| void reconfigure_send_ch_count | ( | struct state_jack * | s, |
| int | ch_count ) |
Definition at line 147 of file jack.c.
References BUFF_SIZE, audio_frame::ch_count, state_jack::client, libjack_connection::connect, libjack_connection::disconnect, libjack_connection::get_ports, state_jack::libjack, LOG_LEVEL_ERROR, LOG_LEVEL_NOTICE, LOG_LEVEL_WARNING, log_msg(), MOD_NAME, state_jack::out_channel_count, state_jack::out_channel_count_req, state_jack::out_port_pattern, state_jack::output_port, state_jack::play_buffer, libjack_connection::port_name, and state_jack::record.
Referenced by jack_send().

|
static |
Definition at line 186 of file jack.c.
References state_jack::in_ch_count, state_jack::in_port_pattern, state_jack::out_port_pattern, state_jack::receiver, state_jack::sender, and TRUE.
Referenced by display_decklink_init(), and jack_start().