MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / loadVideo

Method loadVideo

framework/data.cpp:740–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738}
739
740sp<Video> DataImpl::loadVideo(const UString &path)
741{
742
743 if (path.substr(0, 4) == "SMK:")
744 {
745 auto splitString = split(path, ":");
746 if (splitString.size() != 2)
747 {
748 LogError("Invalid SMK string: \"%s\"", path);
749 return nullptr;
750 }
751 auto file = this->fs.open(splitString[1]);
752 if (!file)
753 {
754 LogWarning("Failed to open SMK file \"%s\"", splitString[1]);
755 return nullptr;
756 }
757 return loadSMKVideo(file);
758 }
759 LogError("Unknown video string \"%s\"", path);
760 return nullptr;
761}
762
763bool DataImpl::writeImage(UString systemPath, sp<Image> image, sp<Palette> palette)
764{

Callers 1

VideoScreenMethod · 0.80

Calls 4

splitFunction · 0.85
loadSMKVideoFunction · 0.85
openMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected