Browse Source

MT#62571 allow creation of mix after streams

Change-Id: I98a45fb7394e561010a36772e9c56395e80ca26e
pull/1967/head
Richard Fuchs 5 months ago
parent
commit
15465d0878
4 changed files with 7 additions and 3 deletions
  1. +2
    -1
      recording-daemon/metafile.c
  2. +3
    -1
      recording-daemon/mix.c
  3. +1
    -1
      recording-daemon/mix.h
  4. +1
    -0
      recording-daemon/types.h

+ 2
- 1
recording-daemon/metafile.c View File

@ -104,7 +104,7 @@ static void meta_mix_output(metafile_t *mf) {
mf->mix_out = output_new_ext(mf, "mix", "mixed", "mix");
if (mix_method == MM_CHANNELS)
mf->mix_out->channel_mult = mix_num_inputs;
mf->mix = mix_new();
mf->mix = mix_new(mf->media_rec_slots);
db_do_stream(mf, mf->mix_out, NULL, 0);
}
@ -127,6 +127,7 @@ static void meta_stream_details(metafile_t *mf, unsigned long snum, char *conten
&tag, &media, &tm, &cmp, &flags, &media_sdp_id, &media_rec_slot, &media_rec_slots) != 8)
return;
mf->media_rec_slots = media_rec_slots;
mix_set_channel_slots(mf->mix, media_rec_slots);
stream_details(mf, snum, tag, media_sdp_id, media_rec_slot-1);
}


+ 3
- 1
recording-daemon/mix.c View File

@ -249,7 +249,7 @@ err:
}
mix_t *mix_new(void) {
mix_t *mix_new(unsigned int media_rec_slots) {
mix_t *mix = g_new0(mix_t, 1);
format_init(&mix->in_format);
format_init(&mix->out_format);
@ -265,6 +265,8 @@ mix_t *mix_new(void) {
mix->next_idx[i] = i;
}
mix_set_channel_slots(mix, media_rec_slots);
return mix;
}


+ 1
- 1
recording-daemon/mix.h View File

@ -6,7 +6,7 @@
#define MIX_MAX_INPUTS 4
mix_t *mix_new(void);
mix_t *mix_new(unsigned int);
void mix_destroy(mix_t *mix);
void mix_set_channel_slots(mix_t *mix, unsigned int);
bool mix_config(sink_t *, const format_t *requested_format, format_t *actual_format);


+ 1
- 0
recording-daemon/types.h View File

@ -151,6 +151,7 @@ struct metafile_s {
unsigned long long db_id;
unsigned int db_streams;
int64_t start_time_us;
unsigned int media_rec_slots;
GStringChunk *gsc; // XXX limit max size


Loading…
Cancel
Save