summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
authorzecke <zecke>2002-07-09 13:49:34 (UTC)
committer zecke <zecke>2002-07-09 13:49:34 (UTC)
commit87bb55055c826b6c75d4a66a7ff6e21058cf6361 (patch) (side-by-side diff)
tree000f68448ce3b903da00a3e5a2ad24140a18f85b /noncore/multimedia/opieplayer2/lib.cpp
parente99adc2029808f6276474c95e8587607a4bd8091 (diff)
downloadopie-87bb55055c826b6c75d4a66a7ff6e21058cf6361.zip
opie-87bb55055c826b6c75d4a66a7ff6e21058cf6361.tar.gz
opie-87bb55055c826b6c75d4a66a7ff6e21058cf6361.tar.bz2
Update the lib
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp40
1 files changed, 37 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 0ea85dd..69ff492 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -10,7 +10,14 @@
extern "C" {
-vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video);
+ vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video);
+ int null_is_showing_video( vo_driver_t* self );
+ void null_set_show_video( vo_driver_t* self, int show );
+ int null_is_fullscreen( vo_driver_t* self );
+ void null_set_fullscreen( vo_driver_t* self, int screen );
+ int null_is_scaling( vo_driver_t* self );
+ void null_set_scaling( vo_driver_t* self, int scale );
+
}
using namespace XINE;
@@ -47,13 +54,16 @@ Lib::Lib() {
// m_audioOutput,
// m_config );
// test loading
- m_videoOutput = ::init_video_out_plugin( m_config, NULL );
+ m_videoOutput = ::init_video_out_plugin( m_config, NULL );
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;
@@ -116,4 +126,28 @@ Frame Lib::currentFrame() {
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 ) {
+ ::null_set_show_video( m_videoOutput, video );
+}
+bool Lib::isShowingVideo() {
+ return ::null_is_showing_video( m_videoOutput );
+}
+void Lib::showVideoFullScreen( bool fullScreen ) {
+ ::null_set_fullscreen( m_videoOutput, fullScreen );
+}
+bool Lib::isVideoFullScreen() {
+ return ::null_is_fullscreen( m_videoOutput );
+}
+void Lib::setScaling( bool scale ) {
+ ::null_set_scaling( m_videoOutput, scale );
+}
+bool Lib::isScaling() {
+ return ::null_is_scaling( m_videoOutput );
+}
+void Lib::xine_event_handler( void* user_data, xine_event_t* t ) {
+ ((Lib*)user_data)->handleXineEvent( t );
+}