| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | #ifndef _session_h_ |
|---|
| 15 | #define _session_h_ |
|---|
| 16 | |
|---|
| 17 | #include "net_udp.h" |
|---|
| 18 | #include "ts.h" |
|---|
| 19 | #include "converter_types.h" |
|---|
| 20 | #include "repair_types.h" |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | #define MAX_LAYERS 2 |
|---|
| 24 | |
|---|
| 25 | #define MAX_ENCODINGS 7 |
|---|
| 26 | #define MAX_NATIVE 4 |
|---|
| 27 | |
|---|
| 28 | #define MAX_PACKET_SAMPLES 1280 |
|---|
| 29 | #define PACKET_LENGTH MAX_PACKET_SAMPLES + 100 |
|---|
| 30 | |
|---|
| 31 | #define PORT_UNINIT 0 |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | #define AUDIO_TOOL 1 |
|---|
| 35 | #define TRANSCODER 2 |
|---|
| 36 | #define FLAKEAWAY 4 |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | #define GLOBAL_CLOCK_FREQ 96000 |
|---|
| 40 | |
|---|
| 41 | #define PT_VANILLA -1 |
|---|
| 42 | #define PT_INTERLEAVED 108 |
|---|
| 43 | #define PT_REDUNDANCY 121 |
|---|
| 44 | |
|---|
| 45 | #define SESSION_TITLE_LEN 40 |
|---|
| 46 | |
|---|
| 47 | extern int thread_pri; |
|---|
| 48 | |
|---|
| 49 | typedef struct s_session { |
|---|
| 50 | short id; |
|---|
| 51 | int mode; |
|---|
| 52 | char *title; |
|---|
| 53 | char asc_address[MAX_LAYERS][MAXHOSTNAMELEN+1]; |
|---|
| 54 | u_short rx_rtp_port[MAX_LAYERS]; |
|---|
| 55 | u_short tx_rtp_port[MAX_LAYERS]; |
|---|
| 56 | u_short rx_rtcp_port; |
|---|
| 57 | u_short tx_rtcp_port; |
|---|
| 58 | int ttl; |
|---|
| 59 | struct rtp *rtp_session[MAX_LAYERS]; |
|---|
| 60 | int rtp_session_count; |
|---|
| 61 | u_int8 layers; |
|---|
| 62 | int filter_loopback; |
|---|
| 63 | struct s_fast_time *clock; |
|---|
| 64 | struct s_time *device_clock; |
|---|
| 65 | struct s_cushion_struct *cushion; |
|---|
| 66 | struct s_mix_info *ms; |
|---|
| 67 | struct s_audio_config *new_config; |
|---|
| 68 | u_char encodings[MAX_ENCODINGS]; |
|---|
| 69 | int num_encodings; |
|---|
| 70 | struct s_channel_state *channel_coder; |
|---|
| 71 | int playing_audio; |
|---|
| 72 | repair_id_t repair; |
|---|
| 73 | converter_id_t converter; |
|---|
| 74 | int lecture; |
|---|
| 75 | int render_3d; |
|---|
| 76 | int echo_suppress; |
|---|
| 77 | int echo_was_sending; |
|---|
| 78 | int auto_lecture; |
|---|
| 79 | int receive_audit_required; |
|---|
| 80 | int detect_silence; |
|---|
| 81 | int meter; |
|---|
| 82 | u_int32 meter_period; |
|---|
| 83 | int ui_activated; |
|---|
| 84 | int sync_on; |
|---|
| 85 | int agc_on; |
|---|
| 86 | int ui_on; |
|---|
| 87 | char *ui_addr; |
|---|
| 88 | struct s_sndfile *in_file; |
|---|
| 89 | struct s_sndfile *out_file; |
|---|
| 90 | audio_desc_t audio_device; |
|---|
| 91 | struct s_tx_buffer *tb; |
|---|
| 92 | struct s_pdb *pdb; |
|---|
| 93 | |
|---|
| 94 | struct s_source_list *active_sources; |
|---|
| 95 | ts_sequencer decode_sequencer; |
|---|
| 96 | int limit_playout; |
|---|
| 97 | u_int32 min_playout; |
|---|
| 98 | u_int32 max_playout; |
|---|
| 99 | u_int32 last_depart_ts; |
|---|
| 100 | char *mbus_engine_addr; |
|---|
| 101 | struct mbus *mbus_engine; |
|---|
| 102 | char *mbus_ui_addr; |
|---|
| 103 | struct mbus *mbus_ui; |
|---|
| 104 | char *mbus_video_addr; |
|---|
| 105 | ts_t cur_ts; |
|---|
| 106 | int loopback_gain; |
|---|
| 107 | } session_t; |
|---|
| 108 | |
|---|
| 109 | void session_init(session_t *sp); |
|---|
| 110 | void session_exit(session_t *sp); |
|---|
| 111 | |
|---|
| 112 | #endif |
|---|