Definition at line 685 of file VideoAccessObject.h. References ILOG_ERROR, ILOG_WARN, mFormatCtx, mSrcAddress, mVideoStream, mVideoStreamIndex, and StreamCount(). Referenced by VideoAccessObject(). 00686 { 00687 mVideoStreamIndex = -1; 00688 mVideoStream = 0; 00689 int videoStreamCount = 0; 00690 00691 // find the first video stream 00692 for (int i = 0; i < StreamCount(); i++) 00693 { 00694 if (mFormatCtx->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) 00695 { 00696 if (++videoStreamCount > 1) 00697 continue; 00698 // Note that this obfuscates the fact that more video data 00699 // is present which is inappropriate in forensic settings. 00700 00701 mVideoStreamIndex = i; 00702 mVideoStream = mFormatCtx->streams[i]; 00703 } 00704 } 00705 00706 if (videoStreamCount == 0) 00707 { 00708 ILOG_ERROR("Did not find video stream in: " << mSrcAddress); 00709 return false; 00710 } 00711 00712 if (videoStreamCount > 1) 00713 ILOG_WARN("Found " << videoStreamCount << " video streams; using " << 00714 "just one from: " << mSrcAddress); 00715 00716 return true; 00717 }
Here is the call graph for this function:
|