Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
rtpbuf.cpp
00001 #include "rtpbuf.h" 00002 00003 void rtpbuf_clear (rtpbuf_t * self) { 00004 self->size = 0; 00005 } 00006 00007 void rtpbuf_put (rtpbuf_t * self, int size, uint8_t * data){ 00008 if ((size + self->size) <= RTPBUF_BUFSIZE){ 00009 xmemcpy((uint8_t*)self->b+self->size,data,size); 00010 self->size += size; 00011 } 00012 } 00013 00014 uint8_t * rtpbuf_get (rtpbuf_t * self) { 00015 if (self->size < RTPBUF_PKGSIZE) { return NULL; } 00016 00017 return (uint8_t*) self->b; 00018 } 00019 00020 void rtpbuf_next (rtpbuf_t * self) { 00021 if (self->size >= RTPBUF_PKGSIZE){ 00022 self->size -= RTPBUF_PKGSIZE; 00023 if (self->size > 0) { 00024 xmemcpy32(self->b, (self->b)+(RTPBUF_PKGSIZE>>2), self->size); 00025 } 00026 } 00027 }
Generated on Tue Jul 12 2022 16:25:12 by
