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

Function WriteBitmapConfig

exporter/src/config/ConfigFile.cpp:146–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static void WriteBitmapConfig(XMLElement* root, ConfigParam* configParam) {
147 XMLDocument* doc = root->GetDocument();
148 XMLElement* bitmap = doc->NewElement("bitmap");
149 root->InsertEndChild(bitmap);
150
151 AddElement(bitmap, "sequence-suffix", CompositionBmpSuffix);
152 AddElement(bitmap, "sequence-type", std::to_string(static_cast<int>(configParam->sequenceType)));
153 AddElement(bitmap, "sequence-quality", std::to_string(configParam->sequenceQuality));
154 AddElement(bitmap, "keyframe-interval", std::to_string(configParam->bitmapKeyFrameInterval));
155 AddElement(bitmap, "max-resolution", std::to_string(configParam->bitmapMaxResolution));
156
157 XMLElement* sequences = doc->NewElement("sequences");
158 bitmap->InsertEndChild(sequences);
159
160 XMLElement* sequence = doc->NewElement("sequence");
161 sequence->SetAttribute("scale", "1");
162 sequence->SetAttribute("framerate", FormatFloat(configParam->frameRate, 1).c_str());
163 sequences->InsertEndChild(sequence);
164
165 XMLElement* vector = doc->NewElement("vector");
166 vector->SetText("");
167 root->InsertEndChild(vector);
168
169 XMLElement* video = doc->NewElement("video");
170 video->SetText("");
171 root->InsertEndChild(video);
172}
173
174int WriteDefaultConfigFile(const std::string& fileName) {
175 if (fileName.empty()) {

Callers 2

WriteDefaultConfigFileFunction · 0.85
WriteConfigFileFunction · 0.85

Calls 2

AddElementFunction · 0.85
FormatFloatFunction · 0.85

Tested by

no test coverage detected