defineWindow_(dtvccPacket, windowNum, pts) {
    // Create the window if it doesn't exist.
    const windowAlreadyExists = this.windows_[windowNum] !== null;
    if (!windowAlreadyExists) {
      const window = new shaka.cea.Cea708Window(windowNum, this.serviceNumber_);
      window.setStartTime(pts);
      this.windows_[windowNum] = window;
    }

    // 6 Bytes follow, with the following form:
    // b1 = |0|0|V|R|C|PRIOR| , b2 = |P|VERT_ANCHOR| , b3 = |HOR_ANCHOR|
    // b4 = |ANC_ID|ROW_CNT| , b5 = |0|0|COL_COUNT| , b6 = |0|0|WNSTY|PNSTY|
    // Semantics of these bytes at https://en.wikipedia.org/wiki/CEA-708#DefineWindow07_(0x98-0x9F,_+_6_bytes)
    const b1 = dtvccPacket.readByte().value;
    const b2 = dtvccPacket.readByte().value;
    const b3 = dtvccPacket.readByte().value;
    const b4 = dtvccPacket.readByte().value;
    const b5 = dtvccPacket.readByte().value;
    const b6 = dtvccPacket.readByte().value;

    // As per 8.4.7 of CEA-708-E, row locks and column locks are to be ignored.
    // So this decoder will ignore these values.

    const visible = (b1 & 0x20) > 0;
    const verticalAnchor = b2 & 0x7f;
    const relativeToggle = (b2 & 0x80) > 0;
    const horAnchor = b3;
    const rowCount = (b4 & 0x0f) + 1; // Spec says to add 1.
    const anchorId = (b4 & 0xf0) >> 4;
    const colCount = (b5 & 0x3f) + 1; // Spec says to add 1.

    // If pen style = 0 AND window previously existed, keep its pen style.
    // Otherwise, change the pen style (For now, just reset to the default pen).
    // TODO add support for predefined pen styles and fonts.
    const penStyle = b6 & 0x07;
    if (!windowAlreadyExists || penStyle !== 0) {
      this.windows_[windowNum].resetPen();
    }

    this.windows_[windowNum].defineWindow(visible, verticalAnchor,
        horAnchor, anchorId, relativeToggle, rowCount, colCount);

    // Set the current window to the newly defined window.
    this.currentWindow_ = this.windows_[windowNum];
  }
@param {!shaka.cea.DtvccPacket} dtvccPacket
@param {number} windowNum
@param {number} pts
@throws {!shaka.util.Error}
@private