⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtsp.h

📁 一个简单的RTSP客户端实现源码
💻 H
字号:
/**********This library is free software; you can redistribute it and/or modify it underthe terms of the GNU Lesser General Public License as published by theFree Software Foundation; either version 2.1 of the License, or (at youroption) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)This library is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESSFOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License formore details.You should have received a copy of the GNU Lesser General Public Licensealong with this library; if not, write to the Free Software Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA  02111-1307  USA**********/#ifndef _RTSP_H#define _RTSP_H#include <stdio.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include <netdb.h>#include <unistd.h>#include <fcntl.h>#include <stdlib.h>#include <errno.h>#include <ctype.h>#include <time.h>#include <sys/timeb.h>#include <sys/time.h>#define MAX_READBUFSIZE 20000#define MAX_PACKET_SIZE 10000struct MediaAttribute{	unsigned fVideoFrequency;	unsigned char fVideoPayloadFormat;	char fConfigAsc[100];	unsigned char fConfigHex[50];	int fConfigHexLen;	unsigned fVideoFrameRate;	unsigned fTimeIncBits;	unsigned fixed_vop_rate;	unsigned fVideoWidth;	unsigned fVideoHeight; 	unsigned fAudioFrequency;	unsigned char fAudioPayloadFormat;	unsigned fTrackNum;};struct ResultData{	unsigned char *buffer;	int len;	unsigned char fRTPPayloadFormat;	unsigned long frtpTimestamp;	int frtpMarkerBit;};struct MediaSubsession {	char * fMediumName;	char * fCodecName;	char * fControlPath;// "a=control:<control-path>" 	char * fConfig;	unsigned short fClientPortNum;	unsigned fNumChannels;	unsigned frtpTimestampFrequency;	unsigned char fRTPPayloadFormat;	char * fSessionId;	char *fFileName;	FILE* fFid;	struct MediaSubsession *fNext;};int init_rtsp(char *url,struct MediaAttribute *Attribute);int RTP_ReadHandler(int socketNum,struct ResultData* data);void clearup(int socketNum);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -