summaryrefslogtreecommitdiff
path: root/client/player.cc
diff options
context:
space:
mode:
authordeva <deva>2006-04-08 11:10:09 +0000
committerdeva <deva>2006-04-08 11:10:09 +0000
commit9c078bc5e1468ed79d85fafbad41160c0170959e (patch)
treec23fe08951e1a4a6cda0f0d5d56fbc3b17185f03 /client/player.cc
parenta348f1d6d6c35800399b47a7d06562d52c38f72e (diff)
*** empty log message ***
Diffstat (limited to 'client/player.cc')
-rw-r--r--client/player.cc41
1 files changed, 40 insertions, 1 deletions
diff --git a/client/player.cc b/client/player.cc
index f44842c..fad7df4 100644
--- a/client/player.cc
+++ b/client/player.cc
@@ -26,6 +26,45 @@
*/
#include "player.h"
+static unsigned char yuv[720*576*4];
+static int num = 0;
+
+Player::Player(VideoWidget *w)
+{
+ widget = w;
+
+ render.init(widget, 720, 576);//widget->getWidth(), widget->getHeight()
+
+ connect(this, SIGNAL(timeout()), this, SLOT(show_frame()));
+
+ for(int x = 1; x < 720; x++)
+ for(int y = 1; y < 576; y++) {
+ yuv[x + y * 576 * 1] = x % 720 * 255;
+ yuv[x + y * 576 * 2] = y % 576 * 255;
+ yuv[x + y * 576 * 3] = (unsigned char)x % y;
+ }
+}
+
+Player::~Player()
+{
+ render.end();
+}
+
+void Player::show_frame()
+{
+ fprintf(stderr, "Frame!%d\n", num++);
+ render.width = widget->getWidth();
+ render.height = widget->getHeight();
+ render.display(yuv, 720, 576);//widget->width(), widget->height());
+}
+
+
+
+
+
+
+#if 0
+
#define DBG(x) fprintf(stderr, x)
#include "info.h"
@@ -284,7 +323,7 @@ void Player::run()
// From:
// http://cvs.sourceforge.net/viewcvs.py/libmpeg2/MSSG/display_x11.c?rev=1.2
-#if 0
+//#if 0
#ifdef HAVE_XV
xv_port = 0;
if (Success == XvQueryExtension(mydisplay,&ver,&rel,&req,&ev,&err)) {