mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
添加不区分大小写的map
This commit is contained in:
parent
6a411da024
commit
e91525e96e
@ -6,8 +6,10 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include "Common/config.h"
|
#include "Common/config.h"
|
||||||
|
#include "Util/util.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
using namespace ZL::Util;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TrackVideo = 0, TrackAudio
|
TrackVideo = 0, TrackAudio
|
||||||
@ -51,6 +53,14 @@ public:
|
|||||||
string FindField(const char* buf, const char* start, const char *end,int bufSize = 0 );
|
string FindField(const char* buf, const char* start, const char *end,int bufSize = 0 );
|
||||||
int parserSDP(const string& sdp, RtspTrack Track[2]);
|
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<string,string,StrCaseCompare> StrCaseMap;
|
||||||
|
|
||||||
class Parser {
|
class Parser {
|
||||||
public:
|
public:
|
||||||
Parser() {
|
Parser() {
|
||||||
@ -125,7 +135,7 @@ public:
|
|||||||
this->m_strContent = content;
|
this->m_strContent = content;
|
||||||
}
|
}
|
||||||
|
|
||||||
const map<string, string>& getValues() const {
|
const StrCaseMap& getValues() const {
|
||||||
return m_mapValues;
|
return m_mapValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +145,7 @@ private:
|
|||||||
string m_strTail;
|
string m_strTail;
|
||||||
string m_strContent;
|
string m_strContent;
|
||||||
string m_strNull;
|
string m_strNull;
|
||||||
map<string, string> m_mapValues;
|
StrCaseMap m_mapValues;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user