- Timestamp:
- Mar 18, 2021, 11:07:59 AM (4 years ago)
- Location:
- trunk/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Image.cpp
r338 r401 64 64 void Image::RawRead(char *dst) const { Warn("non implementé\n"); } 65 65 66 char* Image::AllocFunction(ssize_t size) { 67 return allocFunction(size); 68 } 69 70 void Image::FreeFunction(char* buffer) { 71 freeFunction(buffer); 72 } 73 66 74 void Image::RegisterAllocFunction(char*(*func)(ssize_t size)) { 67 75 if(allocFunction==DefaultAllocFunction) allocFunction=func; -
trunk/lib/FlairCore/src/Image.h
r353 r401 111 111 static void RegisterAllocFunction(char*(*func)(ssize_t size)); 112 112 static void RegisterFreeFunction(void(*func)(char* buffer)); 113 static char* AllocFunction(ssize_t size); 114 static void FreeFunction(char* buffer); 113 115 114 116 private: -
trunk/lib/FlairSensorActuator/src/V4LCamera_impl.cpp
r400 r401 29 29 #include <cstring> 30 30 #include <sys/mman.h> 31 #include <VisionFilter.h>32 31 33 32 using std::string; … … 104 103 if(useMemoryUsrPtr) { 105 104 for (int i = 0; i < nbBuffers; i++) { 106 FreeFunction((char*)buffers[i]);105 Image::FreeFunction((char*)buffers[i]); 107 106 } 108 107 } else { 109 FreeFunction(imageData);108 Image::FreeFunction(imageData); 110 109 } 111 110 close(device); … … 212 211 213 212 //allocate output data 214 imageData = AllocFunction(self->output->GetDataType().GetSize());213 imageData = Image::AllocFunction(self->output->GetDataType().GetSize()); 215 214 //Printf("cmem allocated %i at %x\n",output->GetDataType().GetSize(),imageData); 216 215 … … 237 236 238 237 for (int i=0; i<nbBuffers; i++) { 239 buffers[i] = AllocFunction(self->output->GetDataType().GetSize());238 buffers[i] =Image::AllocFunction(self->output->GetDataType().GetSize()); 240 239 } 241 240
Note:
See TracChangeset
for help on using the changeset viewer.