author | zecke <zecke> | 2002-07-10 15:33:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-07-10 15:33:36 (UTC) |
commit | 5f0da29ff2f22c017d0aec7b6f1f493120b84f8c (patch) (unidiff) | |
tree | fad58373c81c998bb70cdbc69bb75824e057d4aa | |
parent | e17d551a7c42a1d77805b4f1575928855e0e32ba (diff) | |
download | opie-5f0da29ff2f22c017d0aec7b6f1f493120b84f8c.zip opie-5f0da29ff2f22c017d0aec7b6f1f493120b84f8c.tar.gz opie-5f0da29ff2f22c017d0aec7b6f1f493120b84f8c.tar.bz2 |
First VideoWidget
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 22 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/opieplayer2.pro | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.cpp | 53 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.h | 51 |
5 files changed, 130 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 441eb6e..ce8604a 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -1,80 +1,80 @@ | |||
1 | #ifndef AUDIO_WIDGET_H | 1 | #ifndef AUDIO_WIDGET_H |
2 | #define AUDIO_WIDGET_H | 2 | #define AUDIO_WIDGET_H |
3 | 3 | ||
4 | #include <qwidget.h> | 4 | #include <qwidget.h> |
5 | #include <qpainter.h> | 5 | #include <qpainter.h> |
6 | #include <qdrawutil.h> | 6 | #include <qdrawutil.h> |
7 | #include <qpixmap.h> | 7 | #include <qpixmap.h> |
8 | #include <qstring.h> | 8 | #include <qstring.h> |
9 | #include <qslider.h> | 9 | #include <qslider.h> |
10 | #include <qframe.h> | 10 | #include <qframe.h> |
11 | 11 | ||
12 | 12 | ||
13 | class QPixmap; | 13 | class QPixmap; |
14 | 14 | ||
15 | enum AudioButtons { | 15 | enum AudioButtons { |
16 | AudioPlay, | 16 | AudioPlay=0, |
17 | AudioStop, | 17 | AudioStop, |
18 | AudioPause, | 18 | AudioPause, |
19 | AudioNext, | 19 | AudioNext, |
20 | AudioPrevious, | 20 | AudioPrevious, |
21 | AudioVolumeUp, | 21 | AudioVolumeUp, |
22 | AudioVolumeDown, | 22 | AudioVolumeDown, |
23 | AudioLoop, | 23 | AudioLoop, |
24 | AudioPlayList | 24 | AudioPlayList |
25 | }; | 25 | }; |
26 | 26 | ||
27 | 27 | ||
28 | #define USE_DBLBUF | 28 | #define USE_DBLBUF |
29 | 29 | ||
30 | 30 | ||
31 | class Ticker : public QFrame { | 31 | class Ticker : public QFrame { |
32 | Q_OBJECT | 32 | Q_OBJECT |
33 | 33 | ||
34 | public: | 34 | public: |
35 | Ticker( QWidget* parent=0 ); | 35 | Ticker( QWidget* parent=0 ); |
36 | ~Ticker(); | 36 | ~Ticker(); |
37 | void setText( const QString& text ) ; | 37 | void setText( const QString& text ) ; |
38 | 38 | ||
39 | protected: | 39 | protected: |
40 | void timerEvent( QTimerEvent * ); | 40 | void timerEvent( QTimerEvent * ); |
41 | void drawContents( QPainter *p ); | 41 | void drawContents( QPainter *p ); |
42 | private: | 42 | private: |
43 | QString scrollText; | 43 | QString scrollText; |
44 | int pos, pixelLen; | 44 | int pos, pixelLen; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | 47 | ||
48 | class AudioWidget : public QWidget { | 48 | class AudioWidget : public QWidget { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | public: | 50 | public: |
51 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 51 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
52 | ~AudioWidget(); | 52 | ~AudioWidget(); |
53 | void setTickerText( const QString &text ) { songInfo->setText( text ); } | 53 | void setTickerText( const QString &text ) { songInfo->setText( text ); } |
54 | bool isStreaming; | 54 | bool isStreaming; |
55 | public slots: | 55 | public slots: |
56 | void updateSlider( long, long ); | 56 | void updateSlider( long, long ); |
57 | void sliderPressed( ); | 57 | void sliderPressed( ); |
58 | void sliderReleased( ); | 58 | void sliderReleased( ); |
59 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } | 59 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } |
60 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 60 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |
61 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 61 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } |
62 | void setPosition( long ); | 62 | void setPosition( long ); |
63 | void setLength( long ); | 63 | void setLength( long ); |
64 | void setView( char ); | 64 | void setView( char ); |
65 | 65 | ||
66 | signals: | 66 | signals: |
67 | void moreClicked(); | 67 | void moreClicked(); |
68 | void lessClicked(); | 68 | void lessClicked(); |
69 | void moreReleased(); | 69 | void moreReleased(); |
70 | void lessReleased(); | 70 | void lessReleased(); |
71 | void sliderMoved(long); | 71 | void sliderMoved(long); |
72 | 72 | ||
73 | protected: | 73 | protected: |
74 | void doBlank(); | 74 | void doBlank(); |
75 | void doUnblank(); | 75 | void doUnblank(); |
76 | void paintEvent( QPaintEvent *pe ); | 76 | void paintEvent( QPaintEvent *pe ); |
77 | void showEvent( QShowEvent *se ); | 77 | void showEvent( QShowEvent *se ); |
78 | void mouseMoveEvent( QMouseEvent *event ); | 78 | void mouseMoveEvent( QMouseEvent *event ); |
79 | void mousePressEvent( QMouseEvent *event ); | 79 | void mousePressEvent( QMouseEvent *event ); |
80 | void mouseReleaseEvent( QMouseEvent *event ); | 80 | void mouseReleaseEvent( QMouseEvent *event ); |
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c index b8b8eb3..8badb7b 100644 --- a/noncore/multimedia/opieplayer2/nullvideo.c +++ b/noncore/multimedia/opieplayer2/nullvideo.c | |||
@@ -1,91 +1,107 @@ | |||
1 | 1 | ||
2 | /*#include <xine.h>*/ | 2 | /*#include <xine.h>*/ |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | 5 | ||
6 | #include <xine/video_out.h> | 6 | #include <xine/video_out.h> |
7 | #include <xine/xine_internal.h> | 7 | #include <xine/xine_internal.h> |
8 | #include <xine/xineutils.h> | 8 | #include <xine/xineutils.h> |
9 | #include <xine/configfile.h> | 9 | #include <xine/configfile.h> |
10 | 10 | ||
11 | typedef struct null_driver_s null_driver_t; | 11 | typedef struct null_driver_s null_driver_t; |
12 | 12 | ||
13 | struct null_driver_s { | 13 | struct null_driver_s { |
14 | vo_driver_t vo_driver; | 14 | vo_driver_t vo_driver; |
15 | uint32_t m_capabilities; | 15 | uint32_t m_capabilities; |
16 | int m_show_video; | 16 | int m_show_video; |
17 | int m_video_fullscreen; | 17 | int m_video_fullscreen; |
18 | int m_is_scaling; | 18 | int m_is_scaling; |
19 | }; | 19 | }; |
20 | typedef struct opie_frame_s opie_frame_t; | 20 | typedef struct opie_frame_s opie_frame_t; |
21 | struct opie_frame_s { | 21 | struct opie_frame_s { |
22 | vo_frame_t frame; | 22 | vo_frame_t frame; |
23 | char* name; | 23 | char* name; |
24 | int version; | 24 | int version; |
25 | int m_width; | 25 | int m_width; |
26 | int m_height; | 26 | int m_height; |
27 | int m_ratio_code; | ||
28 | int format; | ||
29 | int flags; | ||
30 | int user_ratio; | ||
31 | |||
32 | int ideal_width; | ||
33 | int ideal_height; | ||
34 | int output_width, output_height; | ||
27 | uint8_t *chunk[3]; | 35 | uint8_t *chunk[3]; |
36 | uint8_t *rgb_dst; | ||
37 | int yuv_stride; | ||
38 | int stripe_height, stripe_inc; | ||
39 | |||
40 | int bytes_per_line; | ||
41 | uint8_t *data; | ||
42 | |||
43 | |||
28 | null_driver_t *output; | 44 | null_driver_t *output; |
29 | }; | 45 | }; |
30 | 46 | ||
31 | static uint32_t null_get_capabilities(vo_driver_t *self ){ | 47 | static uint32_t null_get_capabilities(vo_driver_t *self ){ |
32 | null_driver_t* this = (null_driver_t*)self; | 48 | null_driver_t* this = (null_driver_t*)self; |
33 | printf("capabilities\n"); | 49 | printf("capabilities\n"); |
34 | return this->m_capabilities; | 50 | return this->m_capabilities; |
35 | } | 51 | } |
36 | 52 | ||
37 | /* take care of the frame*/ | 53 | /* take care of the frame*/ |
38 | static void null_frame_dispose( vo_frame_t* vo_img){ | 54 | static void null_frame_dispose( vo_frame_t* vo_img){ |
39 | opie_frame_t* frame = (opie_frame_t*)vo_img; | 55 | opie_frame_t* frame = (opie_frame_t*)vo_img; |
40 | printf("frame_dispose\n"); | 56 | printf("frame_dispose\n"); |
41 | free (frame); | 57 | free (frame); |
42 | } | 58 | } |
43 | static void null_frame_field( vo_frame_t* frame, int inti ){ | 59 | static void null_frame_field( vo_frame_t* frame, int inti ){ |
44 | printf("frame_field\n"); | 60 | printf("frame_field\n"); |
45 | /* not needed */ | 61 | /* not needed */ |
46 | } | 62 | } |
47 | 63 | ||
48 | /* end take care of frames*/ | 64 | /* end take care of frames*/ |
49 | 65 | ||
50 | static vo_frame_t* null_alloc_frame( vo_driver_t* self ){ | 66 | static vo_frame_t* null_alloc_frame( vo_driver_t* self ){ |
51 | null_driver_t* this = (null_driver_t*)self; | 67 | null_driver_t* this = (null_driver_t*)self; |
52 | opie_frame_t* frame = (opie_frame_t*)malloc ( sizeof(opie_frame_t) ); | 68 | opie_frame_t* frame = (opie_frame_t*)malloc ( sizeof(opie_frame_t) ); |
53 | memset( frame, 0, sizeof( opie_frame_t) ); | 69 | memset( frame, 0, sizeof( opie_frame_t) ); |
54 | printf("alloc_frame\n"); | 70 | printf("alloc_frame\n"); |
55 | frame->name = "opie\0"; | 71 | frame->name = "opie\0"; |
56 | frame->version = 1; | 72 | frame->version = 1; |
57 | frame->output = this; | 73 | frame->output = this; |
58 | 74 | ||
59 | /* initialize the frame*/ | 75 | /* initialize the frame*/ |
60 | frame->frame.driver = self; | 76 | frame->frame.driver = self; |
61 | /*frame.frame.free = null_frame_free;*/ | 77 | /*frame.frame.free = null_frame_free;*/ |
62 | frame->frame.copy = NULL; | 78 | frame->frame.copy = NULL; |
63 | frame->frame.field = null_frame_field; | 79 | frame->frame.field = null_frame_field; |
64 | frame->frame.dispose = null_frame_dispose; | 80 | frame->frame.dispose = null_frame_dispose; |
65 | 81 | ||
66 | 82 | ||
67 | return (vo_frame_t*) frame; | 83 | return (vo_frame_t*) frame; |
68 | } | 84 | } |
69 | static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img, | 85 | static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img, |
70 | uint32_t width, uint32_t height, | 86 | uint32_t width, uint32_t height, |
71 | int ratio_code, int format, int flags ){ | 87 | int ratio_code, int format, int flags ){ |
72 | null_driver_t* this = (null_driver_t*) self; | 88 | null_driver_t* this = (null_driver_t*) self; |
73 | opie_frame_t* frame = (opie_frame_t*)img; | 89 | opie_frame_t* frame = (opie_frame_t*)img; |
74 | /* not needed now */ | 90 | /* not needed now */ |
75 | printf("update_frame_format\n"); | 91 | printf("update_frame_format\n"); |
76 | printf("al crash aye?\n"); | 92 | printf("al crash aye?\n"); |
77 | 93 | ||
78 | if(frame->chunk[0] ){ | 94 | if(frame->chunk[0] ){ |
79 | free( frame->chunk[0] ); | 95 | free( frame->chunk[0] ); |
80 | frame->chunk[0] = NULL; | 96 | frame->chunk[0] = NULL; |
81 | } | 97 | } |
82 | if(frame->chunk[1] ){ | 98 | if(frame->chunk[1] ){ |
83 | free ( frame->chunk[1] ); | 99 | free ( frame->chunk[1] ); |
84 | frame->chunk[1] = NULL; | 100 | frame->chunk[1] = NULL; |
85 | } | 101 | } |
86 | if(frame->chunk[2] ){ | 102 | if(frame->chunk[2] ){ |
87 | free ( frame->chunk[2] ); | 103 | free ( frame->chunk[2] ); |
88 | frame->chunk[2] = NULL; | 104 | frame->chunk[2] = NULL; |
89 | } | 105 | } |
90 | 106 | ||
91 | 107 | ||
@@ -155,64 +171,70 @@ vo_driver_t* init_video_out_plugin( config_values_t* conf, | |||
155 | /* memset? */ | 171 | /* memset? */ |
156 | 172 | ||
157 | /* install callback handlers*/ | 173 | /* install callback handlers*/ |
158 | vo->vo_driver.get_capabilities = null_get_capabilities; | 174 | vo->vo_driver.get_capabilities = null_get_capabilities; |
159 | vo->vo_driver.alloc_frame = null_alloc_frame; | 175 | vo->vo_driver.alloc_frame = null_alloc_frame; |
160 | vo->vo_driver.update_frame_format = null_update_frame_format; | 176 | vo->vo_driver.update_frame_format = null_update_frame_format; |
161 | vo->vo_driver.display_frame = null_display_frame; | 177 | vo->vo_driver.display_frame = null_display_frame; |
162 | vo->vo_driver.overlay_blend = null_overlay_blend; | 178 | vo->vo_driver.overlay_blend = null_overlay_blend; |
163 | vo->vo_driver.get_property = null_get_property; | 179 | vo->vo_driver.get_property = null_get_property; |
164 | vo->vo_driver.set_property = null_set_property; | 180 | vo->vo_driver.set_property = null_set_property; |
165 | vo->vo_driver.get_property_min_max = null_get_property_min_max; | 181 | vo->vo_driver.get_property_min_max = null_get_property_min_max; |
166 | vo->vo_driver.gui_data_exchange = null_gui_data_exchange; | 182 | vo->vo_driver.gui_data_exchange = null_gui_data_exchange; |
167 | vo->vo_driver.exit = null_exit; | 183 | vo->vo_driver.exit = null_exit; |
168 | vo->vo_driver.redraw_needed = null_redraw_needed; | 184 | vo->vo_driver.redraw_needed = null_redraw_needed; |
169 | 185 | ||
170 | 186 | ||
171 | /* capabilities */ | 187 | /* capabilities */ |
172 | vo->m_capabilities = /*VO_CAP_COPIES_IMAGE |*/ VO_CAP_YV12 | VO_CAP_BRIGHTNESS; | 188 | vo->m_capabilities = /*VO_CAP_COPIES_IMAGE |*/ VO_CAP_YV12 | VO_CAP_BRIGHTNESS; |
173 | printf("done initialisation\n"); | 189 | printf("done initialisation\n"); |
174 | return (vo_driver_t*) vo; | 190 | return (vo_driver_t*) vo; |
175 | } | 191 | } |
176 | 192 | ||
177 | static vo_info_t vo_info_null = { | 193 | static vo_info_t vo_info_null = { |
178 | 5, | 194 | 5, |
179 | "null plugin", | 195 | "null plugin", |
180 | NULL, | 196 | NULL, |
181 | VISUAL_TYPE_FB, | 197 | VISUAL_TYPE_FB, |
182 | 5 | 198 | 5 |
183 | }; | 199 | }; |
184 | 200 | ||
185 | vo_info_t *get_video_out_plugin_info(){ | 201 | vo_info_t *get_video_out_plugin_info(){ |
186 | vo_info_null.description = _("xine video output plugin using null device"); | 202 | vo_info_null.description = _("xine video output plugin using null device"); |
187 | return &vo_info_null; | 203 | return &vo_info_null; |
188 | } | 204 | } |
189 | 205 | ||
190 | /* this is special for this device */ | 206 | /* this is special for this device */ |
191 | /** | 207 | /** |
192 | * We know that we will be controled by the XINE LIB++ | 208 | * We know that we will be controled by the XINE LIB++ |
193 | */ | 209 | */ |
194 | 210 | ||
195 | /** | 211 | /** |
196 | * | 212 | * |
197 | */ | 213 | */ |
198 | int null_is_showing_video( vo_driver_t* self ){ | 214 | int null_is_showing_video( vo_driver_t* self ){ |
199 | null_driver_t* this = (null_driver_t*)self; | 215 | null_driver_t* this = (null_driver_t*)self; |
200 | return this->m_show_video; | 216 | return this->m_show_video; |
201 | } | 217 | } |
202 | void null_set_show_video( vo_driver_t* self, int show ) { | 218 | void null_set_show_video( vo_driver_t* self, int show ) { |
203 | ((null_driver_t*)self)->m_show_video = show; | 219 | ((null_driver_t*)self)->m_show_video = show; |
204 | } | 220 | } |
205 | 221 | ||
206 | int null_is_fullscreen( vo_driver_t* self ){ | 222 | int null_is_fullscreen( vo_driver_t* self ){ |
207 | return ((null_driver_t*)self)->m_video_fullscreen; | 223 | return ((null_driver_t*)self)->m_video_fullscreen; |
208 | } | 224 | } |
209 | void null_set_fullscreen( vo_driver_t* self, int screen ){ | 225 | void null_set_fullscreen( vo_driver_t* self, int screen ){ |
210 | ((null_driver_t*)self)->m_video_fullscreen = screen; | 226 | ((null_driver_t*)self)->m_video_fullscreen = screen; |
211 | } | 227 | } |
212 | int null_is_scaling( vo_driver_t* self ){ | 228 | int null_is_scaling( vo_driver_t* self ){ |
213 | return ((null_driver_t*)self)->m_is_scaling; | 229 | return ((null_driver_t*)self)->m_is_scaling; |
214 | } | 230 | } |
215 | void null_set_scaling( vo_driver_t* self, int scale ){ | 231 | void null_set_scaling( vo_driver_t* self, int scale ){ |
216 | ((null_driver_t*)self)->m_is_scaling = scale; | 232 | ((null_driver_t*)self)->m_is_scaling = scale; |
217 | } | 233 | } |
218 | 234 | ||
235 | void null_set_gui_width( vo_driver_t* self, int width ){ | ||
236 | |||
237 | } | ||
238 | void null_set_gui_height( vo_driver_t* self, int height ){ | ||
239 | |||
240 | } | ||
diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro index 37208ef..a2cb987 100644 --- a/noncore/multimedia/opieplayer2/opieplayer2.pro +++ b/noncore/multimedia/opieplayer2/opieplayer2.pro | |||
@@ -1,19 +1,19 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | #release | 3 | #release |
4 | DESTDIR = $(OPIEDIR)/bin | 4 | DESTDIR = $(OPIEDIR)/bin |
5 | HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h mediadetect.h\ | 5 | HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h mediadetect.h\ |
6 | videowidget.h audiowidget.h playlistwidget.h mediaplayer.h inputDialog.h \ | 6 | videowidget.h audiowidget.h playlistwidget.h mediaplayer.h inputDialog.h \ |
7 | frame.h lib.h | 7 | frame.h lib.h xinevideowidget.h |
8 | SOURCES = main.cpp \ | 8 | SOURCES = main.cpp \ |
9 | playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp mediadetect.cpp\ | 9 | playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp mediadetect.cpp\ |
10 | videowidget.cpp audiowidget.cpp playlistwidget.cpp mediaplayer.cpp inputDialog.cpp \ | 10 | videowidget.cpp audiowidget.cpp playlistwidget.cpp mediaplayer.cpp inputDialog.cpp \ |
11 | frame.cpp lib.cpp nullvideo.c | 11 | frame.cpp lib.cpp nullvideo.c xinevideowidget.cpp |
12 | TARGET = opieplayer | 12 | TARGET = opieplayer2 |
13 | INCLUDEPATH += $(OPIEDIR)/include | 13 | INCLUDEPATH += $(OPIEDIR)/include |
14 | DEPENDPATH += $(OPIEDIR)/include | 14 | DEPENDPATH += $(OPIEDIR)/include |
15 | LIBS += -lqpe -lpthread -lopie -lxine -lxineutils | 15 | LIBS += -lqpe -lpthread -lopie -lxine -lxineutils |
16 | 16 | ||
17 | INCLUDEPATH += $(OPIEDIR)/include | 17 | INCLUDEPATH += $(OPIEDIR)/include |
18 | DEPENDPATH += $(OPIEDIR)/include | 18 | DEPENDPATH += $(OPIEDIR)/include |
19 | 19 | ||
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp new file mode 100644 index 0000000..47f4805 --- a/dev/null +++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp | |||
@@ -0,0 +1,53 @@ | |||
1 | |||
2 | /* | ||
3 | This file is part of the Opie Project | ||
4 | |||
5 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> | ||
6 | Copyright (c) 2002 LJP <> | ||
7 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | ||
8 | =. | ||
9 | .=l. | ||
10 | .>+-= | ||
11 | _;:, .> :=|. This program is free software; you can | ||
12 | .> <`_, > . <= redistribute it and/or modify it under | ||
13 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
14 | .="- .-=="i, .._ License as published by the Free Software | ||
15 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
16 | ._= =} : or (at your option) any later version. | ||
17 | .%`+i> _;_. | ||
18 | .i_,=:_. -<s. This program is distributed in the hope that | ||
19 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
20 | : .. .:, . . . without even the implied warranty of | ||
21 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
22 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
23 | ..}^=.= = ; Library General Public License for more | ||
24 | ++= -. .` .: details. | ||
25 | : = ...= . :.=- | ||
26 | -. .:....=;==+<; You should have received a copy of the GNU | ||
27 | -_. . . )=. = Library General Public License along with | ||
28 | -- :-=` this library; see the file COPYING.LIB. | ||
29 | If not, write to the Free Software Foundation, | ||
30 | Inc., 59 Temple Place - Suite 330, | ||
31 | Boston, MA 02111-1307, USA. | ||
32 | |||
33 | */ | ||
34 | |||
35 | #include <qimage.h> | ||
36 | #include <qgfx_qws.h> | ||
37 | |||
38 | #include "xinevideowidget.h" | ||
39 | |||
40 | XineVideoWidget::XineVideoWidget( int width, | ||
41 | int height, | ||
42 | QWidget* parent, | ||
43 | const char* name ) | ||
44 | : QWidget( parent, name ) | ||
45 | { | ||
46 | m_image = new QImage( width, height, qt_screen->depth() ); | ||
47 | } | ||
48 | XineVideoWidget::~XineVideoWidget() { | ||
49 | delete m_image; | ||
50 | } | ||
51 | void XineVideoWidget::paintEvent( QPaintEvent* e ) { | ||
52 | QWidget::paintEvent( e ); | ||
53 | } | ||
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.h b/noncore/multimedia/opieplayer2/xinevideowidget.h new file mode 100644 index 0000000..46bb98b --- a/dev/null +++ b/noncore/multimedia/opieplayer2/xinevideowidget.h | |||
@@ -0,0 +1,51 @@ | |||
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 | */ | ||
33 | |||
34 | |||
35 | |||
36 | #include <qwidget.h> | ||
37 | |||
38 | class QImage; | ||
39 | class XineVideoWidget : public QWidget { | ||
40 | Q_OBJECT | ||
41 | public: | ||
42 | XineVideoWidget( int width, int height, QWidget* parent, const char* name ); | ||
43 | ~XineVideoWidget(); | ||
44 | QImage *image() { return m_image; }; | ||
45 | protected: | ||
46 | void paintEvent( QPaintEvent* p ); | ||
47 | private: | ||
48 | QImage* m_image; | ||
49 | |||
50 | }; | ||
51 | |||