2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Prepare Media::Streaming::Reader to be shared.

This commit is contained in:
John Preston
2019-04-10 15:26:15 +04:00
parent 8e15e71fd5
commit 8c0cd9b9e9
17 changed files with 281 additions and 70 deletions

View File

@@ -39,6 +39,9 @@ namespace Media {
namespace Clip {
class Reader;
} // namespace Clip
namespace Streaming {
class Reader;
} // namespace Streaming
} // namespace Media
namespace Export {
@@ -397,6 +400,10 @@ public:
void markMediaRead(not_null<const DocumentData*> document);
void requestPollViewRepaint(not_null<const PollData*> poll);
std::shared_ptr<::Media::Streaming::Reader> documentStreamedReader(
not_null<DocumentData*> document,
FileOrigin origin);
HistoryItem *addNewMessage(const MTPMessage &data, NewMessageType type);
struct SendActionAnimationUpdate {
@@ -915,8 +922,13 @@ private:
base::flat_set<not_null<GameData*>> _gamesUpdated;
base::flat_set<not_null<PollData*>> _pollsUpdated;
base::flat_map<
not_null<DocumentData*>,
std::weak_ptr<::Media::Streaming::Reader>> _streamedReaders;
base::flat_map<FolderId, std::unique_ptr<Folder>> _folders;
//rpl::variable<FeedId> _defaultFeedId = FeedId(); // #feed
Groups _groups;
std::unordered_map<
not_null<const HistoryItem*>,