MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / loadVideoThumbnail

Method loadVideoThumbnail

Telegram/SourceFiles/data/data_document.cpp:903–925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

901}
902
903void DocumentData::loadVideoThumbnail(Data::FileOrigin origin) {
904 const auto autoLoading = false;
905 const auto finalCheck = [=] {
906 if (const auto active = activeMediaView()) {
907 return active->videoThumbnailContent().isEmpty();
908 }
909 return true;
910 };
911 const auto done = [=](QByteArray result) {
912 if (const auto active = activeMediaView()) {
913 active->setVideoThumbnail(std::move(result));
914 }
915 };
916 Data::LoadCloudFile(
917 &session(),
918 _videoThumbnail,
919 origin,
920 LoadFromCloudOrLocal,
921 autoLoading,
922 Data::kAnimationCacheTag,
923 finalCheck,
924 done);
925}
926
927const ImageLocation &DocumentData::videoThumbnailLocation() const {
928 return _videoThumbnail.location;

Callers 5

videoThumbnailWantedMethod · 0.80
preloadEffectMethod · 0.80
GifMethod · 0.80
StickerMethod · 0.80
dataMediaCreatedMethod · 0.80

Calls 4

LoadCloudFileFunction · 0.85
videoThumbnailContentMethod · 0.80
setVideoThumbnailMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected