diff options
author | deva <deva> | 2006-06-15 17:35:33 +0000 |
---|---|---|
committer | deva <deva> | 2006-06-15 17:35:33 +0000 |
commit | 897867cc9d3bc869317666993a9cc6ef38c163e2 (patch) | |
tree | 49127ab698c52d0a7a2c7749081f15784cddf4bc /client/dvfile.cc | |
parent | d8404ce282917ef81418387f20fc5ee3607be391 (diff) |
Prepared for the client to use uncompressed frames (YUV422 instead of DV).
Still a lot of work to do though!
Diffstat (limited to 'client/dvfile.cc')
-rw-r--r-- | client/dvfile.cc | 10 |
1 files changed, 6 insertions, 4 deletions
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; } |