From 9854069549ae9491c4ef3bd0e9c105e5611a7daf Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 23 Apr 2009 19:46:08 +0000 Subject: - Postpone the video player initialization until the play button has been pressed. - Assure that the video player has the same size as the preview widget. Convincing the embedded video player to dynamically resize during playing a video seems to be impossible - I need to check the Phonon::VideoPlayer source code to get the root cause for the currently strange behavior :-( svn path=/trunk/KDE/kdebase/apps/; revision=958332 --- src/panels/information/phononwidget.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/panels/information/phononwidget.h') diff --git a/src/panels/information/phononwidget.h b/src/panels/information/phononwidget.h index daea8b1cc..196b87f87 100644 --- a/src/panels/information/phononwidget.h +++ b/src/panels/information/phononwidget.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -34,7 +35,9 @@ namespace Phonon class VideoPlayer; } // namespace Phonon +class EmbeddedVideoPlayer; class QToolButton; +class QVBoxLayout; class PhononWidget : public QWidget { @@ -54,6 +57,9 @@ class PhononWidget : public QWidget void setMode(Mode mode); Mode mode() const; + void setVideoSize(const QSize& size); + QSize videoSize() const; + signals: void playingStarted(); void playingStopped(); @@ -67,15 +73,22 @@ class PhononWidget : public QWidget void play(); void stop(); + private: + void applyVideoSize(); + private: Mode m_mode; KUrl m_url; + QSize m_videoSize; + QToolButton *m_playButton; QToolButton *m_stopButton; + + QVBoxLayout *m_topLayout; Phonon::MediaObject *m_audioMedia; Phonon::MediaObject *m_media; Phonon::SeekSlider *m_seekSlider; - Phonon::VideoPlayer *m_videoPlayer; + EmbeddedVideoPlayer *m_videoPlayer; }; #endif // PHONONWIDGET_H -- cgit v1.3.1