#pragma once

#include <csignal>
#include <string>

namespace webrtcpush {

struct StreamConfig {
    std::string room = "xxxxxx";
    std::string signal_url = "wss://signal.yd-ss.com/websocket";
    std::string source = "camera";
    std::string device = "/dev/video11";
    std::string format = "NV12";
    std::string profile = "baseline";
    std::string iq_dir = "/oem/usr/share/iqfiles";
    int src_w = 2304;
    int src_h = 1296;
    int width = 1080;
    int height = 720;
    int fps = 24;
    int bitrate = 3000;
    int gop = 48;
    int camera_id = 0;
    bool use_scaler = true;
    bool use_isp = true;
};

int run_stream(const StreamConfig &config,
               volatile std::sig_atomic_t &running);

} // namespace webrtcpush
