|
@ -5,9 +5,10 @@ Player::Player(){ |
|
|
playerVideoIndex = 0; |
|
|
playerVideoIndex = 0; |
|
|
req.setup("192.168.0.54", 2000, "search"); |
|
|
req.setup("192.168.0.54", 2000, "search"); |
|
|
|
|
|
|
|
|
resp.filename = "fingers.mp4"; |
|
|
resp.folder = "fingers.mp4"; |
|
|
resp.frame = 50; |
|
|
resp.video = "movies/fingers.mp4"; |
|
|
resp.index = 0; |
|
|
resp.image = "images/happy.png"; |
|
|
|
|
|
resp.frame = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Player::setup(){ |
|
|
void Player::setup(){ |
|
@ -48,14 +49,13 @@ void Player::draw(){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Player::setVideo(VPQuery query){ |
|
|
void Player::setVideo(VPQuery query){ |
|
|
videoPath = query.filename; |
|
|
videoPath = query.video; |
|
|
videoPlayer.load("movies/" + videoPath); |
|
|
videoPlayer.load(videoPath); |
|
|
|
|
|
|
|
|
videoPlayer.setFrame(query.frame); |
|
|
videoPlayer.setFrame(query.frame); |
|
|
setVideoPosition(); |
|
|
setVideoPosition(); |
|
|
|
|
|
|
|
|
currentVideoLabel = query.filename; |
|
|
currentVideoLabel = query.folder; |
|
|
currentIndexLabel = ofToString(query.index); |
|
|
|
|
|
|
|
|
|
|
|
videoPlayer.play(); |
|
|
videoPlayer.play(); |
|
|
} |
|
|
} |
|
@ -89,7 +89,7 @@ void Player::setRandomFrame(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string Player::getFrameName(){ |
|
|
string Player::getFrameName(){ |
|
|
string imagePath = resp.imagePath; |
|
|
string imagePath = resp.image; |
|
|
return imagePath; |
|
|
return imagePath; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -109,7 +109,6 @@ void Player::setupGUI(){ |
|
|
|
|
|
|
|
|
gui.add(currentFrameLabel.setup("Current Frame", ofToString(playerCurrentFrame))); |
|
|
gui.add(currentFrameLabel.setup("Current Frame", ofToString(playerCurrentFrame))); |
|
|
gui.add(currentVideoLabel.setup("Video Name", videoPath)); |
|
|
gui.add(currentVideoLabel.setup("Video Name", videoPath)); |
|
|
gui.add(currentIndexLabel.setup("Index", ofToString(playerVideoIndex))); |
|
|
|
|
|
|
|
|
|
|
|
currentVector.angry = angrySlider; |
|
|
currentVector.angry = angrySlider; |
|
|
currentVector.disgust = disgustSlider; |
|
|
currentVector.disgust = disgustSlider; |
|
|