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

H265: Demux sps for log print and statistic streams.(#3271) (#3286)

* BitBuffer: add method to implement bit read operation.

* Codec: demux hevc sps for profile level resolution.

* Statistic: refine hevc profile level resolution.

* Kernel: return error code for demux hevc.

* Kernel: check bitstream length for hevc sps.

* UTest: add BitBuffer read bits utest.

* Kernel: refine print log and utest.

* Kernel: add comment for hevc sps.

Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
chundonglinlin 2022-12-04 22:46:14 +08:00 committed by GitHub
parent e6c395e473
commit a0803b556b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 729 additions and 19 deletions

View file

@ -1074,9 +1074,10 @@ srs_error_t SrsOriginHub::on_video(SrsSharedPtrMessage* shared_video, bool is_se
c->width, c->height, c->video_data_rate / 1000, c->frame_rate, c->duration);
#ifdef SRS_H265
} else if (c->id == SrsVideoCodecIdHEVC) {
// TODO: FIXME: Use the correct information for HEVC.
err = stat->on_video_info(req_, c->id, c->avc_profile, c->avc_level, c->width, c->height);
srs_trace("%dB video sh, codec(%d)", msg->size, c->id);
err = stat->on_video_info(req_, c->id, c->hevc_profile, c->hevc_level, c->width, c->height);
srs_trace("%dB video sh, codec(%d, profile=%s, level=%s, %dx%d, %dkbps, %.1ffps, %.1fs)",
msg->size, c->id, srs_hevc_profile2str(c->hevc_profile).c_str(), srs_hevc_level2str(c->hevc_level).c_str(),
c->width, c->height, c->video_data_rate / 1000, c->frame_rate, c->duration);
#endif
}
if (err != srs_success) {