|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _MOVIE_H_ |
|
#define _MOVIE_H_ |
|
|
|
#include "Object.h" |
|
#include "poppler_private_export.h" |
|
|
|
#include <memory> |
|
|
|
struct MovieActivationParameters |
|
{ |
|
|
|
MovieActivationParameters(); |
|
~MovieActivationParameters(); |
|
|
|
|
|
void parseMovieActivation(const Object *aDict); |
|
|
|
enum MovieRepeatMode |
|
{ |
|
repeatModeOnce, |
|
repeatModeOpen, |
|
repeatModeRepeat, |
|
repeatModePalindrome |
|
}; |
|
|
|
struct MovieTime |
|
{ |
|
MovieTime() { units_per_second = 0; } |
|
unsigned long units; |
|
int units_per_second; |
|
}; |
|
|
|
MovieTime start; |
|
MovieTime duration; |
|
|
|
double rate; |
|
|
|
int volume; |
|
|
|
bool showControls; |
|
|
|
bool synchronousPlay; |
|
MovieRepeatMode repeatMode; |
|
|
|
|
|
bool floatingWindow; |
|
double xPosition; |
|
double yPosition; |
|
int znum; |
|
int zdenum; |
|
}; |
|
|
|
class POPPLER_PRIVATE_EXPORT Movie |
|
{ |
|
public: |
|
Movie(const Object *movieDict, const Object *aDict); |
|
explicit Movie(const Object *movieDict); |
|
Movie(const Movie &other); |
|
~Movie(); |
|
Movie &operator=(const Movie &) = delete; |
|
|
|
bool isOk() const { return ok; } |
|
const MovieActivationParameters *getActivationParameters() const { return &MA; } |
|
|
|
const GooString *getFileName() const { return fileName; } |
|
|
|
unsigned short getRotationAngle() const { return rotationAngle; } |
|
void getAspect(int *widthA, int *heightA) const |
|
{ |
|
*widthA = width; |
|
*heightA = height; |
|
} |
|
|
|
Object getPoster() const { return poster.copy(); } |
|
bool getShowPoster() const { return showPoster; } |
|
|
|
bool getUseFloatingWindow() const { return MA.floatingWindow; } |
|
void getFloatingWindowSize(int *width, int *height); |
|
|
|
std::unique_ptr<Movie> copy() const; |
|
|
|
private: |
|
void parseMovie(const Object *movieDict); |
|
|
|
bool ok; |
|
|
|
unsigned short rotationAngle; |
|
int width; |
|
int height; |
|
|
|
Object poster; |
|
bool showPoster; |
|
|
|
GooString *fileName; |
|
|
|
MovieActivationParameters MA; |
|
}; |
|
|
|
#endif |
|
|