Arrived at a new frame in a "bookmark" walk.
Reimplemented from Impala::Core::VideoSet::Listener. Definition at line 64 of file ExportFrames.h. References Impala::Core::Stream::RgbDataSrc::DataPtr(), Impala::Core::Stream::RgbDataSrc::FrameHeight(), Impala::Core::Stream::RgbDataSrc::FrameNr(), Impala::Core::Stream::RgbDataSrc::FrameWidth(), ILOG_ERROR, mBuf, mBufSize, mImList, mJpg, mScale, mSplitArchive, Impala::Core::Geometry::NEAREST, Impala::Core::Array::Scale(), Impala::Core::Array::WriteJpgToMemory(), Impala::Core::Array::WritePng(), and Impala::Core::Array::WritePngToMemory(). 00066 { 00067 typedef Array::Array2dVec3UInt8 ArrayT; 00068 ArrayT* im = Array::ArrayCreate<ArrayT> 00069 (src->FrameWidth(), src->FrameHeight(), 0, 0, src->DataPtr(), true); 00070 if (mSplitArchive) 00071 { 00072 size_t nrBytes = 0; 00073 if (mJpg) 00074 { 00075 ArrayT* sc = 0; 00076 Array::Scale(sc, im, mScale, mScale, Geometry::NEAREST, true); 00077 Array::WriteJpgToMemory(sc, mBuf, mBufSize, &nrBytes); 00078 delete sc; 00079 } 00080 else 00081 { 00082 Array::WritePngToMemory(im, mBuf, mBufSize, &nrBytes); 00083 } 00084 Array::Array2dScalarUInt8* data = 00085 Array::MakeFromData<Array::Array2dScalarUInt8>((UInt8*) mBuf, 00086 nrBytes, 1); 00087 mImList.push_back(data); 00088 } 00089 else 00090 { 00091 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00092 String fName = vs->GetFilePathFrames(fileId, src->FrameNr(), 00093 ".png", true, false); 00094 if (fName.empty()) 00095 { 00096 ILOG_ERROR("HandleNewFrame : Empty filename"); 00097 } 00098 else 00099 { 00100 Array::WritePng(im, fName, vs->GetDatabase()); 00101 } 00102 #else // REPOSITORY_USED 00103 String container = vs->GetContainerFile(fileId); 00104 Persistency::FrameLocator loc(vs->GetLocator(), container, 00105 src->FrameNr(), ".png"); 00106 Persistency::FrameRepository().Add(loc, im); 00107 #endif // REPOSITORY_USED 00108 } 00109 delete im; 00110 }
Here is the call graph for this function:
|