| 123456789101112131415161718192021222324252627282930313233 |
- #ifndef CONFIG_H
- #define CONFIG_H
- #include "common.h"
- typedef struct {
- char cms_ip[MAX_IP_SIZE]; /* platform address (117.131.63.98 from screenshot) */
- int cms_port; /* 7031 */
- char device_id[MAX_DEVICE_ID]; /* AX5324540 */
- char license[64]; /* abc12345 */
- char proto_version[16]; /* ISUP5.0 */
- int sms_port; /* 7660 */
- int alarm_port;
- /* stream / rtmp (ZLMediaKit) */
- char rtmp_host[MAX_IP_SIZE];
- int rtmp_port;
- char rtmp_app[64];
- int fps;
- int width;
- int height;
- int bitrate_kbps;
- /* misc */
- char log_file[MAX_PATH_SIZE];
- int log_level;
- int simulate; /* 1 = run without real Hik SDK */
- } AppConfig;
- int config_load(const char*path, AppConfig*cfg);
- int config_save(const char*path, const AppConfig*cfg);
- void config_defaults(AppConfig*cfg);
- void config_print(const AppConfig*cfg);
- extern AppConfig g_cfg;
- #endif
|