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

Allow multiple players of the same file.

This commit is contained in:
John Preston
2019-12-10 17:06:22 +03:00
parent 8e8c356659
commit 1243123579
7 changed files with 105 additions and 82 deletions

View File

@@ -43,6 +43,7 @@ class Reader;
} // namespace Clip
namespace Streaming {
class Reader;
class Document;
} // namespace Streaming
} // namespace Media
@@ -439,6 +440,9 @@ public:
not_null<DocumentData*> document,
FileOrigin origin,
bool forceRemoteLoader = false);
std::shared_ptr<::Media::Streaming::Document> documentStreamer(
not_null<DocumentData*> document,
FileOrigin origin);
HistoryItem *addNewMessage(
const MTPMessage &data,
@@ -956,6 +960,9 @@ private:
base::flat_map<
not_null<DocumentData*>,
std::weak_ptr<::Media::Streaming::Reader>> _streamedReaders;
base::flat_map<
not_null<DocumentData*>,
std::weak_ptr<::Media::Streaming::Document>> _streamedDocuments;
base::flat_map<FolderId, std::unique_ptr<Folder>> _folders;
//rpl::variable<FeedId> _defaultFeedId = FeedId(); // #feed