本文整理汇总了C++中ofVideoPlayer::loadMovie方法的典型用法代码示例。如果您正苦于以下问题:C++ ofVideoPlayer::loadMovie方法的具体用法?C++ ofVideoPlayer::loadMovie怎么用?C++ ofVideoPlayer::loadMovie使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofVideoPlayer
的用法示例。
在下文中一共展示了ofVideoPlayer::loadMovie方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mousePressed
//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
if( mode == "edit" ){
for(int i = 0; i < thumbs.size(); i++){
if(thumbs[i].r.inside(x,y)){
mode = "full";
selected = i;
fullVid.loadMovie(thumbs[i].video);
fullVid.setPosition(thumbs[i].pos);
fullVid.update();
break;
}
}
}
else if(mode == "full" ){
thumbs[selected].pos = ofMap(x, 0, ofGetWidth(), 0, 0.9999, true);
fullVid.setPosition(thumbs[selected].pos);
fullVid.update();
bDown = true;
}
if( mode == "move" ){
for(int i = 0; i < thumbs.size(); i++){
if(thumbs[i].r.inside(x,y)){
selected = i;
bDown = true;
break;
}
}
placedIndex = selected;
}
}
示例2: setup
void setup() {
ofSetDataPathRoot("../../../../../SharedData/");
ofSetVerticalSync(true);
// ofSetLogLevel(OF_LOG_VERBOSE);
#ifdef USE_VIDEO
video.loadMovie("videos/melica.mp4");
video.play();
#else
video.setup();
#ifdef USE_EDSDK
video.setDeviceType(EDSDK_MKII);
#endif
#endif
ofFbo::Settings settings;
settings.width = video.getWidth();
settings.height = video.getHeight();
settings.useDepth = false;
buffer.allocate(settings);
ofSetBackgroundAuto(false);
contours.getTracker().setPersistence(100);
contours.getTracker().setMaximumDistance(100);
setupGui();
osc.setup("klaus.local", 7400);
}
示例3: 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);
}
}