1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_media_XPlayer_idl__ 28#define __com_sun_star_media_XPlayer_idl__ 29 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 39 40module com { module sun { module star { module media { 41 42/** is the multimedia stream handling interface. This allows to 43 perform every basic operation on videos and sounds. 44 */ 45interface XPlayer 46{ 47 /** starts reading the stream from the current position. 48 */ 49 void start(); 50 51 /** stops reading the stream and leave the cursor at its current 52 position. 53 */ 54 void stop(); 55 56 /** indicates whether the stream is played or not. 57 58 @returns 59 <TRUE/> if the stream is played, <FALSE/> otherwise 60 */ 61 boolean isPlaying(); 62 63 /** gets the stream length 64 65 @returns 66 the stream length in second 67 */ 68 double getDuration(); 69 70 /** sets the new cursor position in the media stream. After using 71 this method the stream is stopped. 72 73 @param fTime 74 the new position to set in seconds 75 */ 76 void setMediaTime( [in] double fTime ); 77 78 /** gets the current position of the cursor in the stream 79 80 @returns 81 the cursor position in seconds 82 */ 83 double getMediaTime(); 84 85 /** sets the time at which to stop reading the stream. 86 87 @param fTime 88 the time at which to stop reading the stream in seconds 89 */ 90 void setStopTime( [in] double fTime ); 91 92 /** gets the time at which the stream will stop. The result 93 is not guaranteed if no stop time has been set. 94 */ 95 double getStopTime(); 96 97 /** sets the speed of the stream reading relatively to the normal 98 speed. 99 100 @param fRate 101 the stream reading rate. <code>1.0</code> means normal speed. 102 */ 103 void setRate( [in] double fRate ); 104 105 /** gets the speed of the stream reading relatively to the normal 106 reading. 107 108 @returns 109 the relative speed. <code>1.0</code> is the normal speed. 110 */ 111 double getRate(); 112 113 /** sets whether the stream reading should restart at the stream 114 start after the end of the stream. 115 116 @param bSet 117 loops if set to <TRUE/>, otherwise stops at the end of the 118 stream. 119 */ 120 void setPlaybackLoop( [in] boolean bSet ); 121 122 /** indicates whether the stream reading will restart after the 123 end of the stream. 124 125 @returns 126 <TRUE/> if the stream will loop, <FALSE/> otherwise. 127 */ 128 boolean isPlaybackLoop(); 129 130 /** sets the audio volume in decibel. 131 132 @param nDB 133 the new volume in Decibel 134 */ 135 void setVolumeDB( [in] short nDB ); 136 137 /** gets the current audio volume in decibel 138 139 @returns 140 the volume in decibel 141 */ 142 short getVolumeDB(); 143 144 /** sets the volume to <code>0</code> or to its previous value. 145 146 @param bSet 147 sets the volume to <code>0</code> if <TRUE/>, and switch 148 to the previous non-null value if <FALSE/> 149 */ 150 void setMute( [in] boolean bSet ); 151 152 /** gets whether the volume is temporarily down to <code>0</code> 153 or not. 154 155 @returns 156 <TRUE/> if the volume is temporarily set to <code>0</code>, 157 <FALSE/> otherwise. 158 */ 159 boolean isMute(); 160 161 /** gets the preferred window size 162 163 @returns 164 the <type scope="com::sun::star::awt">Size</type> 165 */ 166 ::com::sun::star::awt::Size getPreferredPlayerWindowSize(); 167 168 /** gets a new player window for this stream control 169 170 @param aArguments 171 arguments passed to the window during its creation. 172 */ 173 XPlayerWindow createPlayerWindow( [in] sequence< any > aArguments ); 174 175 /** gets a frame grabber for this stream. 176 */ 177 XFrameGrabber createFrameGrabber(); 178}; 179 180}; }; }; }; 181 182#endif 183