|
|
@ -152,7 +152,6 @@ void ssrc_free(void *p) { |
|
|
g_slice_free1(sizeof(*s), s); |
|
|
g_slice_free1(sizeof(*s), s); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// mf must be unlocked; returns ssrc locked |
|
|
// mf must be unlocked; returns ssrc locked |
|
|
static ssrc_t *ssrc_get(stream_t *stream, unsigned long ssrc) { |
|
|
static ssrc_t *ssrc_get(stream_t *stream, unsigned long ssrc) { |
|
|
metafile_t *mf = stream->metafile; |
|
|
metafile_t *mf = stream->metafile; |
|
|
@ -177,9 +176,26 @@ out: |
|
|
dbg("Init for SSRC %s%lx%s of stream #%lu", FMT_M(ret->ssrc), stream->id); |
|
|
dbg("Init for SSRC %s%lx%s of stream #%lu", FMT_M(ret->ssrc), stream->id); |
|
|
|
|
|
|
|
|
if (mf->recording_on && !ret->output && output_single) { |
|
|
if (mf->recording_on && !ret->output && output_single) { |
|
|
char buf[16]; |
|
|
|
|
|
snprintf(buf, sizeof(buf), "%08lx", ssrc); |
|
|
|
|
|
ret->output = output_new(output_dir, mf->parent, buf); |
|
|
|
|
|
|
|
|
ilog(LOG_INFO, "Metadata %s and output %s", mf->metadata, mf->output_dest); |
|
|
|
|
|
if (mf->output_dest) { |
|
|
|
|
|
char path[256]; |
|
|
|
|
|
strncpy(path, mf->output_dest, sizeof(path)); |
|
|
|
|
|
char *sep = strrchr(path, '/'); |
|
|
|
|
|
if (sep) { |
|
|
|
|
|
char *filename = sep + 1; |
|
|
|
|
|
*sep = 0; |
|
|
|
|
|
ret->output = output_new(path, mf->parent, filename); |
|
|
|
|
|
ret->output->skip_filename_extension = TRUE; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
ret->output = output_new(output_dir, mf->parent, path); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
char buf[16]; |
|
|
|
|
|
snprintf(buf, sizeof(buf), "%08lx", ssrc); |
|
|
|
|
|
ret->output = output_new(output_dir, mf->parent, buf); |
|
|
|
|
|
} |
|
|
db_do_stream(mf, ret->output, "single", stream, ssrc); |
|
|
db_do_stream(mf, ret->output, "single", stream, ssrc); |
|
|
} |
|
|
} |
|
|
if ((stream->forwarding_on || mf->forwarding_on) && !ret->tls_fwd_stream) { |
|
|
if ((stream->forwarding_on || mf->forwarding_on) && !ret->tls_fwd_stream) { |
|
|
|