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 double scale = mScale; 00071 if (mScale > 1) // assume mScale indicates maximum width 00072 { 00073 scale = 1.0; 00074 while (scale * im->CW() > mScale) 00075 scale *= 0.5; 00076 } 00077 if (mSplitArchive) 00078 { 00079 size_t nrBytes = 0; 00080 ArrayT* sc = 0; 00081 Array::Scale(sc, im, scale, scale, Geometry::NEAREST, true); 00082 if (mJpg) 00083 { 00084 Array::WriteJpgToMemory(sc, mBuf, mBufSize, &nrBytes); 00085 } 00086 else 00087 { 00088 Array::WritePngToMemory(sc, mBuf, mBufSize, &nrBytes); 00089 } 00090 delete sc; 00091 Array::Array2dScalarUInt8* data = 00092 Array::MakeFromData<Array::Array2dScalarUInt8>((UInt8*) mBuf, 00093 nrBytes, 1); 00094 mImList.push_back(data); 00095 } 00096 else 00097 { 00098 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00099 String fName = vs->GetFilePathFrames(fileId, src->FrameNr(), 00100 ".png", true, false); 00101 if (fName.empty()) 00102 { 00103 ILOG_ERROR("HandleNewFrame : Empty filename"); 00104 } 00105 else 00106 { 00107 Array::WritePng(im, fName, vs->GetDatabase()); 00108 } 00109 #else // REPOSITORY_USED 00110 String container = vs->GetContainerFile(fileId); 00111 Persistency::FrameLocator loc(vs->GetLocator(), container, 00112 src->FrameNr(), ".png"); 00113 Persistency::FrameRepository().Add(loc, im); 00114 #endif // REPOSITORY_USED 00115 } 00116 delete im; 00117 }
Here is the call graph for this function:
|