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