fromStreamDB_(streamDB, timeline) {
    /** @type {!Array<!shaka.media.SegmentReference>} */
    const segments = streamDB.segments.map(
        (segment, index) => this.fromSegmentDB_(index, segment, streamDB));

    timeline.notifySegments(segments);

    /** @type {!shaka.media.SegmentIndex} */
    const segmentIndex = new shaka.media.SegmentIndex(segments);

    /** @type {shaka.extern.Stream} */
    const stream = {
      id: streamDB.id,
      originalId: streamDB.originalId,
      groupId: streamDB.groupId,
      createSegmentIndex: () => Promise.resolve(),
      segmentIndex,
      mimeType: streamDB.mimeType,
      codecs: streamDB.codecs,
      width: streamDB.width || undefined,
      height: streamDB.height || undefined,
      frameRate: streamDB.frameRate,
      pixelAspectRatio: streamDB.pixelAspectRatio,
      hdr: streamDB.hdr,
      colorGamut: streamDB.colorGamut,
      videoLayout: streamDB.videoLayout,
      kind: streamDB.kind,
      encrypted: streamDB.encrypted,
      drmInfos: [],
      keyIds: streamDB.keyIds,
      language: streamDB.language,
      originalLanguage: streamDB.originalLanguage || null,
      label: streamDB.label,
      type: streamDB.type,
      primary: streamDB.primary,
      trickModeVideo: null,
      dependencyStream: null,
      emsgSchemeIdUris: null,
      roles: streamDB.roles,
      forced: streamDB.forced,
      channelsCount: streamDB.channelsCount,
      audioSamplingRate: streamDB.audioSamplingRate,
      spatialAudio: streamDB.spatialAudio,
      closedCaptions: streamDB.closedCaptions,
      tilesLayout: streamDB.tilesLayout,
      mssPrivateData: streamDB.mssPrivateData,
      accessibilityPurpose: null,
      external: streamDB.external,
      fastSwitching: streamDB.fastSwitching,
      fullMimeTypes: new Set([shaka.util.MimeUtils.getFullType(
          streamDB.mimeType, streamDB.codecs)]),
      isAudioMuxedInVideo: false,
      baseOriginalId: null,
    };

    return stream;
  }
@param {shaka.extern.StreamDB} streamDB
@param {shaka.media.PresentationTimeline} timeline
@return {shaka.extern.Stream}
@private