File indexing completed on 2025-12-10 10:23:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #ifndef _MOVIE_H_
0026 #define _MOVIE_H_
0027
0028 #include "Object.h"
0029 #include "poppler_private_export.h"
0030
0031 #include <memory>
0032
0033 struct MovieActivationParameters
0034 {
0035
0036 MovieActivationParameters();
0037 ~MovieActivationParameters();
0038
0039
0040 void parseMovieActivation(const Object *aDict);
0041
0042 enum MovieRepeatMode
0043 {
0044 repeatModeOnce,
0045 repeatModeOpen,
0046 repeatModeRepeat,
0047 repeatModePalindrome
0048 };
0049
0050 struct MovieTime
0051 {
0052 MovieTime() { units_per_second = 0; }
0053 unsigned long units;
0054 int units_per_second;
0055 };
0056
0057 MovieTime start;
0058 MovieTime duration;
0059
0060 double rate;
0061
0062 int volume;
0063
0064 bool showControls;
0065
0066 bool synchronousPlay;
0067 MovieRepeatMode repeatMode;
0068
0069
0070 bool floatingWindow;
0071 double xPosition;
0072 double yPosition;
0073 int znum;
0074 int zdenum;
0075 };
0076
0077 class POPPLER_PRIVATE_EXPORT Movie
0078 {
0079 public:
0080 Movie(const Object *movieDict, const Object *aDict);
0081 explicit Movie(const Object *movieDict);
0082 Movie(const Movie &other);
0083 ~Movie();
0084 Movie &operator=(const Movie &) = delete;
0085
0086 bool isOk() const { return ok; }
0087 const MovieActivationParameters *getActivationParameters() const { return &MA; }
0088
0089 const GooString *getFileName() const { return fileName; }
0090
0091 unsigned short getRotationAngle() const { return rotationAngle; }
0092 void getAspect(int *widthA, int *heightA) const
0093 {
0094 *widthA = width;
0095 *heightA = height;
0096 }
0097
0098 Object getPoster() const { return poster.copy(); }
0099 bool getShowPoster() const { return showPoster; }
0100
0101 bool getUseFloatingWindow() const { return MA.floatingWindow; }
0102 void getFloatingWindowSize(int *width, int *height);
0103
0104 std::unique_ptr<Movie> copy() const;
0105
0106 private:
0107 void parseMovie(const Object *movieDict);
0108
0109 bool ok;
0110
0111 unsigned short rotationAngle;
0112 int width;
0113 int height;
0114
0115 Object poster;
0116 bool showPoster;
0117
0118 GooString *fileName;
0119
0120 MovieActivationParameters MA;
0121 };
0122
0123 #endif