first commit

This commit is contained in:
wdp
2024-12-15 20:42:32 +08:00
commit 986b2fca12
586 changed files with 154149 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
/***************************************************************************************
*
* 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 SUA_SDP_H
#define SUA_SDP_H
#define SDP_SENDRECV_NULL 0
#define SDP_SENDRECV_TXONLY 1
#define SDP_SENDRECV_RXONLY 2
#define SDP_SENDRECV_TXRX 3
#define SDP_MEDIA_NULL 0
#define SDP_MEDIA_AUDIO 1
#define SDP_MEDIA_VIDEO 2
#define SDP_MEDIA_DATA 3
#define SDP_MAX_NUM 8
typedef struct sdp_info
{
uint32 is_valid : 1; // 有效标识
uint32 mtype : 2;
uint32 sendrecv : 2; // a=sendonly, a=recvonly, a=sendrecv
uint32 rtp_tcp : 1; // RTP/AVP; RTP/AVP/TCP
uint32 resv : 2;
uint32 pt : 8; // payload type
uint32 port : 16; // rtp udp port
char rtpmap[64]; // a=rtpmap:96 ------ H264/90000
char encoder[32]; // H264 PCMA PS G729A
uint32 hz; // 采样频率
uint32 chn; // 通道数, 视频没有, 音频可能有, 默认是1
uint32 ptime; // 音频ptime,多少ms一个包
uint32 bps; // 带宽值TIAS-bpsAS-kbps
char desc[256]; // a=fmtp:------
} SDPINFO;
typedef struct lt_rtp_map_entry
{
uint32 pt : 8; // payload type
uint32 mtype : 8;
uint32 channel : 8;
uint32 sdp_index : 8; // 指示该pt在SUA的SDPINFO数组中的索引在呼叫建立和更改时会调整该映射关系
char name[16];
int hz;
} RTPMAPE;
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif