summaryrefslogtreecommitdiff
path: root/noncore/multimedia
authorzecke <zecke>2005-04-09 22:13:02 (UTC)
committer zecke <zecke>2005-04-09 22:13:02 (UTC)
commit8729cfb1a96057fb2d46188aa091c4086ae6ae61 (patch) (unidiff)
tree635612f3638234f8e85fb133ff9209f67894620f /noncore/multimedia
parent274690da3f91a808b77a7b9bf98b6bc09a302fc9 (diff)
downloadopie-8729cfb1a96057fb2d46188aa091c4086ae6ae61.zip
opie-8729cfb1a96057fb2d46188aa091c4086ae6ae61.tar.gz
opie-8729cfb1a96057fb2d46188aa091c4086ae6ae61.tar.bz2
Cosmetic OpiePlayer2 changes:
-Remove class Frame and zeckeplayer.pro -Update to compile without frame.h
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/frame.cpp51
-rw-r--r--noncore/multimedia/opieplayer2/frame.h45
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/lib.h10
-rw-r--r--noncore/multimedia/opieplayer2/opieplayer2.pro4
-rw-r--r--noncore/multimedia/opieplayer2/zeckeplayer.pro13
6 files changed, 4 insertions, 127 deletions
diff --git a/noncore/multimedia/opieplayer2/frame.cpp b/noncore/multimedia/opieplayer2/frame.cpp
deleted file mode 100644
index 3a3e418..0000000
--- a/noncore/multimedia/opieplayer2/frame.cpp
+++ b/dev/null
@@ -1,51 +0,0 @@
1
2#include "frame.h"
3
4using namespace XINE;
5
6Frame::Frame() {
7 m_height = 0;
8 m_width = 0;
9 m_ratioCode = 0;
10 m_format = 0;
11 m_u = 0;
12 m_y = 0;
13 m_v = 0;
14}
15Frame::Frame( int *width, int* height,
16 int *ratio_code, int *format,
17 uint8_t **y, uint8_t **u,
18 uint8_t **v ) {
19 m_width = width;
20 m_height = height;
21 m_ratioCode = ratio_code ;
22 m_format = format;
23 m_y = y;
24 m_u = u;
25 m_v = v;
26}
27Frame::~Frame() {
28
29
30}
31void Frame::setHeight( int* height ) {
32 m_height = height;
33}
34void Frame::setWidth( int* width ) {
35 m_width = width;
36}
37void Frame::setRatioCode( int* ratio ) {
38 m_ratioCode = ratio;
39}
40void Frame::setFormat( int* format ) {
41 m_format = format;
42}
43void Frame::setU( uint8_t** u ) {
44 m_u = u;
45}
46void Frame::setY( uint8_t** y ) {
47 m_y = y;
48}
49void Frame::setV( uint8_t** v ) {
50 m_v = v;
51}
diff --git a/noncore/multimedia/opieplayer2/frame.h b/noncore/multimedia/opieplayer2/frame.h
deleted file mode 100644
index 0ce7feb..0000000
--- a/noncore/multimedia/opieplayer2/frame.h
+++ b/dev/null
@@ -1,45 +0,0 @@
1
2#ifndef XINELIBFRAME_H
3#define XINELIBFRAME_H
4
5#include <xine.h>
6
7namespace XINE {
8 class Frame {
9 public:
10 Frame();
11 Frame( int *width, int* height,
12 int *ratio_code, int *format,
13 uint8_t **y, uint8_t **u,
14 uint8_t **v );
15 ~Frame();
16 int* width() { return m_width; };
17 int* height() { return m_height; };
18
19 int* ratioCode() { return m_ratioCode; };
20 int* format() { return m_format; };
21 uint8_t ** y() { return m_y; };
22 uint8_t ** u() { return m_u; };
23 uint8_t ** v() { return m_v; };
24
25 void setHeight( int* );
26 void setWidth( int* );
27 void setRatioCode(int *);
28 void setFormat( int* );
29 void setU( uint8_t** );
30 void setY( uint8_t** );
31 void setV( uint8_t** );
32
33 private:
34 friend class Lib;
35 int* m_height;
36 int* m_width;
37 int* m_ratioCode;
38 int* m_format;
39 uint8_t** m_u;
40 uint8_t** m_y;
41 uint8_t** m_v;
42 };
43};
44
45#endif
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 9f0d448..e3289bc 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -11,49 +11,48 @@
11.> <`_,   >  .   <= redistribute it and/or modify it under 11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public 12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software 13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License, 14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#include "xinevideowidget.h" 34#include "xinevideowidget.h"
35#include "frame.h"
36#include "lib.h" 35#include "lib.h"
37 36
38/* OPIE */ 37/* OPIE */
39#include <opie2/odebug.h> 38#include <opie2/odebug.h>
40#include <qpe/global.h> 39#include <qpe/global.h>
41 40
42/* QT */ 41/* QT */
43#include <qtextstream.h> 42#include <qtextstream.h>
44#include <qdir.h> 43#include <qdir.h>
45#include <qgfx_qws.h> 44#include <qgfx_qws.h>
46 45
47/* STD */ 46/* STD */
48#include <assert.h> 47#include <assert.h>
49#include <unistd.h> 48#include <unistd.h>
50 49
51typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, 50typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame,
52 int width, int height,int bytes ); 51 int width, int height,int bytes );
53 52
54extern "C" { 53extern "C" {
55 xine_vo_driver_t* init_video_out_plugin( xine_t *xine, void* video, display_xine_frame_t, void * ); 54 xine_vo_driver_t* init_video_out_plugin( xine_t *xine, void* video, display_xine_frame_t, void * );
56 int null_is_showing_video( const xine_vo_driver_t* self ); 55 int null_is_showing_video( const xine_vo_driver_t* self );
57 void null_set_show_video( const xine_vo_driver_t* self, int show ); 56 void null_set_show_video( const xine_vo_driver_t* self, int show );
58 int null_is_fullscreen( const xine_vo_driver_t* self ); 57 int null_is_fullscreen( const xine_vo_driver_t* self );
59 void null_set_fullscreen( const xine_vo_driver_t* self, int screen ); 58 void null_set_fullscreen( const xine_vo_driver_t* self, int screen );
@@ -286,55 +285,48 @@ unseekable, but it should never occur!! Mr. Murphy ? :) ) */
286 285
287bool Lib::isSeekable() const { 286bool Lib::isSeekable() const {
288 assert( m_initialized ); 287 assert( m_initialized );
289 288
290 return xine_get_stream_info( m_stream, XINE_STREAM_INFO_SEEKABLE ); 289 return xine_get_stream_info( m_stream, XINE_STREAM_INFO_SEEKABLE );
291} 290}
292 291
293void Lib::seekTo( int time ) { 292void Lib::seekTo( int time ) {
294 assert( m_initialized ); 293 assert( m_initialized );
295 294
296 odebug << "Seeking to second " << time << oendl; 295 odebug << "Seeking to second " << time << oendl;
297 //Keep it paused if it was in that state 296 //Keep it paused if it was in that state
298 if ( xine_get_param( m_stream, XINE_PARAM_SPEED ) ) { 297 if ( xine_get_param( m_stream, XINE_PARAM_SPEED ) ) {
299 xine_play( m_stream, 0, time*1000 ); 298 xine_play( m_stream, 0, time*1000 );
300 } 299 }
301 300
302 else { 301 else {
303 xine_play( m_stream, 0, time*1000 ); 302 xine_play( m_stream, 0, time*1000 );
304 xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE ); 303 xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE );
305 } 304 }
306 305
307} 306}
308 307
309 308
310Frame Lib::currentFrame() const {
311 assert( m_initialized );
312
313 Frame frame;
314 return frame;
315};
316
317QString Lib::metaInfo( int number) const { 309QString Lib::metaInfo( int number) const {
318 assert( m_initialized ); 310 assert( m_initialized );
319 311
320 return xine_get_meta_info( m_stream, number ); 312 return xine_get_meta_info( m_stream, number );
321} 313}
322 314
323int Lib::error() const { 315int Lib::error() const {
324 assert( m_initialized ); 316 assert( m_initialized );
325 317
326 return xine_get_error( m_stream ); 318 return xine_get_error( m_stream );
327}; 319};
328 320
329void Lib::ensureInitialized() 321void Lib::ensureInitialized()
330{ 322{
331 if ( m_initialized ) 323 if ( m_initialized )
332 return; 324 return;
333 325
334 odebug << "waiting for initialization thread to finish" << oendl; 326 odebug << "waiting for initialization thread to finish" << oendl;
335 wait(); 327 wait();
336 odebug << "initialization thread finished!" << oendl; 328 odebug << "initialization thread finished!" << oendl;
337} 329}
338 330
339void Lib::setWidget( XineVideoWidget *widget ) 331void Lib::setWidget( XineVideoWidget *widget )
340{ 332{
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h
index dfddc2a..ab432a0 100644
--- a/noncore/multimedia/opieplayer2/lib.h
+++ b/noncore/multimedia/opieplayer2/lib.h
@@ -10,67 +10,66 @@
10 _;:,     .>    :=|. This program is free software; you can 10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under 11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public 12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software 13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License, 14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#ifndef ZECKEXINELIB_H 34#ifndef XINE_VIDEO_LIB_H
35#define ZECKEXINELIB_H 35#define XINE_VIDEO_LIB_H
36 36
37#include <xine.h> 37#include <xine.h>
38 38
39#include "threadutil.h" 39#include "threadutil.h"
40 40
41class XineVideoWidget; 41class XineVideoWidget;
42 42
43namespace XINE { 43namespace XINE {
44 44
45 /** 45 /**
46 * Lib wrapps the simple interface 46 * Lib wrapps the simple interface
47 * of libxine for easy every day use 47 * of libxine for easy every day use
48 * This will become a full C++ Wrapper 48 * This will become a full C++ Wrapper
49 * It supports playing, pausing, info, 49 * It supports playing, pausing, info,
50 * stooping, seeking. 50 * stooping, seeking.
51 */ 51 */
52 class Frame;
53 class Lib : public ThreadUtil::Channel, private ThreadUtil::Thread 52 class Lib : public ThreadUtil::Channel, private ThreadUtil::Thread
54 { 53 {
55 Q_OBJECT 54 Q_OBJECT
56 public: 55 public:
57 enum InitializationMode { InitializeImmediately, InitializeInThread }; 56 enum InitializationMode { InitializeImmediately, InitializeInThread };
58 57
59 Lib( InitializationMode initMode, XineVideoWidget* = 0); 58 Lib( InitializationMode initMode, XineVideoWidget* = 0);
60 59
61 ~Lib(); 60 ~Lib();
62 static int majorVersion(); 61 static int majorVersion();
63 static int minorVersion(); 62 static int minorVersion();
64 static int subVersion(); 63 static int subVersion();
65 64
66 65
67 void resize ( const QSize &s ); 66 void resize ( const QSize &s );
68 67
69 int play( const QString& fileName, 68 int play( const QString& fileName,
70 int startPos = 0, 69 int startPos = 0,
71 int start_time = 0 ); 70 int start_time = 0 );
72 void stop(); 71 void stop();
73 void pause( bool toggle ); 72 void pause( bool toggle );
74 73
75 int speed() const; 74 int speed() const;
76 75
@@ -138,53 +137,48 @@ namespace XINE {
138 137
139 /** 138 /**
140 * seek to a position 139 * seek to a position
141 */ 140 */
142 void seekTo( int time ); 141 void seekTo( int time );
143 142
144 /** 143 /**
145 * 144 *
146 * @return is media stream has video 145 * @return is media stream has video
147 */ 146 */
148 bool hasVideo() const; 147 bool hasVideo() const;
149 148
150 /** 149 /**
151 * 150 *
152 */ 151 */
153 void setScaling( bool ); 152 void setScaling( bool );
154 153
155 /** 154 /**
156 * Set the Gamma value for video output 155 * Set the Gamma value for video output
157 * @param int the value between -100 and 100, 0 is original 156 * @param int the value between -100 and 100, 0 is original
158 */ 157 */
159 void setGamma( int ); 158 void setGamma( int );
160 159
161 /** 160 /**
162 * test
163 */
164 Frame currentFrame() const;
165
166 /**
167 * Returns the error code 161 * Returns the error code
168 * XINE_ERROR_NONE 0 162 * XINE_ERROR_NONE 0
169 * XINE_ERROR_NO_INPUT_PLUGIN 1 163 * XINE_ERROR_NO_INPUT_PLUGIN 1
170 * XINE_ERROR_NO_DEMUXER_PLUGIN 2 164 * XINE_ERROR_NO_DEMUXER_PLUGIN 2
171 * XINE_ERROR_DEMUXER_FAILED 3 165 * XINE_ERROR_DEMUXER_FAILED 3
172 */ 166 */
173 int error() const; 167 int error() const;
174 168
175 void ensureInitialized(); 169 void ensureInitialized();
176 170
177 void setWidget( XineVideoWidget *widget ); 171 void setWidget( XineVideoWidget *widget );
178 172
179 signals: 173 signals:
180 174
181 void stopped(); 175 void stopped();
182 176
183 void initialized(); 177 void initialized();
184 178
185 protected: 179 protected:
186 virtual void receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ); 180 virtual void receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType );
187 181
188 virtual void run(); 182 virtual void run();
189 183
190 private: 184 private:
diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro
index cd103ee..af7fc5d 100644
--- a/noncore/multimedia/opieplayer2/opieplayer2.pro
+++ b/noncore/multimedia/opieplayer2/opieplayer2.pro
@@ -1,29 +1,29 @@
1CONFIG = qt warn_on quick-app 1CONFIG = qt warn_on quick-app
2HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h \ 2HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h \
3 videowidget.h audiowidget.h playlistwidget.h om3u.h mediaplayer.h inputDialog.h \ 3 videowidget.h audiowidget.h playlistwidget.h om3u.h mediaplayer.h inputDialog.h \
4 frame.h lib.h xinevideowidget.h volumecontrol.h playlistwidgetgui.h\ 4 lib.h xinevideowidget.h volumecontrol.h playlistwidgetgui.h\
5 alphablend.h yuv2rgb.h threadutil.h mediawidget.h playlistview.h playlistfileview.h \ 5 alphablend.h yuv2rgb.h threadutil.h mediawidget.h playlistview.h playlistfileview.h \
6 skin.h 6 skin.h
7SOURCES = main.cpp \ 7SOURCES = main.cpp \
8 playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp \ 8 playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp \
9 videowidget.cpp audiowidget.cpp playlistwidget.cpp om3u.cpp mediaplayer.cpp inputDialog.cpp \ 9 videowidget.cpp audiowidget.cpp playlistwidget.cpp om3u.cpp mediaplayer.cpp inputDialog.cpp \
10 frame.cpp lib.cpp nullvideo.c xinevideowidget.cpp volumecontrol.cpp \ 10 lib.cpp nullvideo.c xinevideowidget.cpp volumecontrol.cpp \
11 playlistwidgetgui.cpp\ 11 playlistwidgetgui.cpp\
12 alphablend.c yuv2rgb.c yuv2rgb_arm2.c yuv2rgb_arm4l.S \ 12 alphablend.c yuv2rgb.c yuv2rgb_arm2.c yuv2rgb_arm4l.S \
13 threadutil.cpp mediawidget.cpp playlistview.cpp playlistfileview.cpp \ 13 threadutil.cpp mediawidget.cpp playlistview.cpp playlistfileview.cpp \
14 skin.cpp 14 skin.cpp
15TARGET = opieplayer2 15TARGET = opieplayer2
16INCLUDEPATH += $(OPIEDIR)/include 16INCLUDEPATH += $(OPIEDIR)/include
17DEPENDPATH += $(OPIEDIR)/include 17DEPENDPATH += $(OPIEDIR)/include
18LIBS += -lqpe -lpthread -lopiecore2 -lopieui2 -lqtaux2 -lxine 18LIBS += -lqpe -lpthread -lopiecore2 -lopieui2 -lqtaux2 -lxine
19MOC_DIR = qpeobj 19MOC_DIR = qpeobj
20OBJECTS_DIR = qpeobj 20OBJECTS_DIR = qpeobj
21 21
22include( $(OPIEDIR)/include.pro ) 22include( $(OPIEDIR)/include.pro )
23 23
24!isEmpty( LIBXINE_INC_DIR ) { 24!isEmpty( LIBXINE_INC_DIR ) {
25 INCLUDEPATH = $$LIBXINE_INC_DIR $$INCLUDEPATH 25 INCLUDEPATH = $$LIBXINE_INC_DIR $$INCLUDEPATH
26} 26}
27!isEmpty( LIBXINE_LIB_DIR ) { 27!isEmpty( LIBXINE_LIB_DIR ) {
28 LIBS = -L$$LIBXINE_LIB_DIR $$LIBS 28 LIBS = -L$$LIBXINE_LIB_DIR $$LIBS
29} 29}
diff --git a/noncore/multimedia/opieplayer2/zeckeplayer.pro b/noncore/multimedia/opieplayer2/zeckeplayer.pro
deleted file mode 100644
index ba06081..0000000
--- a/noncore/multimedia/opieplayer2/zeckeplayer.pro
+++ b/dev/null
@@ -1,13 +0,0 @@
1 TEMPLATE= app
2DESTDIR = .
3 #CONFIG = qt warn_on
4 CONFIG = qt warn_on
5 HEADERS = frame.h lib.h
6 SOURCES = alphablend.c yuv2rgb.c nullvideo.o frame.cpp lib.cpp mainTest.cpp
7 INCLUDEPATH+= $(OPIEDIR)/include /opt/QtPalmtop/include
8 DEPENDPATH+= $(OPIEDIR)/include /opt/QtPalmtop/include
9LIBS += -L/opt/QtPalmtop/lib -lxine -lxineutils
10TARGET = zeckeplayer
11
12
13include( $(OPIEDIR)/include.pro )