#pragma once
#include "ofConstants.h"
#include "ofVideoBaseTypes.h"
template<typename T>
class ofPixels_;
typedef ofPixels_<unsigned char> ofPixels;
class DirectShowVideo;
class ofDirectShowPlayer : public ofBaseVideoPlayer{
public:
ofDirectShowPlayer();
ofDirectShowPlayer(const ofDirectShowPlayer&) = delete;
ofDirectShowPlayer & operator=(const ofDirectShowPlayer&) = delete;
ofDirectShowPlayer(ofDirectShowPlayer &&);
ofDirectShowPlayer & operator=(ofDirectShowPlayer&&);
bool load(std::string path);
void update();
void close();
void play();
void stop();
bool isFrameNew() const;
const ofPixels & getPixels() const;
ofPixels & getPixels();
float getWidth() const;
float getHeight() const;
bool isPaused() const;
bool isLoaded() const;
bool isPlaying() const;
bool setPixelFormat(ofPixelFormat pixelFormat);
ofPixelFormat getPixelFormat() const;
float getPosition() const;
float getSpeed() const;
float getDuration() const;
bool getIsMovieDone() const;
void setPaused(bool bPause);
void setPosition(float pct);
void setVolume(float volume);
void setLoopState(ofLoopType state);
void setSpeed(float speed);
void setFrame(int frame);
int getCurrentFrame() const;
int getTotalNumFrames() const;
ofLoopType getLoopState() const;
void firstFrame();
void nextFrame();
void previousFrame();
protected:
std::shared_ptr<DirectShowVideo> player;
ofPixelFormat pixelFormat;
};
Comments