Skip to content

Commit

Permalink
优化性能
Browse files Browse the repository at this point in the history
  • Loading branch information
xia-chu committed Apr 7, 2020
1 parent 4d74360 commit 1352e15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Common/MediaSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class MediaSink : public MediaSinkInterface , public TrackSource{
void checkTrackIfReady_l(const Track::Ptr &track);
private:
mutable recursive_mutex _mtx;
map<int,Track::Ptr> _track_map;
map<int,function<void()> > _trackReadyCallback;
unordered_map<int,Track::Ptr> _track_map;
unordered_map<int,function<void()> > _trackReadyCallback;
bool _allTrackReady = false;
Ticker _ticker;
int _max_track_size = 2;
Expand Down
4 changes: 1 addition & 3 deletions src/Rtp/RtpProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class RtpProcess : public RtpReceiver , public RtpDecoder{
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 onDecode(int stream,int codecid,int flags,int64_t pts,int64_t dts, const void *data,int bytes);
private:
void getNextRtpType();
private:
std::shared_ptr<FILE> _save_file_rtp;
std::shared_ptr<FILE> _save_file_ps;
Expand All @@ -54,7 +52,7 @@ class RtpProcess : public RtpReceiver , public RtpDecoder{
MultiMediaSourceMuxer::Ptr _muxer;
std::shared_ptr<FrameMerger> _merger;
Ticker _last_rtp_time;
map<int,Stamp> _stamps;
unordered_map<int,Stamp> _stamps;
uint32_t _dts = 0;
Decoder::Ptr _decoder;
};
Expand Down

0 comments on commit 1352e15

Please sign in to comment.