| 384 | } |
| 385 | |
| 386 | static 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 | |
| 415 | static bool HasChineseCharacter(std::string str) { |
| 416 | auto len = str.length(); |
no test coverage detected