MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / handlerDecoder

Method handlerDecoder

src/quicktimevideo.cpp:1327–1369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1325} // QuickTimeVideo::videoHeaderDecoder
1326
1327void QuickTimeVideo::handlerDecoder(size_t size) {
1328 size_t cur_pos = io_->tell();
1329 DataBuf buf(100);
1330 std::memset(buf.data(), 0x0, buf.size());
1331 buf.data()[4] = '\0';
1332
1333 const TagVocabulary* tv;
1334
1335 for (int i = 0; i < 5; i++) {
1336 io_->readOrThrow(buf.data(), 4);
1337
1338 switch (i) {
1339 case HandlerClass:
1340 tv = Exiv2::find(handlerClassTags, Exiv2::toString(buf.data()));
1341 if (tv) {
1342 if (currentStream_ == Video)
1343 xmpData_["Xmp.video.HandlerClass"] = exvGettext(tv->label_);
1344 else if (currentStream_ == Audio)
1345 xmpData_["Xmp.audio.HandlerClass"] = exvGettext(tv->label_);
1346 }
1347 break;
1348 case HandlerType:
1349 tv = Exiv2::find(handlerTypeTags, Exiv2::toString(buf.data()));
1350 if (tv) {
1351 if (currentStream_ == Video)
1352 xmpData_["Xmp.video.HandlerType"] = exvGettext(tv->label_);
1353 else if (currentStream_ == Audio)
1354 xmpData_["Xmp.audio.HandlerType"] = exvGettext(tv->label_);
1355 }
1356 break;
1357 case HandlerVendorID:
1358 tv = Exiv2::find(vendorIDTags, Exiv2::toString(buf.data()));
1359 if (tv) {
1360 if (currentStream_ == Video)
1361 xmpData_["Xmp.video.HandlerVendorID"] = exvGettext(tv->label_);
1362 else if (currentStream_ == Audio)
1363 xmpData_["Xmp.audio.HandlerVendorID"] = exvGettext(tv->label_);
1364 }
1365 break;
1366 }
1367 }
1368 io_->seek(cur_pos + size, BasicIo::beg);
1369} // QuickTimeVideo::handlerDecoder
1370
1371void QuickTimeVideo::fileTypeDecoder(size_t size) {
1372 DataBuf buf(5);

Callers

nothing calls this directly

Calls 8

toStringFunction · 0.85
exvGettextFunction · 0.85
tellMethod · 0.80
dataMethod · 0.80
readOrThrowMethod · 0.80
seekMethod · 0.80
findFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected