本文整理汇总了C++中ofVideoPlayer::getDuration方法的典型用法代码示例。如果您正苦于以下问题:C++ ofVideoPlayer::getDuration方法的具体用法?C++ ofVideoPlayer::getDuration怎么用?C++ ofVideoPlayer::getDuration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofVideoPlayer
的用法示例。
在下文中一共展示了ofVideoPlayer::getDuration方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateRenderer
//--------------------------------------------------------------
void testApp::updateRenderer(ofVideoPlayer& fromPlayer){
if (!temporalAlignmentMode) {
if(alignmentScrubber.getPairSequence().isSequenceTimebased()){
long movieMillis = fromPlayer.getPosition() * fromPlayer.getDuration()*1000;
currentDepthFrame = alignmentScrubber.getPairSequence().getDepthFrameForVideoFrame(movieMillis);
depthSequence.selectTime(currentDepthFrame);
}
else {
currentDepthFrame = alignmentScrubber.getPairSequence().getDepthFrameForVideoFrame(fromPlayer.getCurrentFrame());
depthSequence.selectFrame(currentDepthFrame);
}
renderer.setDepthImage(depthPixelDecodeBuffer);
}
processDepthFrame();
renderer.update();
processGeometry();
if(!drawPointcloud && !drawWireframe && !drawMesh){
drawPointcloud = true;
}
currentDepthFrame = depthSequence.getSelectedFrame();
}
示例2: getStartAndEndTimes
ofRange ofxRGBDVideoDepthSequence::getStartAndEndTimes(ofVideoPlayer& player, ofxDepthImageSequence& sequence){
if(!ready()){
ofLogError("ofxRGBDVideoDepthSequence::getStartAndEndTimes -- video sequence not ready");
return ofRange();
}
ofRange output;
output.min = MAX(0, getVideoMillisForDepthMillis(0))/1000.;
output.max = MIN(player.getDuration(), getVideoMillisForDepthMillis(sequence.getDurationInMillis()) / 1000. );
return output;
}