findMatchesInAllPeriods_(streamsPerPeriod, outputStream,
      shouldAppend = false) {
    const matches = shouldAppend ? outputStream.matchedStreams : [];
    for (const streams of streamsPerPeriod) {
      const match = this.findBestMatchInPeriod_(streams, outputStream);
      if (!match) {
        return;
      }
      matches.push(match);
    }
    outputStream.matchedStreams = matches;
  }
Finds streams in all periods which match the output stream.

@param {!Array<!Map<string, T>>} streamsPerPeriod
@param {T} outputStream
@param {boolean=} shouldAppend

@template T
Accepts either a StreamDB or Stream type.

@private