From d5e1739f5288355869eccd53ab3eb1a4000d1cab Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 14 Apr 2005 17:28:21 +0000 Subject: Unified the frame types. --- src/server.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/server.cc') 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 -- cgit v1.2.3