MCPcopy Create free account
hub / github.com/Tencent/libpag / CheckDuplicateVideoSequence

Function CheckDuplicateVideoSequence

exporter/src/export/ExportVerify.cpp:386–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386static void CheckDuplicateVideoSequence(std::shared_ptr<PAGExportSession> session,
387 std::vector<pag::Composition*>& compositions) {
388 if (!session->exportStaticCompAsBmp) {
389 return;
390 }
391
392 std::vector<pag::Composition*> videoCompositions = {};
393 for (auto composition : compositions) {
394 if (composition->type() == pag::CompositionType::Video) {
395 videoCompositions.push_back(composition);
396 }
397 }
398
399 if (videoCompositions.size() < 2) {
400 return;
401 }
402
403 for (size_t i = 0; i < videoCompositions.size() - 1; i++) {
404 for (size_t j = i + 1; j < videoCompositions.size(); j++) {
405 ScopedAssign<pag::ID> compID(session->compID, videoCompositions[i]->id);
406 if (CompareVideoComposition(session,
407 static_cast<pag::VideoComposition*>(videoCompositions[i]),
408 static_cast<pag::VideoComposition*>(videoCompositions[j]))) {
409 session->pushWarning(AlertInfoType::SameSequence);
410 }
411 }
412 }
413}
414
415static bool HasChineseCharacter(std::string str) {
416 auto len = str.length();

Callers 1

CheckBeforeExportFunction · 0.85

Calls 5

CompareVideoCompositionFunction · 0.85
push_backMethod · 0.80
sizeMethod · 0.80
typeMethod · 0.45
pushWarningMethod · 0.45

Tested by

no test coverage detected