package com.foxx.androidcast.network;

/*********************************************************************
 * CastFramingContext.java
 * Created at: Sat 16 May 2026 13:35:48 +0200
 * Updated at: Wed 20 May 2026 15:17:13 +0200 by Anton Afanasyeu <a.afanasieff@gmail.com>
 * Commit: 5d8e82d2e60a21fff3138d2a394ee4e8b4c6dcb8
 * class CastFramingContext
 * Contributors:
 *    - Anton Afanasyeu <a.afanasieff@gmail.com> (2 commits, 33 lines)
 *    - Cursor Agent (project assistant)
 * Digest: SHA256	6bab8dd7f00e2dcac4cbfff7a71264458219c95581ba70f163604f61f332ec92
**********************************************************************/
/** Per-session values written into {@link CastProtoHeader}. */
public final class CastFramingContext {
  public final int sessionId;
  public final int placeholderId;
  public final int videoCodecs;
  public final int audioCodecs;

  public CastFramingContext(int sessionId, int placeholderId, int videoCodecs, int audioCodecs) {
    this.sessionId = sessionId;
    this.placeholderId = placeholderId;
    this.videoCodecs = videoCodecs;
    this.audioCodecs = audioCodecs;
  }

  public CastProtoHeader newHeader(byte hsType) {
    CastProtoHeader h = new CastProtoHeader();
    h.hsType = hsType;
    h.sessionId = sessionId;
    h.placeholderId = placeholderId;
    h.videoCodecs = videoCodecs;
    h.audioCodecs = audioCodecs;
    return h;
  }
}
