summaryrefslogtreecommitdiff
path: root/noncore/multimedia
Unidiff
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp44
-rw-r--r--noncore/multimedia/opieplayer2/lib.h33
2 files changed, 75 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 00c534a..3b20873 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -1,21 +1,53 @@
1/*
2                This file is part of the Opie Project
3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 LJP <>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =.
8 .=l.
9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details.
24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA.
31
32*/
1 33
2#include <stdio.h> 34#include <stdio.h>
3#include <stdlib.h> 35#include <stdlib.h>
4//#include <qpe/qpeapplication.h>
5#include <qimage.h> 36#include <qimage.h>
37#include <qtextstream.h>
6#include <qpe/resource.h> 38#include <qpe/resource.h>
7 39
8#include <qfile.h> 40#include <qfile.h>
9 41
10#include <qgfx_qws.h> 42#include <qgfx_qws.h>
11#include <qdirectpainter_qws.h> 43#include <qdirectpainter_qws.h>
12 44
13#include "xinevideowidget.h" 45#include "xinevideowidget.h"
14#include "frame.h" 46#include "frame.h"
15#include "lib.h" 47#include "lib.h"
16 48
17typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, 49typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame,
18 int width, int height,int bytes ); 50 int width, int height,int bytes );
19 51
20extern "C" { 52extern "C" {
21 vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video); 53 vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video);
@@ -27,32 +59,42 @@ extern "C" {
27 void null_set_scaling( vo_driver_t* self, int scale ); 59 void null_set_scaling( vo_driver_t* self, int scale );
28 void null_set_gui_width( vo_driver_t* self, int width ); 60 void null_set_gui_width( vo_driver_t* self, int width );
29 void null_set_gui_height( vo_driver_t* self, int height ); 61 void null_set_gui_height( vo_driver_t* self, int height );
30 void null_set_mode( vo_driver_t* self, int depth, int rgb ); 62 void null_set_mode( vo_driver_t* self, int depth, int rgb );
31 void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data); 63 void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data);
32} 64}
33 65
34using namespace XINE; 66using namespace XINE;
35 67
36Lib::Lib(XineVideoWidget* widget) { 68Lib::Lib(XineVideoWidget* widget) {
37 m_video = false; 69 m_video = false;
38 m_wid = widget; 70 m_wid = widget;
39 printf("Lib"); 71 printf("Lib");
40 QCString str( getenv("HOME") ); 72 QCString str( getenv("HOME") );
41 str += "/Settings/opiexine.cf"; 73 str += "/Settings/opiexine.cf";
42 // get the configuration 74 // get the configuration
75
76 // not really OO, should be an extra class, later
77 if ( !QFile(str).exists() ) {
78 QFile f(str);
79 f.open(IO_WriteOnly);
80 QTextStream ts( &f );
81 ts << "misc.memcpy_method:glibc";
82 f.close();
83 }
84
43 m_config = xine_config_file_init( str.data() ); 85 m_config = xine_config_file_init( str.data() );
44 86
45 // allocate oss for sound 87 // allocate oss for sound
46 // and fb for framebuffer 88 // and fb for framebuffer
47 m_audioOutput= xine_load_audio_output_plugin( m_config, "oss") ; 89 m_audioOutput= xine_load_audio_output_plugin( m_config, "oss") ;
48 if (m_audioOutput == NULL ) 90 if (m_audioOutput == NULL )
49 printf("Failure\n"); 91 printf("Failure\n");
50 else 92 else
51 printf("Success\n"); 93 printf("Success\n");
52 94
53 95
54 // test code 96 // test code
55/* m_videoOutput = xine_load_video_output_plugin(m_config, "fb", 97/* m_videoOutput = xine_load_video_output_plugin(m_config, "fb",
56 VISUAL_TYPE_FB, 98 VISUAL_TYPE_FB,
57 0 ); 99 0 );
58*/ 100*/
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h
index a15f362..abd8c65 100644
--- a/noncore/multimedia/opieplayer2/lib.h
+++ b/noncore/multimedia/opieplayer2/lib.h
@@ -1,17 +1,48 @@
1 1/*
2                This file is part of the Opie Project
3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 LJP <>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =.
8 .=l.
9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details.
24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA.
31
32*/
2 33
3#ifndef ZECKEXINELIB_H 34#ifndef ZECKEXINELIB_H
4#define ZECKEXINELIB_H 35#define ZECKEXINELIB_H
5 36
6#include <qcstring.h> 37#include <qcstring.h>
7#include <qstring.h> 38#include <qstring.h>
8#include <qobject.h> 39#include <qobject.h>
9 40
10#include <xine.h> 41#include <xine.h>
11 42
12class XineVideoWidget; 43class XineVideoWidget;
13 44
14namespace XINE { 45namespace XINE {
15 46
16 /** 47 /**
17 * Lib wrapps the simple interface 48 * Lib wrapps the simple interface