package com.usky.cdi.service.sip.model;

import lombok.Data;

@Data
public class SdpMediaInfo {

    private String mediaType;
    private int port;
    private int payloadType;
    private String codec;
    private String connectionAddress;
    private boolean sendOnly;
    /** m= 行协议，如 RTP/AVP、TCP/RTP/AVP、RTP/AVP/TCP */
    private String mediaProtocol = "RTP/AVP";
    /** a=setup 值：active / passive */
    private String setup;
    /** GB28181 y= SSRC（十进制字符串） */
    private String ssrc;
    /** 是否 TCP 传输媒体 */
    private boolean tcpMedia;

    public boolean isTcpMedia() {
        return tcpMedia || (mediaProtocol != null && mediaProtocol.toUpperCase().contains("TCP"));
    }
}
