summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/lib.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 69ff492..3f2eea6 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -1,49 +1,50 @@
1 1
2#include <stdio.h> 2#include <stdio.h>
3#include <stdlib.h> 3#include <stdlib.h>
4//#include <qpe/qpeapplication.h> 4//#include <qpe/qpeapplication.h>
5 5
6#include <qfile.h> 6#include <qfile.h>
7 7
8#include "xinevideowidget.h"
8#include "frame.h" 9#include "frame.h"
9#include "lib.h" 10#include "lib.h"
10 11
11 12
12extern "C" { 13extern "C" {
13 vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video); 14 vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video);
14 int null_is_showing_video( vo_driver_t* self ); 15 int null_is_showing_video( vo_driver_t* self );
15 void null_set_show_video( vo_driver_t* self, int show ); 16 void null_set_show_video( vo_driver_t* self, int show );
16 int null_is_fullscreen( vo_driver_t* self ); 17 int null_is_fullscreen( vo_driver_t* self );
17 void null_set_fullscreen( vo_driver_t* self, int screen ); 18 void null_set_fullscreen( vo_driver_t* self, int screen );
18 int null_is_scaling( vo_driver_t* self ); 19 int null_is_scaling( vo_driver_t* self );
19 void null_set_scaling( vo_driver_t* self, int scale ); 20 void null_set_scaling( vo_driver_t* self, int scale );
20 21
21} 22}
22 23
23using namespace XINE; 24using namespace XINE;
24 25
25Lib::Lib() { 26Lib::Lib(XineVideoWidget* /*widget*/) {
26 printf("Lib"); 27 printf("Lib");
27 QCString str( getenv("HOME") ); 28 QCString str( getenv("HOME") );
28 str += "/Settings/opiexine.cf"; 29 str += "/Settings/opiexine.cf";
29 // get the configuration 30 // get the configuration
30 m_config = xine_config_file_init( str.data() ); 31 m_config = xine_config_file_init( str.data() );
31 32
32 // allocate oss for sound 33 // allocate oss for sound
33 // and fb for framebuffer 34 // and fb for framebuffer
34 m_audioOutput= xine_load_audio_output_plugin( m_config, "oss") ; 35 m_audioOutput= xine_load_audio_output_plugin( m_config, "oss") ;
35 if (m_audioOutput == NULL ) 36 if (m_audioOutput == NULL )
36 printf("Failure\n"); 37 printf("Failure\n");
37 else 38 else
38 printf("Success\n"); 39 printf("Success\n");
39 40
40 41
41 // test code 42 // test code
42 m_videoOutput = xine_load_video_output_plugin(m_config, "fb", 43 m_videoOutput = xine_load_video_output_plugin(m_config, "fb",
43 VISUAL_TYPE_FB, 44 VISUAL_TYPE_FB,
44 0 ); 45 0 );
45 46
46 char** files = xine_list_video_output_plugins(3); 47 char** files = xine_list_video_output_plugins(3);
47 char* out; 48 char* out;
48 int i = 0; 49 int i = 0;
49 while ( ( out = files[i] ) != 0 ) { 50 while ( ( out = files[i] ) != 0 ) {
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h
index 00a1248..1d0d3af 100644
--- a/noncore/multimedia/opieplayer2/lib.h
+++ b/noncore/multimedia/opieplayer2/lib.h
@@ -1,49 +1,51 @@
1 1
2 2
3#ifndef ZECKEXINELIB_H 3#ifndef ZECKEXINELIB_H
4#define ZECKEXINELIB_H 4#define ZECKEXINELIB_H
5 5
6#include <qcstring.h> 6#include <qcstring.h>
7#include <qstring.h> 7#include <qstring.h>
8#include <qobject.h> 8#include <qobject.h>
9 9
10#include <xine.h> 10#include <xine.h>
11 11
12class XineVideoWidget;
13
12namespace XINE { 14namespace XINE {
13 15
14 /** 16 /**
15 * Lib wrapps the simple interface 17 * Lib wrapps the simple interface
16 * of libxine for easy every day use 18 * of libxine for easy every day use
17 * This will become a full C++ Wrapper 19 * This will become a full C++ Wrapper
18 * It supports playing, pausing, info, 20 * It supports playing, pausing, info,
19 * stooping, seeking. 21 * stooping, seeking.
20 */ 22 */
21 class Frame; 23 class Frame;
22 class Lib : public QObject { 24 class Lib : public QObject {
23 Q_OBJECT 25 Q_OBJECT
24 public: 26 public:
25 Lib(); 27 Lib(XineVideoWidget* = 0);
26 ~Lib(); 28 ~Lib();
27 QCString version(); 29 QCString version();
28 int majorVersion()/*const*/; 30 int majorVersion()/*const*/;
29 int minorVersion()/*const*/; 31 int minorVersion()/*const*/;
30 int subVersion()/*const*/; 32 int subVersion()/*const*/;
31 33
32 34
33 int play( const QString& fileName, 35 int play( const QString& fileName,
34 int startPos = 0, 36 int startPos = 0,
35 int start_time = 0 ); 37 int start_time = 0 );
36 void stop() /*const*/; 38 void stop() /*const*/;
37 void pause()/*const*/; 39 void pause()/*const*/;
38 40
39 int speed() /*const*/; 41 int speed() /*const*/;
40 void setSpeed( int speed = SPEED_PAUSE ); 42 void setSpeed( int speed = SPEED_PAUSE );
41 43
42 int status() /*const*/; 44 int status() /*const*/;
43 45
44 int currentPosition()/*const*/; 46 int currentPosition()/*const*/;
45 //in seconds 47 //in seconds
46 int currentTime()/*const*/; 48 int currentTime()/*const*/;
47 int length() /*const*/; 49 int length() /*const*/;
48 50
49 bool isSeekable()/*const*/; 51 bool isSeekable()/*const*/;