mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
优化性能
This commit is contained in:
parent
4d74360609
commit
1352e159f1
@ -113,8 +113,8 @@ private:
|
|||||||
void checkTrackIfReady_l(const Track::Ptr &track);
|
void checkTrackIfReady_l(const Track::Ptr &track);
|
||||||
private:
|
private:
|
||||||
mutable recursive_mutex _mtx;
|
mutable recursive_mutex _mtx;
|
||||||
map<int,Track::Ptr> _track_map;
|
unordered_map<int,Track::Ptr> _track_map;
|
||||||
map<int,function<void()> > _trackReadyCallback;
|
unordered_map<int,function<void()> > _trackReadyCallback;
|
||||||
bool _allTrackReady = false;
|
bool _allTrackReady = false;
|
||||||
Ticker _ticker;
|
Ticker _ticker;
|
||||||
int _max_track_size = 2;
|
int _max_track_size = 2;
|
||||||
|
@ -39,8 +39,6 @@ protected:
|
|||||||
void onRtpSorted(const RtpPacket::Ptr &rtp, int track_index) override ;
|
void onRtpSorted(const RtpPacket::Ptr &rtp, int track_index) override ;
|
||||||
void onRtpDecode(const uint8_t *packet, int bytes, uint32_t timestamp, int flags) override;
|
void onRtpDecode(const uint8_t *packet, int bytes, uint32_t timestamp, int flags) override;
|
||||||
void onDecode(int stream,int codecid,int flags,int64_t pts,int64_t dts, const void *data,int bytes);
|
void onDecode(int stream,int codecid,int flags,int64_t pts,int64_t dts, const void *data,int bytes);
|
||||||
private:
|
|
||||||
void getNextRtpType();
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<FILE> _save_file_rtp;
|
std::shared_ptr<FILE> _save_file_rtp;
|
||||||
std::shared_ptr<FILE> _save_file_ps;
|
std::shared_ptr<FILE> _save_file_ps;
|
||||||
@ -54,7 +52,7 @@ private:
|
|||||||
MultiMediaSourceMuxer::Ptr _muxer;
|
MultiMediaSourceMuxer::Ptr _muxer;
|
||||||
std::shared_ptr<FrameMerger> _merger;
|
std::shared_ptr<FrameMerger> _merger;
|
||||||
Ticker _last_rtp_time;
|
Ticker _last_rtp_time;
|
||||||
map<int,Stamp> _stamps;
|
unordered_map<int,Stamp> _stamps;
|
||||||
uint32_t _dts = 0;
|
uint32_t _dts = 0;
|
||||||
Decoder::Ptr _decoder;
|
Decoder::Ptr _decoder;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user