| 187 | } |
| 188 | |
| 189 | void MediaPlayerAnalyticsUtil::getPropertyJSONStr(const std::string &name, CicadaJSONArray &array, bool isArray, |
| 190 | std::deque<StreamInfo *> &streamInfoQueue, demuxer_service *service) |
| 191 | { |
| 192 | if (nullptr == service) { |
| 193 | return; |
| 194 | } |
| 195 | |
| 196 | for (auto &it : streamInfoQueue) { |
| 197 | std::string str = service->GetProperty(it->streamIndex, name); |
| 198 | |
| 199 | if (str.empty()) { |
| 200 | continue; |
| 201 | } |
| 202 | |
| 203 | if (isArray) { |
| 204 | CicadaJSONArray subArray(str); |
| 205 | |
| 206 | for (int i = 0; i < subArray.getSize(); ++i) { |
| 207 | CicadaJSONItem &tempItem = subArray.getItem(i); |
| 208 | addPropertyType(tempItem, it->type); |
| 209 | array.addJSON(tempItem); |
| 210 | } |
| 211 | } else { |
| 212 | CicadaJSONItem loopItem(str); |
| 213 | addPropertyType(loopItem, it->type); |
| 214 | array.addJSON(loopItem); |
| 215 | } |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | void MediaPlayerAnalyticsUtil::addPropertyType(CicadaJSONItem &item, StreamType type) |
| 220 | { |
nothing calls this directly
no test coverage detected