2022-06-29 07:56:10 +00:00
|
|
|
/*
|
|
|
|
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/effects/frame_generator.h"
|
|
|
|
|
|
|
|
#include <QtGui/QImage>
|
2022-08-13 02:24:10 +00:00
|
|
|
#include <memory>
|
2022-06-29 07:56:10 +00:00
|
|
|
|
|
|
|
namespace FFmpeg {
|
|
|
|
|
2022-08-29 12:34:21 +00:00
|
|
|
class FrameGenerator final : public Ui::FrameGenerator {
|
2022-06-29 07:56:10 +00:00
|
|
|
public:
|
2022-08-29 12:34:21 +00:00
|
|
|
explicit FrameGenerator(const QByteArray &bytes);
|
|
|
|
~FrameGenerator();
|
2022-06-29 07:56:10 +00:00
|
|
|
|
|
|
|
int count() override;
|
2022-08-29 12:34:21 +00:00
|
|
|
double rate() override;
|
2022-06-29 07:56:10 +00:00
|
|
|
Frame renderNext(
|
|
|
|
QImage storage,
|
|
|
|
QSize size,
|
|
|
|
Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio) override;
|
2022-08-29 12:34:21 +00:00
|
|
|
Frame renderCurrent(
|
|
|
|
QImage storage,
|
|
|
|
QSize size,
|
|
|
|
Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio) override;
|
|
|
|
void jumpToStart() override;
|
2022-06-29 07:56:10 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
class Impl;
|
|
|
|
|
|
|
|
std::unique_ptr<Impl> _impl;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace FFmpeg
|