MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / getString

Method getString

framework/utils/CicadaJSON.cpp:64–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64std::string CicadaJSONItem::getString(const std::string &name, const std::string &defaultString) const
65{
66 if (nullptr == mJSON) {
67 return defaultString;
68 }
69
70 if (cJSON_HasObjectItem(mJSON, name.c_str())) {
71 char *str = cJSON_GetObjectItem(mJSON, name.c_str())->valuestring;
72
73 if (str) {
74 return str;
75 }
76 }
77
78 return defaultString;
79}
80
81std::string CicadaJSONItem::getString(const std::string &name) const
82{

Callers 15

openMethod · 0.45
setCodecSpecificDataMethod · 0.45
setDrmInfoMethod · 0.45
configureVideoMethod · 0.45
configureAudioMethod · 0.45
convertMethod · 0.45
OpenMethod · 0.45
TESTFunction · 0.45
setupFilterChainsMethod · 0.45
onActivityResultMethod · 0.45
ViewfinderViewMethod · 0.45

Calls 2

cJSON_HasObjectItemFunction · 0.85
cJSON_GetObjectItemFunction · 0.85

Tested by 2

TESTFunction · 0.36
onEventFunction · 0.36