X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=video_widget.h;h=801d5cdb6844565e1c7de2853a06de28bc6e99ee;hb=8321974fc7eb20f91ca4437bdd4ef94576e36098;hp=293c968852d4ef976c60ed30394a4740efdc2ad5;hpb=3e43cd4777ddb314779f6c2be51028e14bd54e6d;p=pkanalytics diff --git a/video_widget.h b/video_widget.h index 293c968..801d5cd 100644 --- a/video_widget.h +++ b/video_widget.h @@ -37,6 +37,7 @@ public: void initializeGL() override; void resizeGL(int w, int h) override; void paintGL() override; + void wheelEvent(QWheelEvent *event) override; signals: void position_changed(uint64_t pos); @@ -59,6 +60,11 @@ private: GLuint last_chroma_width = 0, last_chroma_height = 0; GLfloat cbcr_offset[2]; double display_aspect = 1.0; + double zoom_matrix[9] = { // Column-major, to match with OpenGL. + 1.0, 0.0, 0.0, + 0.0, 1.0, 0.0, + 0.0, 0.0, 1.0, + }; int64_t pts_origin; int64_t last_pts; @@ -95,6 +101,8 @@ private: Frame make_video_frame(const AVFrame *frame); bool process_queued_commands(AVFormatContext *format_ctx, AVCodecContext *video_codec_ctx, int video_stream_index, bool *seeked); void store_pts(int64_t pts); + + void fixup_zoom_matrix(); }; #endif // !defined(_VIDEO_WIDGET_H)