-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,17 +1,49 @@ +/* + This file is part of the Opie Project + + Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> + Copyright (c) 2002 LJP <> + Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> + =. + .=l. + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ #include <stdio.h> #include <stdlib.h> -//#include <qpe/qpeapplication.h> #include <qimage.h> +#include <qtextstream.h> #include <qpe/resource.h> #include <qfile.h> #include <qgfx_qws.h> #include <qdirectpainter_qws.h> #include "xinevideowidget.h" #include "frame.h" #include "lib.h" typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, @@ -31,24 +63,34 @@ extern "C" { void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data); } using namespace XINE; Lib::Lib(XineVideoWidget* widget) { m_video = false; m_wid = widget; printf("Lib"); QCString str( getenv("HOME") ); str += "/Settings/opiexine.cf"; // get the configuration + + // not really OO, should be an extra class, later + if ( !QFile(str).exists() ) { + QFile f(str); + f.open(IO_WriteOnly); + QTextStream ts( &f ); + ts << "misc.memcpy_method:glibc"; + f.close(); + } + m_config = xine_config_file_init( str.data() ); // allocate oss for sound // and fb for framebuffer m_audioOutput= xine_load_audio_output_plugin( m_config, "oss") ; if (m_audioOutput == NULL ) printf("Failure\n"); else printf("Success\n"); // test code 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,13 +1,44 @@ - +/* + This file is part of the Opie Project + + Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> + Copyright (c) 2002 LJP <> + Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> + =. + .=l. + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ #ifndef ZECKEXINELIB_H #define ZECKEXINELIB_H #include <qcstring.h> #include <qstring.h> #include <qobject.h> #include <xine.h> class XineVideoWidget; |