00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _RTP_H_
00019 #define _RTP_H_
00020
00021 #include "nalu.h"
00022
00023 #define MAXRTPPAYLOADLEN (65536 - 40)
00024 #define MAXRTPPACKETSIZE (65536 - 28)
00025 #define H264PAYLOADTYPE 105
00026 #define H264SSRC 0x12345678
00027 #define RTP_TR_TIMESTAMP_MULT 1000
00028
00029 typedef struct
00030 {
00031 unsigned int v;
00032 unsigned int p;
00033 unsigned int x;
00034 unsigned int cc;
00035
00036 unsigned int m;
00037 unsigned int pt;
00038 unsigned int seq;
00039
00040 unsigned int timestamp;
00041 unsigned int ssrc;
00042 byte * payload;
00043 unsigned int paylen;
00044 byte * packet;
00045 unsigned int packlen;
00046 } RTPpacket_t;
00047
00048 #if 0
00049 extern int ComposeRTPPacket (RTPpacket_t *p);
00050 extern int DecomposeRTPpacket (RTPpacket_t *p);
00051 extern int WriteRTPPacket (RTPpacket_t *p, FILE *f);
00052 extern void DumpRTPHeader (RTPpacket_t *p);
00053 extern int RTPWriteBits (int Marker, int PacketType, void * bitstream,
00054 int BitStreamLenInByte, FILE *out);
00055
00056 extern Boolean isAggregationPacket(ImageParameters *p_Img);
00057 extern int aggregationRTPWriteBits (int Marker, int PacketType, int subPacketType, void * bitstream, int BitStreamLenInByte, FILE *out);
00058
00059 extern void begin_sub_sequence_rtp(ImageParameters *p_Img, InputParameters *p_Inp);
00060 extern void end_sub_sequence_rtp (ImageParameters *p_Img, InputParameters *p_Inp);
00061 #endif
00062
00063 extern void RTPUpdateTimestamp (ImageParameters *p_Img, int tr);
00064 extern void OpenRTPFile (ImageParameters *p_Img, char *Filename);
00065 extern void CloseRTPFile (ImageParameters *p_Img);
00066 extern int WriteRTPNALU (ImageParameters *p_Img, NALU_t *n);
00067
00068
00069
00070 #endif
00071