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

Method fileTypeDecoder

src/quicktimevideo.cpp:1371–1400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1369} // QuickTimeVideo::handlerDecoder
1370
1371void QuickTimeVideo::fileTypeDecoder(size_t size) {
1372 DataBuf buf(5);
1373 std::memset(buf.data(), 0x0, buf.size());
1374 buf.data()[4] = '\0';
1375 Exiv2::Value::UniquePtr v = Exiv2::Value::create(Exiv2::xmpSeq);
1376 const TagVocabulary* td;
1377
1378 for (int i = 0; size / 4 != 0; size -= 4, i++) {
1379 io_->readOrThrow(buf.data(), 4);
1380 td = Exiv2::find(qTimeFileType, Exiv2::toString(buf.data()));
1381
1382 switch (i) {
1383 case 0:
1384 if (td)
1385 xmpData_["Xmp.video.MajorBrand"] = exvGettext(td->label_);
1386 break;
1387 case 1:
1388 xmpData_["Xmp.video.MinorVersion"] = buf.read_uint32(0, bigEndian);
1389 break;
1390 default:
1391 if (td)
1392 v->read(exvGettext(td->label_));
1393 else
1394 v->read(Exiv2::toString(buf.data()));
1395 break;
1396 }
1397 }
1398 xmpData_.add(Exiv2::XmpKey("Xmp.video.CompatibleBrands"), v.get());
1399 io_->readOrThrow(buf.data(), size % 4);
1400} // QuickTimeVideo::fileTypeDecoder
1401
1402void QuickTimeVideo::mediaHeaderDecoder(size_t size) {
1403 DataBuf buf(5);

Callers

nothing calls this directly

Calls 11

toStringFunction · 0.85
exvGettextFunction · 0.85
XmpKeyClass · 0.85
dataMethod · 0.80
readOrThrowMethod · 0.80
read_uint32Method · 0.80
getMethod · 0.80
findFunction · 0.50
sizeMethod · 0.45
readMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected