summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer3/videowidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer3/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer3/videowidget.cpp39
1 files changed, 31 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer3/videowidget.cpp b/noncore/multimedia/opieplayer3/videowidget.cpp
index c5c63c7..a28d47d 100644
--- a/noncore/multimedia/opieplayer3/videowidget.cpp
+++ b/noncore/multimedia/opieplayer3/videowidget.cpp
@@ -21,2 +21,3 @@ VideoWidget::VideoWidget( QWidget * parent, const char * name, WFlags f)
21 m_Videodisplay = new XineVideoWidget(this,"videodisp"); 21 m_Videodisplay = new XineVideoWidget(this,"videodisp");
22#if 0
22 m_PosSlider = new QSlider(QSlider::Horizontal,this); 23 m_PosSlider = new QSlider(QSlider::Horizontal,this);
@@ -27,6 +28,9 @@ VideoWidget::VideoWidget( QWidget * parent, const char * name, WFlags f)
27 connect(m_PosSlider,SIGNAL(sliderReleased()),this,SLOT(sliderReleased())); 28 connect(m_PosSlider,SIGNAL(sliderReleased()),this,SLOT(sliderReleased()));
29#endif
28 connect(m_Videodisplay,SIGNAL(videoResized ( const QSize & )),this,SLOT(slot_Videoresized(const QSize&))); 30 connect(m_Videodisplay,SIGNAL(videoResized ( const QSize & )),this,SLOT(slot_Videoresized(const QSize&)));
29 connect(m_Videodisplay,SIGNAL(clicked()),this,SLOT(slotClicked())); 31 connect(m_Videodisplay,SIGNAL(clicked()),this,SLOT(slotClicked()));
32#if 0
30 m_pressed = false; 33 m_pressed = false;
31 m_uppos=0; 34 m_uppos=0;
35#endif
32} 36}
@@ -47,4 +51,5 @@ void VideoWidget::closeEvent(QCloseEvent*e)
47 51
48void VideoWidget::slotNewPos(int pos) 52void VideoWidget::slotNewPos(int /*pos*/)
49{ 53{
54#if 0
50 if (!m_xineLib) return; 55 if (!m_xineLib) return;
@@ -52,2 +57,3 @@ void VideoWidget::slotNewPos(int pos)
52 m_xineLib->seekTo(pos); 57 m_xineLib->seekTo(pos);
58#endif
53} 59}
@@ -56,3 +62,5 @@ void VideoWidget::sliderPressed()
56{ 62{
63#if 0
57 m_pressed = true; 64 m_pressed = true;
65#endif
58} 66}
@@ -61,7 +69,10 @@ void VideoWidget::sliderReleased()
61{ 69{
70#if 0
62 m_pressed = false; 71 m_pressed = false;
72#endif
63} 73}
64 74
65void VideoWidget::fullScreen(bool how) 75void VideoWidget::fullScreen(bool /* how */)
66{ 76{
77#if 0
67 if (how) { 78 if (how) {
@@ -71,9 +82,11 @@ void VideoWidget::fullScreen(bool how)
71 } 82 }
83#endif
72} 84}
73 85
74void VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib) 86int VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib)
75{ 87{
76 m_current = aLnk; 88 m_current = aLnk;
89 bool recon;
77 if (m_xineLib != aLib) { 90 if (m_xineLib != aLib) {
78 disconnect(m_xineLib); 91 if (m_xineLib) disconnect(m_xineLib);
79 m_xineLib = aLib; 92 m_xineLib = aLib;
@@ -82,7 +95,9 @@ void VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib)
82 if (!m_xineLib) { 95 if (!m_xineLib) {
83 return; 96 return -1;
84 } 97 }
85 connect(m_xineLib,SIGNAL(stopped()),this,SLOT(slotStopped())); 98 connect(m_xineLib,SIGNAL(stopped()),this,SLOT(slotStopped()));
99#if 0
86 m_uppos=0; 100 m_uppos=0;
87 m_PosSlider->setValue(0); 101 m_PosSlider->setValue(0);
102#endif
88 m_xineLib->setWidget(m_Videodisplay); 103 m_xineLib->setWidget(m_Videodisplay);
@@ -90,6 +105,12 @@ void VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib)
90 m_xineLib->resize(m_Videodisplay->size()); 105 m_xineLib->resize(m_Videodisplay->size());
91 m_xineLib->play(m_current.file()); 106 int res = m_xineLib->play(m_current.file());
92 int l = m_xineLib->length(); 107 odebug << "Xine play: " << res << oendl;
108 if (res != 1) {
109 return -2;
110 }
111 return m_xineLib->length();
112#if 0
93 m_PosSlider->setRange(0,l); 113 m_PosSlider->setRange(0,l);
94 m_PosSlider->setPageStep(l/10); 114 m_PosSlider->setPageStep(l/10);
115#endif
95} 116}
@@ -116,4 +137,5 @@ void VideoWidget::slot_Videoresized(const QSize&s)
116 137
117void VideoWidget::updatePos(int val) 138void VideoWidget::updatePos(int /*val*/)
118{ 139{
140#if 0
119 if (m_pressed) return; 141 if (m_pressed) return;
@@ -121,2 +143,3 @@ void VideoWidget::updatePos(int val)
121 m_PosSlider->setValue(val); 143 m_PosSlider->setValue(val);
144#endif
122} 145}