Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

mnt_rtp.h

00001 #ifndef MNT_RTP_H
00002 #define MNT_RTP_H
00003 
00004 //#include <inet.h>
00005 #include <netinet/in.h>
00006 #include <stdint.h>
00007 #include "mnt_data.h"
00008 
00030 class MntRTPHdr {
00031 public:
00032         union {
00033                 uint16_t bits_;
00034         } flags_;
00035 
00036         uint16_t seqno_;        
00037         uint32_t ts_;           
00038         uint32_t ssrc_;         
00040         static const int RTP_M_MASK = 0x0080; /* Marker: significant event <e.g. frame boundary> */
00041         static const int RTP_M_SHIFT = 7; 
00042         static const int RTP_P = 0x2000; /* Padding is present */
00043         static const int RTP_X = 0x1000; /* Extension Header is present */
00044 
00045         static const int RTP_PT_MPEG = 32;
00046 
00047         public:
00048                 uint32_t get_ssrc() 
00049                 {
00050                         return ntohl(ssrc_);
00051                 }
00052 
00053                 uint16_t get_seq_no() 
00054                 {
00055                         return ntohs(seqno_);
00056                 }
00057 
00058                 uint32_t get_timestamp() 
00059                 {
00060                         return ntohl(ts_);
00061                 }
00062 
00063                 int marker_bit_set()
00064                 {
00065                         return (flags_.bits_ & RTP_M_MASK) >> RTP_M_SHIFT;
00066                 }
00067 
00068 };
00069 
00070 #endif

Generated on Thu Aug 25 14:07:38 2005 for mnt by  doxygen 1.4.4