2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Report streaming failed.

This commit is contained in:
John Preston
2019-03-05 17:56:27 +04:00
parent 71b733a018
commit 6887993f92
20 changed files with 268 additions and 193 deletions

View File

@@ -167,6 +167,7 @@ public:
[[nodiscard]] bool isImage() const;
void recountIsImage();
[[nodiscard]] bool supportsStreaming() const;
void setNotSupportsStreaming();
void setData(const QByteArray &data) {
_data = data;
}
@@ -244,10 +245,17 @@ public:
std::unique_ptr<Data::UploadState> uploadingData;
private:
enum class SupportsStreaming : uchar {
Unknown,
MaybeYes,
MaybeNo,
No,
};
friend class Serialize::Document;
LocationType locationType() const;
void validateGoodThumbnail();
void setMaybeSupportsStreaming(bool supports);
void destroyLoader(mtpFileLoader *newValue = nullptr) const;
@@ -274,7 +282,7 @@ private:
std::unique_ptr<DocumentAdditionalData> _additional;
int32 _duration = -1;
bool _isImage = false;
bool _supportsStreaming = false;
SupportsStreaming _supportsStreaming = SupportsStreaming::Unknown;
bool _inappPlaybackFailed = false;
ActionOnLoad _actionOnLoad = ActionOnLoadNone;
@@ -397,8 +405,4 @@ base::binary_guard ReadImageAsync(
FnMut<QImage(QImage)> postprocess,
FnMut<void(QImage&&)> done);
void HandleUnsupportedMedia(
not_null<DocumentData*> document,
FullMsgId contextId);
} // namespace Data