work for beta festival 2024
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef _PLAYER
|
|
|
|
#define _PLAYER
|
|
|
|
|
|
|
|
#include "ofMain.h"
|
|
|
|
|
|
|
|
class Player {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
void Setup();
|
|
|
|
void Update(ofImage &img);
|
|
|
|
void Draw();
|
|
|
|
void SetVideo(std::string path, ofFbo &fbo);
|
|
|
|
ofPixels GetVideoPixels();
|
|
|
|
void SetVideoPosition(ofFbo& output_fbo);
|
|
|
|
void SetRandomFrame();
|
|
|
|
void SetupGUI();
|
|
|
|
void UpdateGUI();
|
|
|
|
void UpdateVector();
|
|
|
|
void CheckNewFrame();
|
|
|
|
void GetCurrentFrame();
|
|
|
|
|
|
|
|
ofVideoPlayer videoPlayer;
|
|
|
|
|
|
|
|
int playerCurrentFrame;
|
|
|
|
int playerTotalFrameNum;
|
|
|
|
int playerVideoIndex;
|
|
|
|
std::string videoPath;
|
|
|
|
bool hasVideo;
|
|
|
|
|
|
|
|
glm::vec2 centerPosition;
|
|
|
|
|
|
|
|
ofFbo fbo;
|
|
|
|
ofFbo temp;
|
|
|
|
|
|
|
|
float x_pos;
|
|
|
|
float y_pos;
|
|
|
|
float new_width;
|
|
|
|
float new_height;
|
|
|
|
|
|
|
|
|
|
|
|
Player();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|