1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: Refine RTP packet api, keep shared message to private

This commit is contained in:
winlin 2021-02-26 12:25:35 +08:00
parent 2ae7e22469
commit 58d71c23bc
7 changed files with 50 additions and 243 deletions

View file

@ -49,15 +49,19 @@ SrsBuffer::SrsBuffer(char* b, int nn)
{
p = bytes = b;
nb_bytes = nn;
// TODO: support both little and big endian.
srs_assert(srs_is_little_endian());
}
SrsBuffer::~SrsBuffer()
{
}
SrsBuffer* SrsBuffer::copy()
{
SrsBuffer* cp = new SrsBuffer(bytes, nb_bytes);
cp->p = p;
return cp;
}
char* SrsBuffer::data()
{
return bytes;