c->codec_id = codec_id;
+ if (mm->auth_username) {
+ char tmp[256] = "";
+ switch_snprintf(tmp, sizeof(tmp), "pubUser=%s", mm->auth_username);
+ av_set_options_string(c, tmp, "=", ":");
+
+ if (mm->auth_password) {
+ switch_snprintf(tmp, sizeof(tmp), "pubPasswd=%s", mm->auth_password);
+ av_set_options_string(c, tmp, "=", ":");
+ }
+ }
+
/* Resolution must be a multiple of two. */
c->width = mst->width;
c->height = mst->height;
fh->mm.try_hardware_encoder = switch_true(val);
}
+ if ((val = switch_event_get_header(fh->params, "auth_username"))) {
+ fh->mm.auth_username = switch_core_strdup(fh->memory_pool, val);
+ }
+
+ if ((val = switch_event_get_header(fh->params, "auth_password"))) {
+ fh->mm.auth_password = switch_core_strdup(fh->memory_pool, val);
+ }
+
if ((val = switch_event_get_header(fh->params, "fps"))) {
float ftmp = atof(val);
if (ftmp > 0.0f) {