summaryrefslogtreecommitdiff
path: root/src/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cc')
-rw-r--r--src/server.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/server.cc b/src/server.cc
index 44abe2d..b659fb5 100644
--- a/src/server.cc
+++ b/src/server.cc
@@ -32,7 +32,7 @@
#include "mov_encoder.h"
#include "img_encoder.h"
-void saveFrameAsImage(char* cpr, DVFrame *f)
+void saveFrameAsImage(char* cpr, Frame *f)
{
char fname[256];
ImgEncoder imgenc;
@@ -78,16 +78,17 @@ void newConnection(Socket *s)
{
n_savestate savestate = LATER;
n_header h;
- DVFrame *f;
- DVFrame *freeze_frame = NULL;
+ Frame *f;
+ Frame *freeze_frame = NULL;
MovEncoder *enc = NULL;
- f = new DVFrame();
+ // FIXME: Allocate buffer
+ f = new Frame(NULL, 0);
printf("New connection[pid: %d]...\n", getpid());
Network n = Network(s);
- while(int ret = n.recvPackage(&h, (void*)f->frame, DVPACKAGE_SIZE)) {
+ while(int ret = n.recvPackage(&h, f->data, DVPACKAGE_SIZE)) {
if(ret == -1) {
fprintf(stderr, "An error occurred...!\n");
break;
@@ -125,7 +126,8 @@ void newConnection(Socket *s)
delete f;
}
- f = new DVFrame();
+ // FIXME: Allocate buffer
+ f = new Frame(NULL, 0);
}
// TODO: Use save state