summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
Unidiff
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
@@ -12,3 +12,10 @@
12extern "C" { 12extern "C" {
13vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video); 13 vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video);
14 int null_is_showing_video( vo_driver_t* self );
15 void null_set_show_video( vo_driver_t* self, int show );
16 int null_is_fullscreen( vo_driver_t* self );
17 void null_set_fullscreen( vo_driver_t* self, int screen );
18 int null_is_scaling( vo_driver_t* self );
19 void null_set_scaling( vo_driver_t* self, int scale );
20
14} 21}
@@ -49,5 +56,7 @@ Lib::Lib() {
49 // test loading 56 // test loading
50 m_videoOutput = ::init_video_out_plugin( m_config, NULL ); 57 m_videoOutput = ::init_video_out_plugin( m_config, NULL );
51 m_xine = xine_init( m_videoOutput, 58 m_xine = xine_init( m_videoOutput,
52 m_audioOutput, m_config ); 59 m_audioOutput, m_config );
60 // install the event handler
61 xine_register_event_listener( m_xine, xine_event_handler, this );
53} 62}
@@ -56,2 +65,3 @@ Lib::~Lib() {
56 delete m_config; 65 delete m_config;
66 xine_remove_event_listener( m_xine, xine_event_handler );
57 xine_exit( m_xine ); 67 xine_exit( m_xine );
@@ -118,2 +128,26 @@ int Lib::error() {
118}; 128};
119 129void Lib::handleXineEvent( xine_event_t* t ) {
130 if ( t->type == XINE_EVENT_PLAYBACK_FINISHED )
131 emit stopped();
132}
133void Lib::setShowVideo( bool video ) {
134 ::null_set_show_video( m_videoOutput, video );
135}
136bool Lib::isShowingVideo() {
137 return ::null_is_showing_video( m_videoOutput );
138}
139void Lib::showVideoFullScreen( bool fullScreen ) {
140 ::null_set_fullscreen( m_videoOutput, fullScreen );
141}
142bool Lib::isVideoFullScreen() {
143 return ::null_is_fullscreen( m_videoOutput );
144}
145void Lib::setScaling( bool scale ) {
146 ::null_set_scaling( m_videoOutput, scale );
147}
148bool Lib::isScaling() {
149 return ::null_is_scaling( m_videoOutput );
150}
151void Lib::xine_event_handler( void* user_data, xine_event_t* t ) {
152 ((Lib*)user_data)->handleXineEvent( t );
153}