mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #913, Kernel MP4 FLV HTTP support complex error.
This commit is contained in:
parent
9802dc326e
commit
204ef041da
23 changed files with 1413 additions and 1660 deletions
|
@ -70,12 +70,12 @@ public:
|
|||
/**
|
||||
* encode object to bytes in SrsBuffer.
|
||||
*/
|
||||
virtual int encode(SrsBuffer* buf) = 0;
|
||||
virtual srs_error_t encode(SrsBuffer* buf) = 0;
|
||||
public:
|
||||
/**
|
||||
* decode object from bytes in SrsBuffer.
|
||||
*/
|
||||
virtual int decode(SrsBuffer* buf) = 0;
|
||||
virtual srs_error_t decode(SrsBuffer* buf) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -97,19 +97,7 @@ public:
|
|||
SrsBuffer();
|
||||
SrsBuffer(char* b, int nb_b);
|
||||
virtual ~SrsBuffer();
|
||||
private:
|
||||
virtual void set_value(char* b, int nb_b);
|
||||
public:
|
||||
/**
|
||||
* initialize the stream from bytes.
|
||||
* @b, the bytes to convert from/to basic types.
|
||||
* @nb, the size of bytes, total number of bytes for stream.
|
||||
* @remark, stream never free the bytes, user must free it.
|
||||
* @remark, return error when bytes NULL.
|
||||
* @remark, return error when size is not positive.
|
||||
*/
|
||||
virtual int initialize(char* b, int nb);
|
||||
// get the status of stream
|
||||
// get the status of stream
|
||||
public:
|
||||
/**
|
||||
* get data of stream, set by initialize.
|
||||
|
@ -125,6 +113,8 @@ public:
|
|||
* tell the current pos.
|
||||
*/
|
||||
virtual int pos();
|
||||
// Left bytes in buffer, total size() minus the current pos().
|
||||
virtual int left();
|
||||
/**
|
||||
* whether stream is empty.
|
||||
* if empty, user should never read or write.
|
||||
|
@ -219,7 +209,7 @@ public:
|
|||
SrsBitBuffer();
|
||||
virtual ~SrsBitBuffer();
|
||||
public:
|
||||
virtual int initialize(SrsBuffer* s);
|
||||
virtual srs_error_t initialize(SrsBuffer* s);
|
||||
virtual bool empty();
|
||||
virtual int8_t read_bit();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue