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 VZTECH

Revision:
0:4d17cd9c8f9d
Child:
12:07fd716e0f35
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rtp.h	Tue Sep 09 20:01:24 2014 +0000
@@ -0,0 +1,49 @@
+#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
\ No newline at end of file