author | harlekin <harlekin> | 2002-08-07 21:09:42 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-07 21:09:42 (UTC) |
commit | 03876e28ae6ae7819cf17c33a81ec69c4d93cdfd (patch) (unidiff) | |
tree | 92ff6de6537dd8ca68afa73556d935d239a630b9 | |
parent | c80f0885bf402b6dd4ea637ad1b7d8b3ebd69300 (diff) | |
download | opie-03876e28ae6ae7819cf17c33a81ec69c4d93cdfd.zip opie-03876e28ae6ae7819cf17c33a81ec69c4d93cdfd.tar.gz opie-03876e28ae6ae7819cf17c33a81ec69c4d93cdfd.tar.bz2 |
set opiexine.cf if not present
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 44 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 33 |
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,13 +1,45 @@ | |||
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" |
@@ -35,16 +67,26 @@ using namespace XINE; | |||
35 | 67 | ||
36 | Lib::Lib(XineVideoWidget* widget) { | 68 | Lib::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 |
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,9 +1,40 @@ | |||
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 | ||