Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / media / XPlayer.idl
blob2d3dc234a0bc9e6da66a473eb61513ded6adbaaa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_media_XPlayer_idl__
20 #define __com_sun_star_media_XPlayer_idl__
22 #include <com/sun/star/awt/Size.idl>
23 #include <com/sun/star/media/XPlayerWindow.idl>
24 #include <com/sun/star/media/XFrameGrabber.idl>
26 module com { module sun { module star { module media {
28 /** is the multimedia stream handling interface. This allows to
29 perform every basic operation on videos and sounds.
31 interface XPlayer
33 /** starts reading the stream from the current position.
35 void start();
37 /** stops reading the stream and leave the cursor at its current
38 position.
40 void stop();
42 /** indicates whether the stream is played or not.
44 @returns
45 `TRUE` if the stream is played, `FALSE` otherwise
47 boolean isPlaying();
49 /** gets the stream length
51 @returns
52 the stream length in second
54 double getDuration();
56 /** sets the new cursor position in the media stream. After using
57 this method the stream is stopped.
59 @param fTime
60 the new position to set in seconds
62 void setMediaTime( [in] double fTime );
64 /** gets the current position of the cursor in the stream
66 @returns
67 the cursor position in seconds
69 double getMediaTime();
71 /** sets whether the stream reading should restart at the stream
72 start after the end of the stream.
74 @param bSet
75 loops if set to `TRUE`, otherwise stops at the end of the
76 stream.
78 void setPlaybackLoop( [in] boolean bSet );
80 /** indicates whether the stream reading will restart after the
81 end of the stream.
83 @returns
84 `TRUE` if the stream will loop, `FALSE` otherwise.
86 boolean isPlaybackLoop();
88 /** sets the audio volume in decibel.
90 @param nDB
91 the new volume in Decibel
93 void setVolumeDB( [in] short nDB );
95 /** gets the current audio volume in decibel
97 @returns
98 the volume in decibel
100 short getVolumeDB();
102 /** sets the volume to <code>0</code> or to its previous value.
104 @param bSet
105 sets the volume to <code>0</code> if `TRUE`, and switch
106 to the previous non-null value if `FALSE`
108 void setMute( [in] boolean bSet );
110 /** gets whether the volume is temporarily down to <code>0</code>
111 or not.
113 @returns
114 `TRUE` if the volume is temporarily set to <code>0</code>,
115 `FALSE` otherwise.
117 boolean isMute();
119 /** gets the preferred window size
121 @returns
122 the com::sun::star::awt::Size
124 ::com::sun::star::awt::Size getPreferredPlayerWindowSize();
126 /** gets a new player window for this stream control
128 @param aArguments
129 arguments passed to the window during its creation.
131 XPlayerWindow createPlayerWindow( [in] sequence< any > aArguments );
133 /** gets a frame grabber for this stream.
135 XFrameGrabber createFrameGrabber();
138 }; }; }; };
140 #endif
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */