142{
143 uint16_t port = 5004;
145
149 }
151 const bool parse_ret =
parse_fmt(fmt_cpy, &port, &decode_to);
152 free(fmt_cpy);
153 if (!parse_ret) {
155 }
156
158
159 char cfg[128] = "";
160 snprintf(cfg, sizeof cfg, "%p", s);
162 snprintf(cfg + strlen(cfg), sizeof cfg - strlen(cfg),
164 }
166 assert(ret == 0 && "Unable to initialize proxy display");
167
168 map<string, param_u>
params;
169
170
172 params[
"exporter"].ptr = NULL;
173 params[
"compression"].str =
"none";
175
176
177 params[
"common"].ptr = &s->common;
178
179 params[
"receiver"].str =
"localhost";
180 params[
"rx_port"].i = port;
182 params[
"fec"].str =
"none";
184
185
187 params[
"display_device"].ptr = s->display;
188
190 assert (s->video_rxtx);
191
194 .host = "localhost",
195 .recv_port = port + 2,
196 .send_port = 0,
197 .recv_cfg = "embedded",
198 .send_cfg = "none",
199 .proto = "ultragrid_rtp",
200 .proto_cfg = "",
201 .fec_cfg = "none",
202 .channel_map = NULL,
203 .scale = "none",
204 .echo_cancellation = false,
205 .codec_cfg = "PCM"
206 };
207 if (
audio_init(&s->audio, &opt, &s->common) != 0) {
208 delete s;
210 }
211
215
216 },
217 s->video_rxtx.get()
218 };
220
222 }
223 s->t0 = steady_clock::now();
224
227
230}
const char * get_codec_name(codec_t codec)
void audio_register_aux_data(struct state_audio *s, struct additional_audio_data data)
int audio_init(struct state_audio **ret, const struct audio_options *opt, const struct common_opts *common)
void audio_start(struct state_audio *s)
bool display_reconfigure_audio(struct display *d, int quant_samples, int channels, int sample_rate)
void display_put_audio_frame(struct display *d, const struct audio_frame *frame)
Puts audio data.
bool display_ctl_property(struct display *d, int property, void *val, size_t *len)
Gets property from video display.
void display_run_new_thread(struct display *d)
int initialize_video_display(struct module *parent, const char *requested_display, const char *fmt, unsigned int flags, const char *postprocess, struct display **out)
Initializes video display.
#define VIDCAP_INIT_NOERR
state not initialized, other action performed (typically help)
#define VIDCAP_INIT_OK
initialization successful
#define VIDCAP_INIT_FAIL
error ocured
static struct @19 params[100]
static video_rxtx * create(std::string const &name, std::map< std::string, param_u > const &)
static void * receiver_thread(void *arg)
@ VIDEO_NORMAL
normal video (one tile)
struct module * vidcap_params_get_parent(const struct vidcap_params *params)
const char * vidcap_params_get_fmt(const struct vidcap_params *params)
unsigned int vidcap_params_get_flags(const struct vidcap_params *params)
#define VIDCAP_FLAG_AUDIO_ANY