summaryrefslogtreecommitdiff
authorzecke <zecke>2002-07-10 15:33:36 (UTC)
committer zecke <zecke>2002-07-10 15:33:36 (UTC)
commit5f0da29ff2f22c017d0aec7b6f1f493120b84f8c (patch) (side-by-side diff)
treefad58373c81c998bb70cdbc69bb75824e057d4aa
parente17d551a7c42a1d77805b4f1575928855e0e32ba (diff)
downloadopie-5f0da29ff2f22c017d0aec7b6f1f493120b84f8c.zip
opie-5f0da29ff2f22c017d0aec7b6f1f493120b84f8c.tar.gz
opie-5f0da29ff2f22c017d0aec7b6f1f493120b84f8c.tar.bz2
First VideoWidget
Diffstat (more/less context) (show 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
@@ -8,17 +8,17 @@
#include <qstring.h>
#include <qslider.h>
#include <qframe.h>
class QPixmap;
enum AudioButtons {
- AudioPlay,
+ AudioPlay=0,
AudioStop,
AudioPause,
AudioNext,
AudioPrevious,
AudioVolumeUp,
AudioVolumeDown,
AudioLoop,
AudioPlayList
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
@@ -19,17 +19,33 @@ struct null_driver_s {
};
typedef struct opie_frame_s opie_frame_t;
struct opie_frame_s {
vo_frame_t frame;
char* name;
int version;
int m_width;
int m_height;
+ int m_ratio_code;
+ int format;
+ int flags;
+ int user_ratio;
+
+ int ideal_width;
+ int ideal_height;
+ int output_width, output_height;
uint8_t *chunk[3];
+ uint8_t *rgb_dst;
+ int yuv_stride;
+ int stripe_height, stripe_inc;
+
+ int bytes_per_line;
+ uint8_t *data;
+
+
null_driver_t *output;
};
static uint32_t null_get_capabilities(vo_driver_t *self ){
null_driver_t* this = (null_driver_t*)self;
printf("capabilities\n");
return this->m_capabilities;
}
@@ -211,8 +227,14 @@ void null_set_fullscreen( vo_driver_t* self, int screen ){
}
int null_is_scaling( vo_driver_t* self ){
return ((null_driver_t*)self)->m_is_scaling;
}
void null_set_scaling( vo_driver_t* self, int scale ){
((null_driver_t*)self)->m_is_scaling = scale;
}
+void null_set_gui_width( vo_driver_t* self, int width ){
+
+}
+void null_set_gui_height( vo_driver_t* self, int height ){
+
+}
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 @@
TEMPLATE = app
CONFIG = qt warn_on release
#release
DESTDIR = $(OPIEDIR)/bin
HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h mediadetect.h\
videowidget.h audiowidget.h playlistwidget.h mediaplayer.h inputDialog.h \
- frame.h lib.h
+ frame.h lib.h xinevideowidget.h
SOURCES = main.cpp \
playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp mediadetect.cpp\
videowidget.cpp audiowidget.cpp playlistwidget.cpp mediaplayer.cpp inputDialog.cpp \
- frame.cpp lib.cpp nullvideo.c
-TARGET = opieplayer
+ frame.cpp lib.cpp nullvideo.c xinevideowidget.cpp
+TARGET = opieplayer2
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lpthread -lopie -lxine -lxineutils
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
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 @@
+
+/*
+                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 <qimage.h>
+#include <qgfx_qws.h>
+
+#include "xinevideowidget.h"
+
+XineVideoWidget::XineVideoWidget( int width,
+ int height,
+ QWidget* parent,
+ const char* name )
+ : QWidget( parent, name )
+{
+ m_image = new QImage( width, height, qt_screen->depth() );
+}
+XineVideoWidget::~XineVideoWidget() {
+ delete m_image;
+}
+void XineVideoWidget::paintEvent( QPaintEvent* e ) {
+ QWidget::paintEvent( e );
+}
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 @@
+/*
+                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 <qwidget.h>
+
+class QImage;
+class XineVideoWidget : public QWidget {
+ Q_OBJECT
+public:
+ XineVideoWidget( int width, int height, QWidget* parent, const char* name );
+ ~XineVideoWidget();
+ QImage *image() { return m_image; };
+protected:
+ void paintEvent( QPaintEvent* p );
+private:
+ QImage* m_image;
+
+};
+