• 大小: 12KB
    文件类型: .c
    金币: 2
    下载: 0 次
    发布日期: 2024-02-04
  • 语言: 其他
  • 标签: 海思  rtp  封包  

资源简介

海思视频解决方案 rtp 封包 发送 代码

资源截图

代码片段和文件信息

#include     
#include     
#include     
#include     
#include     
#include     
#include     
#include     
#include     
#include     
#include     
   
#include     
#include     
#include     
#include     
#include     
#include     
#include     
#include     
#include     
#include “hi_common_api.h“    
   
#include “avcommon.h“    
#include “av_type.h“    
#include “dvs_pub.h“    
#include “av_var.h“    
   
CHAR args[10][255];   
/**********************************************************  
Function     : HI_Socket  
Description  : 创建socket  
Input        : int af int type int protocol   
Output       : 无  
Return Value : int  
Date         : 2009/10/10  
Author       : cxw  
**********************************************************/   
int HI_Socket(int af int type int protocol)   
{   
    return socket(af type protocol);   
}   
/**********************************************************  
Function     : HI_SetSockOpt  
Description  : 设置socket  
Input        : int s int level int optname   
               const VOID *optval HI_SockLen_T optlen   
Output       : 无  
Return Value : int  
Date         : 2009/10/10  
Author       : cxw  
**********************************************************/   
int  HI_SetSockOpt(int s    
                      int level    
                      int optname    
                      const VOID *optval    
                      HI_SockLen_T optlen)   
{   
    return setsockopt(s level optname optval optlen);   
}   
/**********************************************************  
Function     : HI_CloseSocket  
Description  : 关闭socket  
Input        : int ulSocket  
Output       : 无  
Return Value : int  
Date         : 2009/9/25  
Author       : cxw  
**********************************************************/   
int HI_CloseSocket(int ulSocket)   
{   
    return close(ulSocket);   
}   
/**********************************************************  
Function     : HI_Bind  
Description  : 与特定socket的绑定地址  
Input        : int s const struct sockaddr *paddr   
               int addrlen   
Output       : 无  
Return Value : int  
Date         : 2009/9/25  
Author       : cxw  
**********************************************************/   
int HI_Bind(int s const struct sockaddr *paddr int addrlen)   
{   
    return bind(s (struct sockaddr *)paddr addrlen);   
}   
/**********************************************************  
Function     : HI_SOCKET_Udp_GetPort  
Description  : 获取UDP socket端口  
Input        : HI_SOCKET fd   
Output       : 无  
Return Value : USHORT  
Date         : 2009/10/10  
Author       : cxw  
******************************************

评论

共有 条评论