update dev300-m58
[ooovba.git] / offapi / com / sun / star / media / XPlayer.idl
blobca6ca89e2bc2194395d148e845482f770c5741b9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XPlayer.idl,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_media_XPlayer_idl__
31 #define __com_sun_star_media_XPlayer_idl__
33 #ifndef __com_sun_star_awt_Size_idl__
34 #include <com/sun/star/awt/Size.idl>
35 #endif
36 #ifndef __com_sun_star_media_XPlayerWindow_idl__
37 #include <com/sun/star/media/XPlayerWindow.idl>
38 #endif
39 #ifndef __com_sun_star_media_XFrameGrabber_idl__
40 #include <com/sun/star/media/XFrameGrabber.idl>
41 #endif
43 module com { module sun { module star { module media {
45 /** is the multimedia stream handling interface. This allows to
46 perform every basic operation on videos and sounds.
48 interface XPlayer
50 /** starts reading the stream from the current position.
52 void start();
54 /** stops reading the stream and leave the cursor at its current
55 position.
57 void stop();
59 /** indicates whether the stream is played or not.
61 @returns
62 <TRUE/> if the stream is played, <FALSE/> otherwise
64 boolean isPlaying();
66 /** gets the stream length
68 @returns
69 the stream length in second
71 double getDuration();
73 /** sets the new cursor position in the media stream. After using
74 this method the stream is stopped.
76 @param fTime
77 the new position to set in seconds
79 void setMediaTime( [in] double fTime );
81 /** gets the current position of the cursor in the stream
83 @returns
84 the cursor position in seconds
86 double getMediaTime();
88 /** sets the time at which to stop reading the stream.
90 @param fTime
91 the time at which to stop reading the stream in seconds
93 void setStopTime( [in] double fTime );
95 /** gets the time at which the stream will stop. The result
96 is not guaranteed if no stop time has been set.
98 double getStopTime();
100 /** sets the speed of the stream reading relatively to the normal
101 speed.
103 @param fRate
104 the stream reading rate. <code>1.0</code> means normal speed.
106 void setRate( [in] double fRate );
108 /** gets the speed of the stream reading relatively to the normal
109 reading.
111 @returns
112 the relative speed. <code>1.0</code> is the normal speed.
114 double getRate();
116 /** sets whether the stream reading should restart at the stream
117 start after the end of the stream.
119 @param bSet
120 loops if set to <TRUE/>, otherwise stops at the end of the
121 stream.
123 void setPlaybackLoop( [in] boolean bSet );
125 /** indicates whether the stream reading will restart after the
126 end of the stream.
128 @returns
129 <TRUE/> if the stream will loop, <FALSE/> otherwise.
131 boolean isPlaybackLoop();
133 /** sets the audio volume in decibel.
135 @param nDB
136 the new volume in Decibel
138 void setVolumeDB( [in] short nDB );
140 /** gets the current audio volume in decibel
142 @returns
143 the volume in decibel
145 short getVolumeDB();
147 /** sets the volume to <code>0</code> or to its previous value.
149 @param bSet
150 sets the volume to <code>0</code> if <TRUE/>, and switch
151 to the previous non-null value if <FALSE/>
153 void setMute( [in] boolean bSet );
155 /** gets whether the volume is temporarily down to <code>0</code>
156 or not.
158 @returns
159 <TRUE/> if the volume is temporarily set to <code>0</code>,
160 <FALSE/> otherwise.
162 boolean isMute();
164 /** gets the preferred window size
166 @returns
167 the <type scope="com::sun::star::awt">Size</type>
169 ::com::sun::star::awt::Size getPreferredPlayerWindowSize();
171 /** gets a new player window for this stream control
173 @param aArguments
174 arguments passed to the window during its creation.
176 XPlayerWindow createPlayerWindow( [in] sequence< any > aArguments );
178 /** gets a frame grabber for this stream.
180 XFrameGrabber createFrameGrabber();
183 }; }; }; };
185 #endif