Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
36 lines
805 B
C++
36 lines
805 B
C++
/*
|
|
This file is part of Telegram Desktop,
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
For license and copyright information please follow this link:
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
*/
|
|
#pragma once
|
|
|
|
#include "ui/dynamic_image.h"
|
|
|
|
#include "media/clip/media_clip_reader.h"
|
|
|
|
namespace Media::Streaming {
|
|
|
|
class RoundPreview final : public Ui::DynamicImage {
|
|
public:
|
|
RoundPreview(const QByteArray &bytes, int size);
|
|
|
|
std::shared_ptr<DynamicImage> clone() override;
|
|
|
|
QImage image(int size) override;
|
|
void subscribeToUpdates(Fn<void()> callback) override;
|
|
|
|
private:
|
|
void clipCallback(Clip::Notification notification);
|
|
|
|
const QByteArray _bytes;
|
|
Clip::ReaderPointer _reader;
|
|
Fn<void()> _repaint;
|
|
int _size = 0;
|
|
|
|
};
|
|
|
|
} // namespace Media::Streaming
|