本文整理汇总了C++中ofVideoPlayer::setSpeed方法的典型用法代码示例。如果您正苦于以下问题:C++ ofVideoPlayer::setSpeed方法的具体用法?C++ ofVideoPlayer::setSpeed怎么用?C++ ofVideoPlayer::setSpeed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofVideoPlayer
的用法示例。
在下文中一共展示了ofVideoPlayer::setSpeed方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyVideoMatrix
void ofApp::applyVideoMatrix(){
bool stopped = video.isPaused();
video.setSpeed(vVector * vSpeed);
ofLogNotice() << "Speed: " << vSpeed << ", Vector: " << vVector;
if(stopped){
video.setPaused(true);
}
}
示例2: nextVideo
void nextVideo(){
if( whichVideo < thumbs.size() ){
vid.loadMovie(thumbs[whichVideo].video);
vid.play();
vid.update();
vid.setPosition(thumbs[whichVideo].pos);
if( mode == "play" ){
vid.setSpeed(0.25);
}
whichVideo++;
framecounter = 0;
}else{
std::exit(0);
}
}
示例3: draw
//--------------------------------------------------------------
void ofApp::draw(){
//-------------------------
int limit = contourFinder.nBlobs;
int maxArea = 0;
int elementNum = -1;
ofColor yellow(255, 255, 171);
ofColor white(255, 1);
//-------------------------
// loop pages, back and forth
if (_i < 0) {
_i = 14;
}
if (_i > 14){
_i = 0;
}
switch (_i) {
case 0: // blink eyes - ellipse, fill black when clicked DONE
img1.draw(30, 60);
ofSetColor(255, 180, 0, alpha);
ofDrawCircle(265, 225, 45);
ofDrawCircle(440, 230, 45);
if (ofGetMousePressed() == true){
alpha = 0;
} else {
alpha = 255;
}
music1.setPaused(false);
ofSetColor(255);
font.drawString("Omphalotus wasnt like all the other mushrooms.", 40, 40);
font.drawString("He had eyes. ...and could walk.", 40, 55);
break;
case 1: // cap sensor DONE
img2.draw(30, 60);
music2.setPaused(false);
bSendSerialMessage = true;
if (nBytesRead != 1){
ofSetColor(220);
} else {
ofSetColor(0);
}
font.drawString("...and talk. He glowed in the dark too.", 40, 40);
break;
case 2: // earth video speed, mouse move DONE
bSendSerialMessage = false;
ofClearAlpha();
img3.draw(30, 60);
mov1.draw(215, 480);
mov1.setSpeed(vidSpeed);
music3.setPaused(false);
font.drawString("He didnt know what to do with the days, he felt lost and lonely.", 40, 40);
font.drawString("Like the world was too big, and he was too small.", 40, 55);
break;
case 3: // ketchup DONE
ofEnableAlphaBlending();
bSendSerialMessage = false;
img4.draw(30, 60);
music4.setPaused(false);
font.drawString("He thought of turning himself in to the omelet factory,", 40, 40);
font.drawString("but even then, theyd turn him away because he is too poisonous.", 40, 55);
ofSetColor(250, 58, 20);
line.draw();
ofSetColor(255);
break;
case 4:
bSendSerialMessage = false;
ofClearAlpha();
img5.draw(30, 60);
music5.setPaused(false);
font.drawString("It was late one evening he squished sadly past a slime mold on a rock.", 40, 40);
break;
case 5: // stars in eyes
bSendSerialMessage = false;
ofClearAlpha();
img6.draw(30, 60);
music6.setPaused(false);
font.drawString("Hello, what a lovely evening!", 40, 40);
font.drawString("...squeaked the slime mold.", 40, 55);
break;
case 6: // drops in eyes
bSendSerialMessage = false;
ofClearAlpha();
img8.draw(30, 60);
music7.setPaused(false);
font.drawString("Hello.", 40, 40);
font.drawString("...replied Omphalotus gloomily.", 40, 55);
break;
case 7: // more stars
//.........这里部分代码省略.........