summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c22
-rw-r--r--noncore/multimedia/opieplayer2/opieplayer2.pro6
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.cpp53
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.h51
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,40 +1,40 @@
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
13class QPixmap; 13class QPixmap;
14 14
15enum AudioButtons { 15enum 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
31class Ticker : public QFrame { 31class Ticker : public QFrame {
32 Q_OBJECT 32 Q_OBJECT
33 33
34public: 34public:
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
39protected: 39protected:
40 void timerEvent( QTimerEvent * ); 40 void timerEvent( QTimerEvent * );
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
@@ -3,49 +3,65 @@
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
11typedef struct null_driver_s null_driver_t; 11typedef struct null_driver_s null_driver_t;
12 12
13struct null_driver_s { 13struct 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};
20typedef struct opie_frame_s opie_frame_t; 20typedef struct opie_frame_s opie_frame_t;
21struct opie_frame_s { 21struct 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
31static uint32_t null_get_capabilities(vo_driver_t *self ){ 47static 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*/
38static void null_frame_dispose( vo_frame_t* vo_img){ 54static 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}
43static void null_frame_field( vo_frame_t* frame, int inti ){ 59static 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
50static vo_frame_t* null_alloc_frame( vo_driver_t* self ){ 66static 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;
@@ -195,24 +211,30 @@ vo_info_t *get_video_out_plugin_info(){
195/** 211/**
196 * 212 *
197 */ 213 */
198int null_is_showing_video( vo_driver_t* self ){ 214int 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}
202void null_set_show_video( vo_driver_t* self, int show ) { 218void 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
206int null_is_fullscreen( vo_driver_t* self ){ 222int 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}
209void null_set_fullscreen( vo_driver_t* self, int screen ){ 225void 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}
212int null_is_scaling( vo_driver_t* self ){ 228int 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}
215void null_set_scaling( vo_driver_t* self, int scale ){ 231void 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
235void null_set_gui_width( vo_driver_t* self, int width ){
236
237}
238void 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 @@
1TEMPLATE = app 1TEMPLATE = app
2CONFIG = qt warn_on release 2CONFIG = qt warn_on release
3#release 3#release
4DESTDIR = $(OPIEDIR)/bin 4DESTDIR = $(OPIEDIR)/bin
5HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h mediadetect.h\ 5HEADERS = 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
8SOURCES = main.cpp \ 8SOURCES = 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
12TARGET = opieplayer 12TARGET = opieplayer2
13INCLUDEPATH += $(OPIEDIR)/include 13INCLUDEPATH += $(OPIEDIR)/include
14DEPENDPATH += $(OPIEDIR)/include 14DEPENDPATH += $(OPIEDIR)/include
15LIBS += -lqpe -lpthread -lopie -lxine -lxineutils 15LIBS += -lqpe -lpthread -lopie -lxine -lxineutils
16 16
17INCLUDEPATH += $(OPIEDIR)/include 17INCLUDEPATH += $(OPIEDIR)/include
18DEPENDPATH += $(OPIEDIR)/include 18DEPENDPATH += $(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
40XineVideoWidget::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}
48XineVideoWidget::~XineVideoWidget() {
49 delete m_image;
50}
51void 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
38class QImage;
39class XineVideoWidget : public QWidget {
40 Q_OBJECT
41public:
42 XineVideoWidget( int width, int height, QWidget* parent, const char* name );
43 ~XineVideoWidget();
44 QImage *image() { return m_image; };
45protected:
46 void paintEvent( QPaintEvent* p );
47private:
48 QImage* m_image;
49
50};
51