Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Core::Stream::RgbDataSrcInfo::WriteInfo (  )  [inline, protected]

Definition at line 416 of file RgbDataSrcInfo.h.

References BUFFER_SIZE, Impala::FileNameTail(), GetInfoIOBuffer(), ILOG_DEBUG, ILOG_WARN, Impala::MakeString(), Impala::Core::Stream::RgbDataSrc::mAspectRatioDen, Impala::Core::Stream::RgbDataSrc::mAspectRatioNum, mBadFrameNrs, Impala::Core::Stream::RgbDataSrc::mBitRate, Impala::Core::Stream::RgbDataSrc::mBlankFrames, Impala::Core::Stream::RgbDataSrc::mCodecName, Impala::Core::Stream::RgbDataSrc::mCodecTag, Impala::Core::Stream::RgbDataSrc::mDuration, Impala::Core::Stream::RgbDataSrc::mDurationHour, Impala::Core::Stream::RgbDataSrc::mDurationMin, Impala::Core::Stream::RgbDataSrc::mDurationSec, Impala::Core::Stream::RgbDataSrc::mFormatLName, Impala::Core::Stream::RgbDataSrc::mFormatName, mFormatStr, Impala::Core::Stream::RgbDataSrc::mFrameHeight, Impala::Core::Stream::RgbDataSrc::mFrameRateDen, Impala::Core::Stream::RgbDataSrc::mFrameRateNum, Impala::Core::Stream::RgbDataSrc::mFrameWidth, Impala::Core::Stream::RgbDataSrc::mGopSize, mIndex, Impala::Core::Stream::RgbDataSrc::mIndexExists, Impala::Core::Stream::RgbDataSrc::mLastFrame, Impala::Core::Stream::RgbDataSrc::mSrcName, Impala::Core::Stream::RgbDataSrc::mStreamCount, Impala::Core::Stream::RgbDataSrc::mTimeBaseDen, Impala::Core::Stream::RgbDataSrc::mTimeBaseNum, Impala::Core::Stream::RgbDataSrc::mVideoDuration, ReplaceWhite(), Impala::Core::Table::Table::Size(), Impala::StringList::ToString(), Impala::Util::Write(), and Impala::Util::IOBuffer::Write().

Referenced by Impala::Core::Stream::RgbDataSrcLavc_old::Init(), and Impala::Core::Stream::RgbDataSrcLavc::Init().

00417     {
00418         ILOG_DEBUG("Writing info file");
00419 
00420         //Open the Info file for writing
00421         Util::IOBuffer* infoBuf = GetInfoIOBuffer(true);
00422 
00423         if (!infoBuf)
00424         {
00425             ILOG_WARN("Writing canceled: if file already exists, "
00426                         << "use the --override switch; "
00427                         << "otherwise make sure the directory is writable.");
00428             return;
00429         }
00430 
00431         //Write the video information to file
00432         char buf[BUFFER_SIZE];
00433         memset(buf, 0, BUFFER_SIZE);
00434         StringList badFramesStringList;
00435         for (int i = 0; i < mBadFrameNrs.size(); i++)
00436             badFramesStringList << MakeString(mBadFrameNrs[i]);
00437         String badFramesString = badFramesStringList.ToString(';');
00438         if (badFramesString.empty())
00439             badFramesString = "none";
00440         sprintf(buf, mFormatStr.c_str(),
00441                     ReplaceWhite(FileNameTail(mSrcName)).c_str(),
00442                     ReplaceWhite(mFormatName).c_str(),
00443                     ReplaceWhite(mFormatLName).c_str(),
00444                     mBitRate,
00445                     mStreamCount,
00446                     ReplaceWhite(mCodecName).c_str(),
00447                     ReplaceWhite(mCodecTag).c_str(),
00448                     mTimeBaseNum, mTimeBaseDen,
00449                     mVideoDuration,
00450                     mDuration,
00451                     mDurationHour, mDurationMin, mDurationSec,
00452                     mFrameWidth,
00453                     mFrameHeight,
00454                     mAspectRatioNum, mAspectRatioDen,
00455                     mLastFrame + 1,
00456                     mFrameRateNum, mFrameRateDen,
00457                     mGopSize,
00458                     mBlankFrames,
00459                     badFramesString.c_str(),
00460                     (mIndexExists ? "yes" : "no") );
00461         infoBuf->Write(buf, BUFFER_SIZE);
00462 
00463         if (mIndexExists)
00464         {
00465             ILOG_DEBUG("Index exists; writing table");
00466             Write(mIndex, infoBuf, true);
00467             ILOG_DEBUG(mIndex->Size() << " index entries written");
00468         }
00469 
00470         delete infoBuf;
00471     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:20:31 2011 for ImpalaSrc by  doxygen 1.5.1