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

import lombok.Data;

import java.time.LocalDateTime;
import java.util.concurrent.atomic.AtomicLong;

@Data
public class VideoStreamSession {

    private String sessionId;
    private String callId;
    private String remoteAddress;
    private int remoteRtpPort;
    private int localRtpPort;
    private String codec;
    private int payloadType;
    private String ssrc;
    private volatile SessionState state = SessionState.INIT;
    private LocalDateTime startTime;
    private final AtomicLong receivedPackets = new AtomicLong();
    private final AtomicLong receivedFrames = new AtomicLong();
    private final AtomicLong receivedBytes = new AtomicLong();

    public enum SessionState {
        INIT, ESTABLISHED, RECEIVING, STOPPED
    }
}
