From 49265541974282f3346c9dc7de2365858f9fcb4d Mon Sep 17 00:00:00 2001 From: deva Date: Sat, 12 Aug 2006 15:00:40 +0000 Subject: Added timecode and fixed the sending and receiving of frames through the network. --- lib/frame.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'lib/frame.cc') diff --git a/lib/frame.cc b/lib/frame.cc index 3a6c1eb..fb7f6f3 100644 --- a/lib/frame.cc +++ b/lib/frame.cc @@ -3,7 +3,7 @@ * frame.cc * * Mon Nov 15 19:45:07 CET 2004 - * Copyright 2004 Bent Bisballe + * Copyright 2004 Bent Bisballe Nyeng * deva@aasimon.org ****************************************************************************/ @@ -24,9 +24,10 @@ * along with MIaV; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include #include "frame.h" +#include "info.h" + #include #include @@ -43,6 +44,14 @@ Frame::Frame(char *vframe, int vframesize, video_format_t vformat, this->aframesize = aframesize; this->aformat = aformat; + timecode.hour = 0; + timecode.min = 0; + timecode.sec = 0; + timecode.frame = 0; + + freeze = false; + snapshot = false; + // FIX... remove when old code is removed data = NULL; } @@ -59,12 +68,14 @@ Frame::Frame(char *vframe, int vframesize, video_format_t vformat, */ Frame::Frame(unsigned char *d, int sz) { + MIaV::info->error("Allocated a frame in the old way!"); + if(sz) data = new unsigned char[sz]; if(sz && d) memcpy(data, d, sz); if(sz == 0 && d) data = d; size = sz; number = 0; - memset(timecode, 0, sizeof(timecode)); + memset(timestamp, 0, sizeof(timestamp)); endOfFrameStream = false; -- cgit v1.2.3