From 897867cc9d3bc869317666993a9cc6ef38c163e2 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 15 Jun 2006 17:35:33 +0000 Subject: Prepared for the client to use uncompressed frames (YUV422 instead of DV). Still a lot of work to do though! --- client/dvfile.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client/dvfile.cc') diff --git a/client/dvfile.cc b/client/dvfile.cc index 676d6b1..601c21d 100644 --- a/client/dvfile.cc +++ b/client/dvfile.cc @@ -42,19 +42,21 @@ dvfile::~dvfile() fclose(fp); } -unsigned char *dvfile::readFrame() +Frame *dvfile::readFrame() { - unsigned char *frame = new unsigned char[DVPACKAGE_SIZE]; + unsigned char *ptr = new unsigned char[DVPACKAGE_SIZE]; sleep_1_frame(); if(fp) { - while(fread(frame, DVPACKAGE_SIZE, 1, fp) == 0) { + while(fread(ptr, DVPACKAGE_SIZE, 1, fp) == 0) { fseek(fp, 0L, SEEK_SET); } } else { - memset(frame, 0, sizeof(frame)); + memset(ptr, 0, sizeof(ptr)); } + Frame *frame = new Frame((char*)ptr, DVPACKAGE_SIZE, VF_DV, NULL, 0, AF_DV); + return frame; } -- cgit v1.2.3