package com.foxx.androidcast.network.transport;

/*********************************************************************
 * StreamProtectionScopes.java
 * Created at: Sun 17 May 2026 22:49:49 +0200
 * Updated at: Wed 20 May 2026 15:17:13 +0200 by Anton Afanasyeu <a.afanasieff@gmail.com>
 * Commit: 5d8e82d2e60a21fff3138d2a394ee4e8b4c6dcb8
 * class StreamProtectionScopes
 * Contributors:
 *    - Anton Afanasyeu <a.afanasieff@gmail.com> (2 commits, 23 lines)
 *    - Cursor Agent (project assistant)
 * Digest: SHA256	99d185ecec47f81b9958f1dcf7e4e8244355c57189d3d51f36628354bef0f41a
**********************************************************************/
import com.foxx.androidcast.network.CastProtocol;

/** Which UDP cast message types use FEC/NACK payload wrapping. */
public final class StreamProtectionScopes {
    private StreamProtectionScopes() {}

    /** Handshake and control messages stay raw; only media/stats use protection. */
    public static boolean protectsUdpPayload(byte messageType) {
        return messageType == CastProtocol.MSG_VIDEO_FRAME
                || messageType == CastProtocol.MSG_AUDIO_FRAME
                || messageType == CastProtocol.MSG_WIRE_PACKET
                || messageType == CastProtocol.MSG_NETWORK_STATS;
    }
}
