summaryrefslogtreecommitdiff
authorzecke <zecke>2002-07-10 15:38:28 (UTC)
committer zecke <zecke>2002-07-10 15:38:28 (UTC)
commit0439137e4c18ad7d10002e2da6bea20b57ae1dec (patch) (unidiff)
treeefa27e6218d0f94c513a82521fdea591b4eff18a
parent5f0da29ff2f22c017d0aec7b6f1f493120b84f8c (diff)
downloadopie-0439137e4c18ad7d10002e2da6bea20b57ae1dec.zip
opie-0439137e4c18ad7d10002e2da6bea20b57ae1dec.tar.gz
opie-0439137e4c18ad7d10002e2da6bea20b57ae1dec.tar.bz2
Update the c'tor
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,73 +1,74 @@
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 ) {
50 printf("Audio %s\n", out ); 51 printf("Audio %s\n", out );
51 i++; 52 i++;
52 } 53 }
53// m_xine = xine_init( m_videoOutput, 54// m_xine = xine_init( m_videoOutput,
54// m_audioOutput, 55// m_audioOutput,
55// m_config ); 56// m_config );
56 // test loading 57 // test loading
57 m_videoOutput = ::init_video_out_plugin( m_config, NULL ); 58 m_videoOutput = ::init_video_out_plugin( m_config, NULL );
58 m_xine = xine_init( m_videoOutput, 59 m_xine = xine_init( m_videoOutput,
59 m_audioOutput, m_config ); 60 m_audioOutput, m_config );
60 // install the event handler 61 // install the event handler
61 xine_register_event_listener( m_xine, xine_event_handler, this ); 62 xine_register_event_listener( m_xine, xine_event_handler, this );
62} 63}
63 64
64Lib::~Lib() { 65Lib::~Lib() {
65 delete m_config; 66 delete m_config;
66 xine_remove_event_listener( m_xine, xine_event_handler ); 67 xine_remove_event_listener( m_xine, xine_event_handler );
67 xine_exit( m_xine ); 68 xine_exit( m_xine );
68 delete m_videoOutput; 69 delete m_videoOutput;
69 //delete m_audioOutput; 70 //delete m_audioOutput;
70 71
71} 72}
72 73
73QCString Lib::version() { 74QCString Lib::version() {
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,73 +1,75 @@
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*/;
50 52
51 /** 53 /**
52 * Whether or not to show video output 54 * Whether or not to show video output
53 */ 55 */
54 void setShowVideo(bool video); 56 void setShowVideo(bool video);
55 57
56 /** 58 /**
57 * is we show video 59 * is we show video
58 */ 60 */
59 bool isShowingVideo() /*const*/; 61 bool isShowingVideo() /*const*/;
60 62
61 /** 63 /**
62 * 64 *
63 */ 65 */
64 void showVideoFullScreen( bool fullScreen ); 66 void showVideoFullScreen( bool fullScreen );
65 67
66 /** 68 /**
67 * 69 *
68 */ 70 */
69 bool isVideoFullScreen()/*const*/ ; 71 bool isVideoFullScreen()/*const*/ ;
70 72
71 /** 73 /**
72 * 74 *
73 */ 75 */