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

GB: Support H.265 for GB28181 (#3408)

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
Co-authored-by: stone <bluestn@163.com>
Co-authored-by: Winlin <winlin@vip.126.com>
This commit is contained in:
Haibo Chen 2023-02-14 14:28:41 +08:00 committed by GitHub
parent 4a089935cd
commit 4a5f479a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 242 additions and 4 deletions

View file

@ -36,6 +36,9 @@ class SrsGbMuxer;
class SrsSimpleRtmpClient;
struct SrsRawAacStreamCodec;
class SrsRawH264Stream;
#ifdef SRS_H265
class SrsRawHEVCStream;
#endif
class SrsSharedPtrMessage;
class SrsPithyPrint;
class SrsRawAacStream;
@ -409,6 +412,15 @@ private:
std::string h264_pps_;
bool h264_pps_changed_;
bool h264_sps_pps_sent_;
#ifdef SRS_H265
SrsRawHEVCStream* hevc_;
bool vps_sps_pps_change_;
std::string h265_vps_;
std::string h265_sps_;
std::string h265_pps_;
bool vps_sps_pps_sent_;
#endif
private:
SrsRawAacStream* aac_;
std::string aac_specific_config_;
@ -423,8 +435,14 @@ public:
srs_error_t on_ts_message(SrsTsMessage* msg);
private:
virtual srs_error_t on_ts_video(SrsTsMessage* msg, SrsBuffer* avs);
virtual srs_error_t mux_h264(SrsTsMessage* msg, SrsBuffer* avs);
virtual srs_error_t write_h264_sps_pps(uint32_t dts, uint32_t pts);
virtual srs_error_t write_h264_ipb_frame(char* frame, int frame_size, uint32_t dts, uint32_t pts);
#ifdef SRS_H265
virtual srs_error_t mux_h265(SrsTsMessage* msg, SrsBuffer* avs);
virtual srs_error_t write_h265_vps_sps_pps(uint32_t dts, uint32_t pts);
virtual srs_error_t write_h265_ipb_frame(char* frame, int frame_size, uint32_t dts, uint32_t pts);
#endif
virtual srs_error_t on_ts_audio(SrsTsMessage* msg, SrsBuffer* avs);
virtual srs_error_t write_audio_raw_frame(char* frame, int frame_size, SrsRawAacStreamCodec* codec, uint32_t dts);
virtual srs_error_t rtmp_write_packet(char type, uint32_t timestamp, char* data, int size);