summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 39364ab..3a82a50 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -120,98 +120,98 @@ Lib::Lib(XineVideoWidget* widget) {
}
null_display_handler( m_videoOutput,
xine_display_frame,
this );
m_xine = xine_init( m_videoOutput,
m_audioOutput, m_config );
// install the event handler
xine_register_event_listener( m_xine, xine_event_handler, this );
}
Lib::~Lib() {
delete m_config;
xine_remove_event_listener( m_xine, xine_event_handler );
xine_exit( m_xine );
delete m_videoOutput;
//delete m_audioOutput;
}
void Lib::resize ( const QSize &s )
{
if ( s. width ( ) && s. height ( )) {
::null_set_gui_width( m_videoOutput, s. width() );
::null_set_gui_height(m_videoOutput, s. height() );
}
}
QCString Lib::version() {
QCString str( xine_get_str_version() );
return str;
};
int Lib::majorVersion() {
return xine_get_major_version();
}
int Lib::minorVersion() {
return xine_get_minor_version();
};
int Lib::subVersion() {
return xine_get_sub_version();
}
int Lib::play( const QString& fileName,
int startPos,
int start_time ) {
QString str = fileName.stripWhiteSpace();
//workaround OpiePlayer bug
- if (str.right(1) == QString::fromLatin1("/") )
- str = str.mid( str.length() -1 );
+ //f (str.right(1) == QString::fromLatin1("/") )
+ // str = str.mid( str.length() -1 );
return xine_play( m_xine, QFile::encodeName(str.utf8() ).data(),
startPos, start_time);
}
void Lib::stop() {
qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>");
xine_stop(m_xine );
}
void Lib::pause(){
xine_set_speed( m_xine, SPEED_PAUSE );
}
int Lib::speed() {
return xine_get_speed( m_xine );
}
void Lib::setSpeed( int speed ) {
xine_set_speed( m_xine, speed );
}
int Lib::status(){
return xine_get_status( m_xine );
}
int Lib::currentPosition(){
return xine_get_current_position( m_xine );
}
int Lib::currentTime() {
return xine_get_current_time( m_xine );
};
int Lib::length() {
return xine_get_stream_length( m_xine );
}
bool Lib::isSeekable() {
return xine_is_stream_seekable(m_xine);
}
Frame Lib::currentFrame() {
Frame frame;
return frame;
};
int Lib::error() {
return xine_get_error( m_xine );
};
void Lib::handleXineEvent( xine_event_t* t ) {
if ( t->type == XINE_EVENT_PLAYBACK_FINISHED )
emit stopped();
}
void Lib::setShowVideo( bool video ) {
m_video = video;
::null_set_show_video( m_videoOutput, video );
}
bool Lib::isShowingVideo() {
return ::null_is_showing_video( m_videoOutput );