Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Frame.cpp

Go to the documentation of this file.
00001 
00005 #include "Frame.hpp"
00006 #include "GOP.hpp"
00007 
00008 Frame::Frame(FrameType t) {
00009     setType(t);
00010 }
00011 
00012 Frame::Frame(long noS, unsigned int noP, long offs, GOP * p, FrameType t) {
00013     setNoInStream(noS);
00014     setNoInGOP(noP);
00015     setFileOffset(offs);
00016     setGOP(p);
00017     setType(t);
00018 }
00019 
00020 Frame::~Frame() {
00021 }
00022 
00023 
00024 void Frame::setType(FrameType t) {
00025         type = t;
00026 }
00027 FrameType Frame::getType() {
00028         return type;
00029 }
00030 
00031 void Frame::setGOP(GOP * pat) {
00032         pattern = pat;
00033 }
00034 
00035 void Frame::setNoInStream(uint noS) {
00036         noInStream = noS;
00037 }
00038 
00039 uint Frame::getNoInStream() {
00040         return noInStream;
00041 }
00042 
00043 void Frame::setNoInDisplay(uint noD) {
00044         noInDisp = noD;
00045 }
00046 
00047 uint Frame::getNoInDisplay() {
00048         return noInDisp;
00049 }
00050 
00051 void Frame::setNoInGOP(uint noP) {
00052         noInGOP = noP;
00053 }
00054 
00055 uint Frame::getNoInGOP() {
00056         return noInGOP;
00057 }
00058 
00059 void Frame::setFileOffset(uint offset) {
00060         fileOffset = offset;
00061 }
00062 
00063 long Frame::getFileOffset() {
00064         return fileOffset;
00065 }
00066 
00067 char* Frame::getBuffer() {
00068         return buffer.data();
00069 }
00070 
00071 bool Frame::inMem() {
00072         return !buffer.isEmpty();
00073 }
00074 
00075 bool Frame::resizeBuffer(unsigned int size) {
00076         return buffer.resize(size);
00077 }
00078 
00079 uint Frame::getByteSize() {
00080         return byteSize;
00081 }
00082 
00083 void Frame::setByteSize(unsigned int size) {
00084         byteSize = size;
00085 }
00086 
00087 void Frame::setPriority(int prio) {
00088         priority = prio;
00089 }
00090 
00091 int Frame::getPriority() {
00092         return priority;
00093 }
00094 
00095 
00096 bool Frame::fillBuffer(char *data, unsigned int size) {
00097     if (!buffer.assign(data, size))
00098                 return false;
00099     else
00100                 return true;
00101 }
00102 
00103 bool Frame::fillBuffer() {
00104         if (this->pattern->getStream()->fillBuffer(this))
00105                 return true;
00106         return false;
00107 }
00108 
00109 
00110 bool Frame::freeBuffer() {
00111         if (this->pattern->getStream()->freeBuffer(this))
00112                 return true;
00113         return false;
00114 }

Generated on Wed Mar 19 11:57:42 2003 for qctva4lv by doxygen1.2.17