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 /noncore | |
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 | |||
@@ -4,25 +4,25 @@ | |||
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 |
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 | |||
@@ -15,25 +15,41 @@ struct null_driver_s { | |||
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; |
@@ -207,12 +223,18 @@ 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 | |||