/*************************************************************************************** * * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. * * By downloading, copying, installing or using the software you agree to this license. * If you do not agree to this license, do not download, install, * copy or use the software. * * Copyright (C) 2014-2022, Happytimesoft Corporation, all rights reserved. * * Redistribution and use in binary forms, with or without modification, are permitted. * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific * language governing permissions and limitations under the License. * ****************************************************************************************/ #ifndef GB28181_CFG_H #define GB28181_CFG_H #include "sys_inc.h" #include "media_info.h" #ifdef DEMO #define MAX_CH_NUMS 2 #else #define MAX_CH_NUMS 8 #endif typedef struct { char cid[32]; // channel id char cname[128]; // channel name char media_url[256]; // media url MEDIA_INFO output; // audio/vidoe output setting } GBCHANNEL; typedef struct { char server_ip[128]; // server ip int server_port; // server port char server_id[32]; // server id char server_domain[128]; // server domain int local_port; // local port char device_id[32]; // device id char device_name[128]; // device name char password[32]; // password int protocol; // 0 - udp; 1 - tcp int media_protocol; // 0 - udp; 1 - tcp uint32 reg_expires; // sip reg user expires, unit is second uint32 heartbeat_interval; // gb28181 heartbeat interval, unit is second uint32 heartbeat_count; // gb28181 heartbeat count BOOL log_enable; // log enable flag int log_level; // log level, see sys_log.h uint32 media_base_port; // media base port int channel_nums; // channel numbers GBCHANNEL channels[MAX_CH_NUMS]; // channels } GB28181_CFG; extern GB28181_CFG g_gb28181_cfg; #ifdef __cplusplus extern "C" { #endif BOOL gb28181_read_config(const char * config); GBCHANNEL * gb28181_get_channel(const char * cid); #ifdef __cplusplus } #endif #endif