Definition at line 97 of file VideoPlayer.h. References Impala::Core::Stream::RgbDataSrc::GotoFrame(), ILOG_SYSTEM, ILOG_WARN, IsPower2(), Impala::Core::Stream::RgbDataSrc::LastFrame(), Impala::Core::Stream::RgbDataSrc::LASTFRAME_UNKNOWN, mEndFrame, mImH, mImW, mOglView, mOwnRgbDataSrc, mPower2H, mPower2W, mRgbDataSrc, mStartFrame, OglImageReadFrame(), Impala::Core::Stream::RgbDataSrc::Reset(), and Impala::Core::Stream::RgbDataSrc::Valid(). 00099 { 00100 if (mOwnRgbDataSrc && mRgbDataSrc) 00101 delete mRgbDataSrc; 00102 00103 if ( !(mRgbDataSrc = video)) 00104 { 00105 viewSys.SetImage(mOglView,0); 00106 return; 00107 } 00108 00109 if (!mRgbDataSrc->Valid()) 00110 { 00111 ILOG_WARN("OpenVideo stream failed"); 00112 return; 00113 } 00114 00115 mRgbDataSrc->Reset(); 00116 00117 if (partitionInto < 1) 00118 return; 00119 if (partitionIndex < 0 || partitionIndex >= partitionInto) 00120 return; 00121 00122 if (lastFrame < 0) 00123 lastFrame = mRgbDataSrc->LastFrame(); 00124 if (lastFrame < 0 || lastFrame == RgbDataSrc::LASTFRAME_UNKNOWN) 00125 { 00126 mRgbDataSrc->GotoFrame(RgbDataSrc::LASTFRAME_UNKNOWN); 00127 lastFrame = mRgbDataSrc->LastFrame(); 00128 } 00129 mStartFrame = (partitionIndex * lastFrame) / partitionInto; 00130 if (partitionIndex > 0) 00131 mStartFrame++; // we dont want overlapping frame ranges 00132 mEndFrame = ((partitionIndex + 1) * lastFrame) / partitionInto; 00133 00134 ILOG_SYSTEM("OpenVideo: " << partitionIndex+1 << " of " << 00135 partitionInto << ": " << mStartFrame << " -- " << 00136 mEndFrame << " in " << lastFrame << " frames."); 00137 00138 mRgbDataSrc->GotoFrame(mStartFrame); 00139 00140 OGLIMAGE* im = OglImageReadFrame(mRgbDataSrc); 00141 mImW = im->w; 00142 mImH = im->h; 00143 IsPower2(mImW, &mPower2W); 00144 IsPower2(mImH, &mPower2H); 00145 im->noTexScaling = 1; 00146 00147 viewSys.SetImage(mOglView, im); 00148 oglSys.ReleaseOglImage(im); 00149 }
Here is the call graph for this function:
|