File indexing completed on 2025-12-10 10:23:50
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 _RENDITION_H_
0026 #define _RENDITION_H_
0027
0028 #include "Object.h"
0029
0030 struct MediaWindowParameters
0031 {
0032
0033 MediaWindowParameters();
0034 ~MediaWindowParameters();
0035
0036
0037 void parseFWParams(Object *obj);
0038
0039 enum MediaWindowType
0040 {
0041 windowFloating = 0,
0042 windowFullscreen,
0043 windowHidden,
0044 windowEmbedded
0045 };
0046
0047 enum MediaWindowRelativeTo
0048 {
0049 windowRelativeToDocument = 0,
0050 windowRelativeToApplication,
0051 windowRelativeToDesktop
0052 };
0053
0054
0055
0056 MediaWindowType type;
0057
0058 int width;
0059 int height;
0060
0061
0062 MediaWindowRelativeTo relativeTo;
0063 double XPosition;
0064 double YPosition;
0065
0066 bool hasTitleBar;
0067 bool hasCloseButton;
0068 bool isResizeable;
0069 };
0070
0071 struct MediaParameters
0072 {
0073
0074 MediaParameters();
0075 ~MediaParameters();
0076
0077
0078 void parseMediaPlayParameters(Object *playObj);
0079
0080 void parseMediaScreenParameters(Object *screenObj);
0081
0082 enum MediaFittingPolicy
0083 {
0084 fittingMeet = 0,
0085 fittingSlice,
0086 fittingFill,
0087 fittingScroll,
0088 fittingHidden,
0089 fittingUndefined
0090 };
0091
0092 struct Color
0093 {
0094 double r, g, b;
0095 };
0096
0097 int duration;
0098
0099 int volume;
0100
0101
0102
0103 MediaFittingPolicy fittingPolicy;
0104
0105 bool autoPlay;
0106
0107
0108 double repeatCount;
0109
0110
0111 Color bgColor;
0112
0113
0114 double opacity;
0115
0116 bool showControls;
0117
0118 MediaWindowParameters windowParams;
0119 };
0120
0121 class POPPLER_PRIVATE_EXPORT MediaRendition
0122 {
0123 public:
0124 explicit MediaRendition(Object *obj);
0125 MediaRendition(const MediaRendition &other);
0126 ~MediaRendition();
0127 MediaRendition &operator=(const MediaRendition &) = delete;
0128
0129 bool isOk() const { return ok; }
0130
0131 const MediaParameters *getMHParameters() const { return &MH; }
0132 const MediaParameters *getBEParameters() const { return &BE; }
0133
0134 const GooString *getContentType() const { return contentType; }
0135 const GooString *getFileName() const { return fileName; }
0136
0137 bool getIsEmbedded() const { return isEmbedded; }
0138 Stream *getEmbbededStream() const { return isEmbedded ? embeddedStreamObject.getStream() : nullptr; }
0139 const Object *getEmbbededStreamObject() const { return isEmbedded ? &embeddedStreamObject : nullptr; }
0140
0141 void outputToFile(FILE *);
0142
0143 MediaRendition *copy() const;
0144
0145 private:
0146 bool ok;
0147
0148
0149 MediaParameters MH;
0150
0151 MediaParameters BE;
0152
0153 bool isEmbedded;
0154
0155 GooString *contentType;
0156
0157
0158 Object embeddedStreamObject;
0159
0160
0161 GooString *fileName;
0162 };
0163
0164 #endif