diff --git a/src/Rtsp/Rtsp.h b/src/Rtsp/Rtsp.h index 494b597e..3d71d0f5 100644 --- a/src/Rtsp/Rtsp.h +++ b/src/Rtsp/Rtsp.h @@ -6,8 +6,10 @@ #include #include #include "Common/config.h" +#include "Util/util.h" using namespace std; +using namespace ZL::Util; typedef enum { TrackVideo = 0, TrackAudio @@ -51,6 +53,14 @@ public: string FindField(const char* buf, const char* start, const char *end,int bufSize = 0 ); int parserSDP(const string& sdp, RtspTrack Track[2]); + +struct StrCaseCompare +{ + bool operator()(const string& __x, const string& __y) const + {return strcasecmp(__x.data(), __y.data()) < 0 ;} +}; +typedef map StrCaseMap; + class Parser { public: Parser() { @@ -125,7 +135,7 @@ public: this->m_strContent = content; } - const map& getValues() const { + const StrCaseMap& getValues() const { return m_mapValues; } @@ -135,7 +145,7 @@ private: string m_strTail; string m_strContent; string m_strNull; - map m_mapValues; + StrCaseMap m_mapValues; };