function addStreamInfo(stream, variant, data, contentType, name) {
      const mediaQualityInfo = {
        bandwidth: 1,
        codecs: data[contentType].codecs || 'unknown',
        contentType: contentType,
        mimeType: data[contentType].mimeType,
        audioSamplingRate: null,
        frameRate: null,
        height: null,
        channelsCount: null,
        pixelAspectRatio: null,
        width: null,
        label: null,
        roles: null,
        language: null,
      };
      stream.mimeType = data[contentType].mimeType;
      stream.codecs = data[contentType].codecs;
      stream.setInitSegmentReference(
          ['test:' + name + '/' + contentType + '/init'], 0, null,
          mediaQualityInfo);
      stream.useSegmentTemplate(
          'test:' + name + '/' + contentType + '/%d',
          data[contentType].segmentDuration);
      stream.segmentIndex.markImmutable();
      stream.closedCaptions = data[contentType].closedCaptions;

      if (data[contentType].delaySetup) {
        stream.createSegmentIndex = () => shaka.test.Util.delay(1);
      }

      if (data.licenseServers) {
        // Real content typically doesn't contain license server URLs, but if it
        // does, we use them in preference over everything else.  There is a
        // config to override that for DASH, but this test utility isn't DASH
        // and that player config wouldn't do any good for a test case.
        //
        // So, we don't put the specific license servers into the manifest
        // structure.  That should always be done in the player config instead,
        // and we have the static setupPlayer() method above to do that in
        // tests.
        //
        // Instead, we place generic DrmInfo for all common key systems here,
        // and tests can use any of them by configuring a license server.
        const commonKeySystems = [
          'com.apple.fps.1_0',
          'com.microsoft.playready',
          'com.widevine.alpha',
        ];
        for (const keySystem of commonKeySystems) {
          stream.encrypted = true;
          stream.addDrmInfo(keySystem, (drmInfo) => {
            if (data[contentType].initData) {
              drmInfo.addCencInitData(data[contentType].initData);
            }
          });
        }
      }

      if (data.customizeStream) {
        data.customizeStream(stream);
      }
    }
Not for simulating non-segmented text streams.

@param {!shaka.test.ManifestGenerator.Stream} stream
@param {!shaka.test.ManifestGenerator.Variant} variant
@param {MetadataType} data
@param {shaka.util.ManifestParserUtils.ContentType} contentType
@param {string} name