All pastes #356018 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-14 22:04 UTC
rendered paste body
Index: ui/videowidget.h
===================================================================
--- ui/videowidget.h    (révision 633660)
+++ ui/videowidget.h    (copie de travail)
@@ -45,6 +45,8 @@

                        Q_INVOKABLE Phonon::VideoWidget::AspectRatio aspectRatio() const;
                        Q_INVOKABLE void setAspectRatio( Phonon::VideoWidget::AspectRatio aspectRatio );
+                       Q_INVOKABLE void setZoomX( int percent );
+                       Q_INVOKABLE void setZoomY( int percent );

                        Q_INVOKABLE QWidget *widget() { return this; }

Index: ui/videowidget.cpp
===================================================================
--- ui/videowidget.cpp  (révision 633660)
+++ ui/videowidget.cpp  (copie de travail)
@@ -195,6 +195,22 @@
     }
 }

+void VideoWidget::setZoomX( int percent )
+{
+       if (m_path && m_path->producer()) {
+        XineStream &xs = m_path->producer()->stream();
+        xs.setParam(XINE_PARAM_VO_ZOOM_X, percent);
+       }
+}
+
+void VideoWidget::setZoomY( int percent )
+{
+       if (m_path && m_path->producer()) {
+        XineStream &xs = m_path->producer()->stream();
+        xs.setParam(XINE_PARAM_VO_ZOOM_Y, percent);
+       }
+}
+
 bool VideoWidget::event(QEvent *ev)
 {
     switch (ev->type()) {