merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / media / XPlayer.idl
blob7546e9d27d8c7543a48c40c76e1e9357e3591383
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_media_XPlayer_idl__
28 #define __com_sun_star_media_XPlayer_idl__
30 #ifndef __com_sun_star_awt_Size_idl__
31 #include <com/sun/star/awt/Size.idl>
32 #endif
33 #ifndef __com_sun_star_media_XPlayerWindow_idl__
34 #include <com/sun/star/media/XPlayerWindow.idl>
35 #endif
36 #ifndef __com_sun_star_media_XFrameGrabber_idl__
37 #include <com/sun/star/media/XFrameGrabber.idl>
38 #endif
40 module com { module sun { module star { module media {
42 /** is the multimedia stream handling interface. This allows to
43 perform every basic operation on videos and sounds.
45 interface XPlayer
47 /** starts reading the stream from the current position.
49 void start();
51 /** stops reading the stream and leave the cursor at its current
52 position.
54 void stop();
56 /** indicates whether the stream is played or not.
58 @returns
59 <TRUE/> if the stream is played, <FALSE/> otherwise
61 boolean isPlaying();
63 /** gets the stream length
65 @returns
66 the stream length in second
68 double getDuration();
70 /** sets the new cursor position in the media stream. After using
71 this method the stream is stopped.
73 @param fTime
74 the new position to set in seconds
76 void setMediaTime( [in] double fTime );
78 /** gets the current position of the cursor in the stream
80 @returns
81 the cursor position in seconds
83 double getMediaTime();
85 /** sets the time at which to stop reading the stream.
87 @param fTime
88 the time at which to stop reading the stream in seconds
90 void setStopTime( [in] double fTime );
92 /** gets the time at which the stream will stop. The result
93 is not guaranteed if no stop time has been set.
95 double getStopTime();
97 /** sets the speed of the stream reading relatively to the normal
98 speed.
100 @param fRate
101 the stream reading rate. <code>1.0</code> means normal speed.
103 void setRate( [in] double fRate );
105 /** gets the speed of the stream reading relatively to the normal
106 reading.
108 @returns
109 the relative speed. <code>1.0</code> is the normal speed.
111 double getRate();
113 /** sets whether the stream reading should restart at the stream
114 start after the end of the stream.
116 @param bSet
117 loops if set to <TRUE/>, otherwise stops at the end of the
118 stream.
120 void setPlaybackLoop( [in] boolean bSet );
122 /** indicates whether the stream reading will restart after the
123 end of the stream.
125 @returns
126 <TRUE/> if the stream will loop, <FALSE/> otherwise.
128 boolean isPlaybackLoop();
130 /** sets the audio volume in decibel.
132 @param nDB
133 the new volume in Decibel
135 void setVolumeDB( [in] short nDB );
137 /** gets the current audio volume in decibel
139 @returns
140 the volume in decibel
142 short getVolumeDB();
144 /** sets the volume to <code>0</code> or to its previous value.
146 @param bSet
147 sets the volume to <code>0</code> if <TRUE/>, and switch
148 to the previous non-null value if <FALSE/>
150 void setMute( [in] boolean bSet );
152 /** gets whether the volume is temporarily down to <code>0</code>
153 or not.
155 @returns
156 <TRUE/> if the volume is temporarily set to <code>0</code>,
157 <FALSE/> otherwise.
159 boolean isMute();
161 /** gets the preferred window size
163 @returns
164 the <type scope="com::sun::star::awt">Size</type>
166 ::com::sun::star::awt::Size getPreferredPlayerWindowSize();
168 /** gets a new player window for this stream control
170 @param aArguments
171 arguments passed to the window during its creation.
173 XPlayerWindow createPlayerWindow( [in] sequence< any > aArguments );
175 /** gets a frame grabber for this stream.
177 XFrameGrabber createFrameGrabber();
180 }; }; }; };
182 #endif