author | alwin <alwin> | 2005-04-12 01:12:56 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-04-12 01:12:56 (UTC) |
commit | 81b7ea55be071eab5f8b4afd2c4c291dee365545 (patch) (side-by-side diff) | |
tree | 221de46a86f5dd3c548547413cd226a8aa8a3d9f /noncore/multimedia/opieplayer3/videowidget.cpp | |
parent | df382ea245959ed4d27012358e24c4c95767270f (diff) | |
download | opie-81b7ea55be071eab5f8b4afd2c4c291dee365545.zip opie-81b7ea55be071eab5f8b4afd2c4c291dee365545.tar.gz opie-81b7ea55be071eab5f8b4afd2c4c291dee365545.tar.bz2 |
- loading/playing playlists
- appending directories to playlist
- gui stuff
Diffstat (limited to 'noncore/multimedia/opieplayer3/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer3/videowidget.cpp | 39 |
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 @@ -19,16 +19,20 @@ VideoWidget::VideoWidget( QWidget * parent, const char * name, WFlags f) m_MainLayout = new QVBoxLayout(this);
m_MainLayout->setAutoAdd(true);
m_Videodisplay = new XineVideoWidget(this,"videodisp");
+#if 0
m_PosSlider = new QSlider(QSlider::Horizontal,this);
m_PosSlider->setTickInterval(60);
connect(m_PosSlider,SIGNAL(valueChanged(int)),this,SLOT(slotNewPos(int)));
connect(m_PosSlider,SIGNAL(sliderMoved(int)),this,SLOT(slotNewPos(int)));
connect(m_PosSlider,SIGNAL(sliderPressed()),this,SLOT(sliderPressed()));
connect(m_PosSlider,SIGNAL(sliderReleased()),this,SLOT(sliderReleased()));
+#endif
connect(m_Videodisplay,SIGNAL(videoResized ( const QSize & )),this,SLOT(slot_Videoresized(const QSize&)));
connect(m_Videodisplay,SIGNAL(clicked()),this,SLOT(slotClicked()));
+#if 0
m_pressed = false;
m_uppos=0;
+#endif
}
VideoWidget::~VideoWidget()
@@ -45,53 +49,70 @@ void VideoWidget::closeEvent(QCloseEvent*e) {
}
-void VideoWidget::slotNewPos(int pos)
+void VideoWidget::slotNewPos(int /*pos*/)
{
+#if 0
if (!m_xineLib) return;
if (m_uppos==pos) return;
m_xineLib->seekTo(pos);
+#endif
}
void VideoWidget::sliderPressed()
{
+#if 0
m_pressed = true;
+#endif
}
void VideoWidget::sliderReleased()
{
+#if 0
m_pressed = false;
+#endif
}
-void VideoWidget::fullScreen(bool how)
+void VideoWidget::fullScreen(bool /* how */)
{
+#if 0
if (how) {
m_PosSlider->hide();
} else {
m_PosSlider->show();
}
+#endif
}
-void VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib)
+int VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib)
{
m_current = aLnk;
+ bool recon;
if (m_xineLib != aLib) {
- disconnect(m_xineLib);
+ if (m_xineLib) disconnect(m_xineLib);
m_xineLib = aLib;
if (aLib) m_xineLib->setWidget(m_Videodisplay);
}
if (!m_xineLib) {
- return;
+ return -1;
}
connect(m_xineLib,SIGNAL(stopped()),this,SLOT(slotStopped()));
+#if 0
m_uppos=0;
m_PosSlider->setValue(0);
+#endif
m_xineLib->setWidget(m_Videodisplay);
m_xineLib->setShowVideo(true);
m_xineLib->resize(m_Videodisplay->size());
- m_xineLib->play(m_current.file());
- int l = m_xineLib->length();
+ int res = m_xineLib->play(m_current.file());
+ odebug << "Xine play: " << res << oendl;
+ if (res != 1) {
+ return -2;
+ }
+ return m_xineLib->length();
+#if 0
m_PosSlider->setRange(0,l);
m_PosSlider->setPageStep(l/10);
+#endif
}
void VideoWidget::stopPlaying()
@@ -114,9 +135,11 @@ void VideoWidget::slot_Videoresized(const QSize&s) }
}
-void VideoWidget::updatePos(int val)
+void VideoWidget::updatePos(int /*val*/)
{
+#if 0
if (m_pressed) return;
m_uppos = val;
m_PosSlider->setValue(val);
+#endif
}
|