summaryrefslogtreecommitdiff
path: root/src/server.cc
diff options
context:
space:
mode:
authordeva <deva>2005-04-14 17:28:21 +0000
committerdeva <deva>2005-04-14 17:28:21 +0000
commitd5e1739f5288355869eccd53ab3eb1a4000d1cab (patch)
tree15f9f20fb8d5c92fbf0b2ef5e34f150ce660168f /src/server.cc
parentf742dd679138b1e3428b72e8f934fee15ade9ecb (diff)
Unified the frame types.
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