1 //*********************************************************************************
3 //---------------------------------------------------------------------------------
5 //---------------------------------------------------------------------------------
6 // Hugo Mercier <hmercier31[at]gmail.com> (c) 2008
7 // Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010
9 // This program is free software; you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation; either version 2 of the License, or
12 // (at your option) any later version.
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software
21 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 //*********************************************************************************
29 struct MediaWindowParameters
{
31 MediaWindowParameters();
32 ~MediaWindowParameters();
34 // parse from a floating window parameters dictionary
35 void parseFWParams(Object
* obj
);
37 enum MediaWindowType
{
44 enum MediaWindowRelativeTo
{
45 windowRelativeToDocument
= 0,
46 windowRelativeToApplication
,
47 windowRelativeToDesktop
53 MediaWindowType type
; // movieWindowEmbedded
59 // floating window position
60 MediaWindowRelativeTo relativeTo
; // windowRelativeToDocument (or to desktop)
61 double XPosition
; // 0.5
62 double YPosition
; // 0.5
64 GBool hasTitleBar
; // true
65 GBool hasCloseButton
; // true
66 GBool isResizeable
; // true
70 struct MediaParameters
{
75 // parse from a "Media Play Parameters" dictionary
76 void parseMediaPlayParameters(Object
* playObj
);
77 // parse from a "Media Screen Parameters" dictionary
78 void parseMediaScreenParameters(Object
* screenObj
);
80 enum MediaFittingPolicy
{
97 // defined in media play parameters, p 770
98 // correspond to 'fit' SMIL's attribute
99 MediaFittingPolicy fittingPolicy
; // fittingUndefined
101 GBool autoPlay
; // true
103 // repeat count, can be real values, 0 means forever
104 double repeatCount
; // 1.0
106 // background color // black = (0.0 0.0 0.0)
109 // opacity in [0.0 1.0]
110 double opacity
; // 1.0
113 GBool showControls
; // false
115 MediaWindowParameters windowParams
;
118 class MediaRendition
{
120 MediaRendition(Object
*obj
);
123 GBool
isOk () { return ok
; }
125 MediaParameters
* getMHParameters() { return &MH
; }
126 MediaParameters
* getBEParameters() { return &BE
; }
128 GooString
* getContentType() { return contentType
; }
129 GooString
* getFileName() { return fileName
; }
131 GBool
getIsEmbedded() { return isEmbedded
; }
132 Stream
* getEmbbededStream() { return embeddedStream
; }
133 // write embedded stream to file
134 void outputToFile(FILE*);
136 MediaRendition
* copy();
141 // "Must Honor" parameters
143 // "Best Effort" parameters
148 GooString
* contentType
;
151 Stream
* embeddedStream
;
153 // if it's not embedded
157 #endif /* _RENDITION_H_ */