summaryrefslogtreecommitdiffstats
path: root/kaffeine/src/player-parts/xine-part/kxinewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaffeine/src/player-parts/xine-part/kxinewidget.cpp')
-rw-r--r--kaffeine/src/player-parts/xine-part/kxinewidget.cpp50
1 files changed, 10 insertions, 40 deletions
diff --git a/kaffeine/src/player-parts/xine-part/kxinewidget.cpp b/kaffeine/src/player-parts/xine-part/kxinewidget.cpp
index 77f26e2..f6b032a 100644
--- a/kaffeine/src/player-parts/xine-part/kxinewidget.cpp
+++ b/kaffeine/src/player-parts/xine-part/kxinewidget.cpp
@@ -36,7 +36,6 @@
#include <cmath>
#include "kxinewidget.h"
-#include "kaffeinepart.h"
#ifdef HAVE_XINERAMA
#include <X11/extensions/Xinerama.h>
@@ -636,8 +635,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent)
message = i18n("The source can't be read.\nMaybe you don't have enough rights for this, or source doesn't contain data (e.g: no disc in drive). ");
if(data->explanation)
message = message + "(" + ((char *) data + data->parameters) + ")";
- debugOut(message);
- return; // This error is handled by autoinstallation
+ break;
}
case XINE_MSG_LIBRARY_LOAD_ERROR:
{
@@ -650,11 +648,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent)
{
message = i18n("The source seems encrypted, and can't be read. ");
if (vw->m_trackURL.contains("dvd:/"))
- {
- if (KaffeinePart::installDistroCodec(vw, "xine-engine", "dvdcss"))
- return;
message = message + i18n("\nYour DVD is probably crypted. According to your country laws, you can or can't use libdvdcss to be able to read this disc. ");
- }
if(data->explanation)
message = message + "(" + ((char *) data + data->parameters) + ")";
break;
@@ -1683,7 +1677,7 @@ void KXineWidget::dvbShowOSD()
int h = m_videoFrameHeight;
if ( !w || !h )
return;
- if ( w<800 ) {
+ if ( w<1921 ) {
if ( dvbCurrentNext[0]=="E" ) {
dvbOSDHideTimer.stop();
dvbOSD = xine_osd_new( m_xineStream, border, border, w-(2*border), h-(2/border) );
@@ -1864,7 +1858,7 @@ void KXineWidget::setDvbCurrentNext( const QString &channelName, const QStringLi
void KXineWidget::setDvb( const QString &pipeName, const QString &chanName, int haveVideo )
{
- m_trackURL = pipeName;
+ m_trackURL = /*"fifo://"+*/pipeName;
m_trackTitle = chanName;
dvbHaveVideo = haveVideo;
}
@@ -1916,15 +1910,6 @@ void KXineWidget::slotPlayTimeShift()
m_posTimer.start(1000);
}
-bool KXineWidget::unhandledStreamsPresent()
-{
- unsigned int hasAudio = xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_HAS_AUDIO);
- unsigned int hasVideo = xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_HAS_VIDEO);
-
- return (hasAudio && !xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_AUDIO_HANDLED)) ||
- (hasVideo && !xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_VIDEO_HANDLED));
-}
-
void KXineWidget::slotPlay()
{
if ((!isXineReady()) || (isQueueEmpty()))
@@ -2007,13 +1992,6 @@ void KXineWidget::slotPlay()
return;
}
- if (unhandledStreamsPresent())
- {
- errorOut("No codecs to handle media");
- sendXineError();
- return;
- }
-
/**** use visualization ? ****/
#ifndef USE_QT_ONLY
unwireAudioFilters();
@@ -2232,17 +2210,6 @@ void KXineWidget::sendXineError()
case XINE_ERROR_NO_INPUT_PLUGIN:
case XINE_ERROR_NO_DEMUX_PLUGIN:
{
- if (m_trackURL.startsWith("dvd:/"))
- {
- if (KaffeinePart::installDistroCodec(this, "xine-engine", "dvdcss"))
- return;
- }
- else
- {
- if (KaffeinePart::installDistroCodec(this, "xine-engine", "ffmpeg"))
- return;
- }
-
error = i18n("No plugin found to handle this resource") + " " + addInfo;
break;
}
@@ -2263,9 +2230,6 @@ void KXineWidget::sendXineError()
}
default:
{
- if (unhandledStreamsPresent() && KaffeinePart::installDistroCodec(this, "xine-engine", "ffmpeg"))
- return;
-
error = i18n("Generic error") + " (" + m_trackURL + ")";
break;
}
@@ -2895,7 +2859,13 @@ void KXineWidget::slotStop()
if ( m_lengthInfoTimer.isActive() ) m_lengthInfoTimer.stop();
//emit signalNewPosition(0, QTime());
- xine_stop(m_xineStream);
+ if ((m_logoFile.isNull()) && (isPlaying()))
+ xine_stop(m_xineStream);
+ else
+ {
+ appendToQueue(m_logoFile);
+ QTimer::singleShot(0, this, SLOT(slotPlay()));
+ }
emit signalXineStatus(i18n("Stop"));
}