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

@ -70,6 +70,12 @@ public:
SrsAvcProfile avc_profile;
// The level_idc, ISO_IEC_14496-10-AVC-2003.pdf, page 45.
SrsAvcLevel avc_level;
#ifdef SRS_H265
// The profile_idc, T-REC-H.265-202108-I!!PDF-E.pdf, page 559.
SrsHevcProfile hevc_profile;
// The level_idc, T-REC-H.265-202108-I!!PDF-E.pdf, page 684.
SrsHevcLevel hevc_level;
#endif
// The width and height in codec info.
int width;
int height;
@ -157,8 +163,7 @@ public:
virtual SrsStatisticClient* find_client(std::string client_id);
public:
// When got video info for stream.
virtual srs_error_t on_video_info(SrsRequest* req, SrsVideoCodecId vcodec, SrsAvcProfile avc_profile,
SrsAvcLevel avc_level, int width, int height);
virtual srs_error_t on_video_info(SrsRequest* req, SrsVideoCodecId vcodec, int avc_profile, int avc_level, int width, int height);
// When got audio info for stream.
virtual srs_error_t on_audio_info(SrsRequest* req, SrsAudioCodecId acodec, SrsAudioSampleRate asample_rate,
SrsAudioChannels asound_type, SrsAacObjectType aac_object);