apps/streamer/rtp.h

Go to the documentation of this file.
00001 
00002 #ifndef __RTP_H__
00003 #define __RTP_H__
00004 
00005 #define RTP_VERSION             2
00006 #define RTP_HEADER_SIZE         12
00007 #define RTP_MAX_PACKET_LEN      1500
00008 #define IP_UDP_SIZE             28
00009 #define JPEG_PAYLOAD_NUM        26
00010 
00011 
00012 typedef struct {
00013         /* The following map directly onto the RTP packet header...   */
00014         uint16_t   cc:4;        /* CSRC count                 */
00015         uint16_t   x:1;         /* header extension flag      */
00016         uint16_t   p:1;         /* padding flag               */
00017         uint16_t   v:2;         /* packet type                */
00018         uint16_t   pt:7;        /* payload type               */
00019         uint16_t   m:1;         /* marker bit                 */
00020         uint16_t   seq;         /* sequence number            */
00021         uint32_t   ts;          /* timestamp                  */
00022         uint32_t   ssrc;        /* synchronization source     */
00023 } rtp_packet;
00024 
00025 /* API */
00026 int32_t rtp_init(struct param *p);
00027 int32_t rtp_send_data (struct param *p, uint32_t rtp_ts, int8_t  pt, int32_t m,
00028                      int8_t  *data, int32_t data_len, unsigned char *h_buf, int h_offset, int h_len);
00029 void rtp_done(struct param *p);
00030 int32_t ismulticast(struct param *p);
00031         
00032 #endif /* __RTP_H__ */

Generated on Fri Nov 28 00:06:22 2008 for elphel by  doxygen 1.5.1