voltando a versao de n aberturas e fechamentos de sockets data 19/09
Dependencies: EthernetInterface NTPClient mbed-rtos mbed EALib
Fork of header_main_publish by
rtp.h
- Committer:
- klauss
- Date:
- 2014-09-09
- Revision:
- 0:4d17cd9c8f9d
- Child:
- 12:07fd716e0f35
File content as of revision 0:4d17cd9c8f9d:
#ifndef __RTP_H__ #define __RTP_H__ #include <stdint.h> #include <string.h> #include "mbed.h" #include "EthernetInterface.h" #include "vz_protocol.h" #include "debug.h" #define __RTP_HEADER_OFFSET__ 12 #define __RTP_HEADER_SIZE__ 12 class RTP_Header{ private : uint32_t ss_id; uint16_t seq_number; uint32_t timestamp; public : RTP_Header( int cb_ext ); ~RTP_Header(); size_t size( void ); uint8_t * build_header( uint8_t * buffer_header ); char * build_header( char * pkg ); }; class RTP_Body{ private : public : RTP_Body(); ~RTP_Body(); size_t size( void ); char * build_body( char * dest, char * buffer ); }; class RTP{ private : uint8_t buffer[ 512 ]; char pkg[ 512 ]; RTP_Header * rtp_header; RTP_Body * rtp_body; public : RTP( int ext ); ~RTP(); size_t header_size( void ); char * build_eth_package( char * buffer ); uint8_t * get_buffer( void ){ return this->buffer; } }; #endif