1 #ifndef _JPEG_FRAME_VIEW_H
2 #define _JPEG_FRAME_VIEW_H 1
9 #include <movit/effect_chain.h>
10 #include <movit/ycbcr_input.h>
15 std::unique_ptr<uint8_t[]> y, cb, cr;
16 unsigned width, height;
17 unsigned chroma_subsampling_x, chroma_subsampling_y;
18 unsigned pitch_y, pitch_chroma;
21 class JPEGFrameView : public QGLWidget {
25 JPEGFrameView(QWidget *parent);
27 void setFrame(unsigned stream_idx, int64_t pts)
29 this->stream_idx = stream_idx;
34 void setDecodedFrame(std::shared_ptr<Frame> frame);
37 void initializeGL() override;
38 void resizeGL(int width, int height) override;
39 void paintGL() override;
47 std::unique_ptr<movit::EffectChain> chain;
48 std::shared_ptr<Frame> current_frame; // So that we hold on to the pixels.
49 movit::YCbCrInput *ycbcr_input;
50 movit::YCbCrFormat ycbcr_format;
53 #endif // !defined(_JPEG_FRAME_VIEW_H)