本文整理汇总了C++中ofVideoPlayer::setLoopState方法的典型用法代码示例。如果您正苦于以下问题:C++ ofVideoPlayer::setLoopState方法的具体用法?C++ ofVideoPlayer::setLoopState怎么用?C++ ofVideoPlayer::setLoopState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofVideoPlayer
的用法示例。
在下文中一共展示了ofVideoPlayer::setLoopState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
void setup(){
ofSetVerticalSync(false);
w=ofGetScreenWidth();
h=ofGetScreenHeight();
ofDisableArbTex();
img.load("1.jpg");
player.load("1.mp4");
player.play();
player.setLoopState(OF_LOOP_NORMAL);
gray = img;
gray.setImageType(OF_IMAGE_GRAYSCALE);
wc.load("wcolor.vert","wcolor.frag");
ofFbo::Settings s;
s.depthStencilAsTexture=true;
s.useDepth=true;
s.width=w;
s.height=h;
fboDepth.allocate(s);
fbo.allocate(w,h);
fbo.begin();
ofClear(0,0,100,255);
fbo.end();
gui.setup();
gui.add(stepGradient.set("step gradient", .0015, -1., 1.));
gui.add(advectStep.set("step advect", .0015, -.1, .1));
gui.add(flipHeightMap.set("flip height map", 0.7, 0., 2.));
gui.add(time.set("time", 0., 0., 1.));
gui.add(advectMatrix.set("advect matrix", ofVec4f(0.1), ofVec4f(-1.), ofVec4f(1.)));
gui.add(switchVideo.set("switch video", false));
}
示例2: setup
//--------------------------------------------------------------
void ofApp::setup(){
ofSetLogLevel(OF_LOG_NOTICE);
ofFileDialogResult result = ofSystemLoadDialog("Select movie file...");
if(result.bSuccess == false){
ofLogWarning() << "SystemDialog canceled";
ofExit(1);
}
ofSleepMillis(300);
video.load(result.getPath());
video.setVolume(0);
video.setLoopState(OF_LOOP_NONE);
// WORKAROUND
video.play();
video.stop();
windowRefresh(ofGetWindowWidth(), ofGetWindowHeight());
}
示例3: setup
//--------------------------------------------------------------
void ofApp::setup(){
//-------------------------
int num = 1500;
p.assign(num, demoParticle());
currentMode = PARTICLE_MODE_NEAREST_POINTS;
resetParticles();
ofBackground(100, 100, 100);
vidGrabber.setVerbose(true);
vidGrabber.setup(vidX,vidY); // setup live video grabbing
colorImg.allocate(vidX,vidY); // color image display
grayImage.allocate(vidX,vidY); // grayscale display
grayBg.allocate(vidX,vidY); // contour image
grayDiff.allocate(vidX,vidY); // b/w differencing image
bLearnBakground = true;
threshold = 80;
ofSetVerticalSync(true);
bSendSerialMessage = false;
ofSetLogLevel(OF_LOG_VERBOSE);
int baud = 9600;
serial.setup("/dev/cu.usbmodem1411", baud);
nTimesRead = 0;
nBytesRead = 0;
readTime = 0;
memset(bytesReadString, 0, 4);
font.load("NADISN__.TTF", 12);
font2.load("NADISN__.TTF", 24);
_i = ofClamp(i, 0, 14);
mov1.load("hel-0world.mp4");
mov1.setLoopState(OF_LOOP_NORMAL);
mov1.play();
music1.load("1.wav");
music2.load("2.wav");
music3.load("3.wav");
music4.load("4.wav");
music5.load("5.wav");
music6.load("6.wav");
music7.load("7.wav");
music8.load("8.wav");
music9.load("9.wav");
music10.load("10.wav");
music11.load("11.wav");
music12.load("12.wav");
music13.load("11.wav");
music14.load("12.wav");
music15.load("13.wav");
music1.play();
music2.play();
music3.play();
music4.play();
music5.play();
music6.play();
music7.play();
music8.play();
music9.play();
music10.play();
music11.play();
music12.play();
music13.play();
music14.play();
music15.play();
music1.setPaused(true);
music2.setPaused(true);
music3.setPaused(true);
music4.setPaused(true);
music5.setPaused(true);
music6.setPaused(true);
music7.setPaused(true);
music8.setPaused(true);
music9.setPaused(true);
music10.setPaused(true);
music11.setPaused(true);
music12.setPaused(true);
music13.setPaused(true);
music14.setPaused(true);
music15.setPaused(true);
img1.load("01.png");
img2.load("02.png");
img3.load("03.png");
img4.load("04.png");
img5.load("05.png");
img6.load("06.png");
img7.load("07.png");
img8.load("08.png");
img9.load("09.png");
img10.load("10.png");
//.........这里部分代码省略.........