mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
finish utest of protocol stack. 0.9.156
This commit is contained in:
parent
8e27df4cf7
commit
9556790a5e
14 changed files with 730 additions and 45 deletions
|
@ -132,7 +132,7 @@ SrsAvcAacCodec::~SrsAvcAacCodec()
|
|||
srs_freep(pictureParameterSetNALUnit);
|
||||
}
|
||||
|
||||
int SrsAvcAacCodec::audio_aac_demux(int8_t* data, int size, SrsCodecSample* sample)
|
||||
int SrsAvcAacCodec::audio_aac_demux(char* data, int size, SrsCodecSample* sample)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -274,7 +274,7 @@ int SrsAvcAacCodec::audio_aac_demux(int8_t* data, int size, SrsCodecSample* samp
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsAvcAacCodec::video_avc_demux(int8_t* data, int size, SrsCodecSample* sample)
|
||||
int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
|
|
@ -197,8 +197,8 @@ public:
|
|||
virtual ~SrsAvcAacCodec();
|
||||
// the following function used for hls to build the codec info.
|
||||
public:
|
||||
virtual int audio_aac_demux(int8_t* data, int size, SrsCodecSample* sample);
|
||||
virtual int video_avc_demux(int8_t* data, int size, SrsCodecSample* sample);
|
||||
virtual int audio_aac_demux(char* data, int size, SrsCodecSample* sample);
|
||||
virtual int video_avc_demux(char* data, int size, SrsCodecSample* sample);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -240,9 +240,9 @@ int SrsDvrPlan::on_video(SrsSharedPtrMessage* video)
|
|||
int size = (int)video->size;
|
||||
|
||||
#ifdef SRS_AUTO_HTTP_CALLBACK
|
||||
bool is_key_frame = SrsFlvCodec::video_is_h264((int8_t*)payload, size)
|
||||
&& SrsFlvCodec::video_is_keyframe((int8_t*)payload, size)
|
||||
&& !SrsFlvCodec::video_is_sequence_header((int8_t*)payload, size);
|
||||
bool is_key_frame = SrsFlvCodec::video_is_h264(payload, size)
|
||||
&& SrsFlvCodec::video_is_keyframe(payload, size)
|
||||
&& !SrsFlvCodec::video_is_sequence_header(payload, size);
|
||||
if (is_key_frame) {
|
||||
segment->has_keyframe = true;
|
||||
if ((ret = on_video_keyframe()) != ERROR_SUCCESS) {
|
||||
|
|
|
@ -1294,8 +1294,8 @@ int SrsSource::on_aggregate(SrsMessage* msg)
|
|||
|
||||
if (data_size > 0) {
|
||||
o.size = data_size;
|
||||
o.payload = new int8_t[o.size];
|
||||
stream->read_bytes((char*)o.payload, o.size);
|
||||
o.payload = new char[o.size];
|
||||
stream->read_bytes(o.payload, o.size);
|
||||
}
|
||||
|
||||
if (!stream->require(4)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue