summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2006-07-20 17:52:52 +0000
committerdeva <deva>2006-07-20 17:52:52 +0000
commita09f1b932560f11caf34a567ee226446a496a584 (patch)
treeadc0a2fc4d8cb91f27077cf06ebfbe27108b0409
parent3d236d2e7a6501108a9083196500c009226142a1 (diff)
Utilized the global info object.
-rw-r--r--client/decoder.cc20
-rw-r--r--client/info_gui.cc10
-rw-r--r--client/info_gui.h4
-rw-r--r--client/miav_client.cc2
-rw-r--r--client/networksender.cc2
5 files changed, 10 insertions, 28 deletions
diff --git a/client/decoder.cc b/client/decoder.cc
index 5fdbd80..afc09c9 100644
--- a/client/decoder.cc
+++ b/client/decoder.cc
@@ -161,24 +161,6 @@ void Decoder::pframeRelease()
pmutex.unlock();
}
-/*
- R = Y + 1.4075 * (V - 128)
- G = Y - (0.3455 * (U - 128) - (0.7169 * (V - 128))
- B = Y + 1.7790 * (U - 128)
-*/
-//#define RED(y, u, v) (y + 1.4075 * (v - 128))
-//#define GREEN(y, u, v) (y - (0.3455 * (u - 128)) - (0.7169 * (v - 128)))
-//#define BLUE(y, u, v) (y + 1.7790 * (u - 128))
-
-/*
- R = 1.164(Y - 16) + 1.596(V - 128)
- G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128)
- B = 1.164(Y - 16) + 2.018(U - 128)
-*/
-//#define RED(y, u, v) (1.164 * (y - 16) + 1.596 * (v - 128))
-//#define GREEN(y, u, v) (1.164 * (y - 16) - 0.813 * (v - 128) - 0.391 * (u - 128))
-//#define BLUE(y, u, v) (1.164 * (y - 16) + 2.018 * (u - 128))
-
void Decoder::snapshot(unsigned char *rgb)
{
@@ -187,7 +169,7 @@ void Decoder::snapshot(unsigned char *rgb)
Frame frame(pframe, 720*576*2, VF_YUV422);
Frame *brg0 = transcode(&frame, VF_BRG0, (char*)rgb, 720*576*4);
- if(brg0) delete brg0; // We don't need the actual frameoject
+ if(brg0) delete brg0; // We don't need the actual frameobject
else {
// Some error occurred!
}
diff --git a/client/info_gui.cc b/client/info_gui.cc
index ac733ff..aec658d 100644
--- a/client/info_gui.cc
+++ b/client/info_gui.cc
@@ -3,7 +3,7 @@
* info_gui.cc
*
* Tue May 3 09:34:59 CEST 2005
- * Copyright 2005 Bent Bisballe
+ * Copyright 2005 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
@@ -28,9 +28,10 @@
#include <stdio.h>
#include <stdarg.h>
-
#include <time.h>
+#include "miav_config.h"
+
bool InfoEventHandler::eventFilter( QObject *o, QEvent *e )
{
if ( e->type() == TYPE_SHOW_MESSAGEBOX ) {
@@ -48,10 +49,9 @@ bool InfoEventHandler::eventFilter( QObject *o, QEvent *e )
}
}
-InfoGui::InfoGui(MiavConfig *c): Info()
+InfoGui::InfoGui(): Info()
{
- this->config = c;
- log_filename = *(this->config->readString("client_log_file"));
+ log_filename = *(MIaV::config->readString("client_log_file"));
InfoEventHandler *eventhandler = new InfoEventHandler();
qApp->installEventFilter( eventhandler );
diff --git a/client/info_gui.h b/client/info_gui.h
index ee8d045..fe24a93 100644
--- a/client/info_gui.h
+++ b/client/info_gui.h
@@ -33,7 +33,7 @@
#include "info.h"
-#include "miav_config.h"
+//#include "miav_config.h"
#include <QWidget>
#include <QApplication>
@@ -70,7 +70,7 @@ protected:
class InfoGui: public Info {
public:
- InfoGui(MiavConfig *config);
+ InfoGui();
~InfoGui();
void error(char* fmt, ...);
diff --git a/client/miav_client.cc b/client/miav_client.cc
index f004f83..a7f10b4 100644
--- a/client/miav_client.cc
+++ b/client/miav_client.cc
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
MiavConfig config(ETC"/miav.conf");
MIaV::initConfig(&config);
- InfoGui info(MIaV::config);
+ InfoGui info;
MIaV::initInfo(&info);
Decoder decoder;
diff --git a/client/networksender.cc b/client/networksender.cc
index f8912f1..b43dcc8 100644
--- a/client/networksender.cc
+++ b/client/networksender.cc
@@ -62,7 +62,7 @@ NetworkSender::~NetworkSender()
void NetworkSender::pushFrame(Frame* frame, bool freeze, bool snapshot)
{
- printf("F: %d S %d\n", freeze, snapshot);
+ if(freeze || snapshot) printf("Freeze: %d Snapshot %d\n", freeze, snapshot);
// Frame *frame = new Frame((unsigned char*)framedata);
frame->freeze = freeze;