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

bool Impala::Core::Stream::Lavc::VideoAccessObject::InitStreams (  )  [inline, private]

Definition at line 623 of file VideoAccessObject.h.

References ILOG_ERROR, ILOG_WARN, mFormatCtx, mSrcAddress, mVideoStream, mVideoStreamIndex, and StreamCount().

Referenced by VideoAccessObject().

00624     {
00625         mVideoStreamIndex = -1;
00626         mVideoStream = 0;
00627         int videoStreamCount = 0;
00628 
00629         // find the first video stream 
00630         for (int i = 0; i < StreamCount(); i++)
00631         {
00632             if (mFormatCtx->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO)
00633             {
00634                 if (++videoStreamCount > 1)
00635                     continue;
00636                     // Note that this obfuscates the fact that more video data 
00637                     // is present which is inappropriate in forensic settings.
00638 
00639                 mVideoStreamIndex = i;
00640                 mVideoStream = mFormatCtx->streams[i];
00641             }
00642         }
00643 
00644         if (videoStreamCount == 0) 
00645         {
00646             ILOG_ERROR("Did not find video stream in: " << mSrcAddress);
00647             return false;
00648         }
00649 
00650         if (videoStreamCount > 1)
00651             ILOG_WARN("Found " << videoStreamCount << " video streams; using " <<
00652                 "just one from: " << mSrcAddress);
00653 
00654         return true;
00655     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:18:41 2010 for ImpalaSrc by  doxygen 1.5.1