20 if (prev && cleanPrevSink)
30 if (!
frame.isValid()) {
46 if (
codec->hwAccel() && !
frame.avFrame()->hw_frames_ctx) {
48 AVFrame *avframe =
frame.avFrame();
49 if (!hwaccel->hwFramesContext())
50 hwaccel->createFramesContext(AVPixelFormat(avframe->format),
51 { avframe->width, avframe->height });
53 if (hwaccel->hwFramesContext())
54 avframe->hw_frames_ctx = av_buffer_ref(hwaccel->hwFramesContextAsBuffer());
58 const auto pixelAspectRatio =
codec->pixelAspectRatio(
frame.avFrame());
59 auto buffer = std::make_unique<QFFmpegVideoBuffer>(
frame.takeAVFrame(), pixelAspectRatio);
65 format.setRotation(m_rotation);
78#include "moc_qffmpegvideorenderer_p.cpp"
void setOutputInternal(QPointer< Output > &actual, Output *desired, ChangeHandler &&changeHandler)
RenderingResult renderInternal(Frame frame) override
VideoRenderer(const TimeController &tc, QVideoSink *sink, QtVideo::Rotation rotation)
void setOutput(QVideoSink *sink, bool cleanPrevSink=false)
The QVideoFrame class represents a frame of video data.
void setEndTime(qint64 time)
Sets the presentation time (in microseconds) when a frame should stop being displayed.
void setStartTime(qint64 time)
Sets the presentation time (in microseconds) when the frame should initially be displayed.
The QVideoSink class represents a generic sink for video data.
void setVideoFrame(const QVideoFrame &frame)
Sets the current video frame.
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum format
GLsizei GLenum GLboolean sink