summaryrefslogtreecommitdiff
path: root/client/networksender.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/networksender.cc')
-rw-r--r--client/networksender.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/client/networksender.cc b/client/networksender.cc
index 11eb259..f8912f1 100644
--- a/client/networksender.cc
+++ b/client/networksender.cc
@@ -32,7 +32,7 @@
NetworkSender::NetworkSender(QString cpr)
{
- ip = "192.168.0.10";
+ ip = "127.0.0.1";
port = 6666;
// Connect
@@ -60,11 +60,11 @@ NetworkSender::~NetworkSender()
fprintf(stderr, "Disconnect [%p]\n", this);
}
-void NetworkSender::pushFrame(char* framedata, bool freeze, bool snapshot)
+void NetworkSender::pushFrame(Frame* frame, bool freeze, bool snapshot)
{
printf("F: %d S %d\n", freeze, snapshot);
- Frame *frame = new Frame((unsigned char*)framedata);
+ // Frame *frame = new Frame((unsigned char*)framedata);
frame->freeze = freeze;
frame->shoot = snapshot;
@@ -104,6 +104,8 @@ void NetworkSender::run()
sleep_1_frame();
sleep_1_frame();
sleep_1_frame();
+ if(frame->vframe) delete frame->vframe;
+ if(frame->aframe) delete frame->aframe;
delete frame;
// TODO: Read status from network