整理代码

This commit is contained in:
xiongziliang
2020-08-30 10:48:34 +08:00
parent 4255914613
commit fbd711a6bb
28 changed files with 1052 additions and 1011 deletions

View File

@@ -28,7 +28,7 @@ public:
typedef std::shared_ptr<RtmpDemuxer> Ptr;
RtmpDemuxer() = default;
virtual ~RtmpDemuxer() = default;
~RtmpDemuxer() override = default;
bool loadMetaData(const AMFValue &metadata);
@@ -38,14 +38,16 @@ public:
* @return true 代表是i帧
*/
bool inputRtmp(const RtmpPacket::Ptr &pkt);
private:
void makeVideoTrack(const AMFValue &val);
void makeAudioTrack(const AMFValue &val, int sample_rate, int channels, int sample_bit);
private:
bool _tryedGetVideoTrack = false;
bool _tryedGetAudioTrack = false;
RtmpCodec::Ptr _audioRtmpDecoder;
RtmpCodec::Ptr _videoRtmpDecoder;
bool _try_get_video_track = false;
bool _try_get_audio_track = false;
RtmpCodec::Ptr _audio_rtmp_decoder;
RtmpCodec::Ptr _video_rtmp_decoder;
};
} /* namespace mediakit */