1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10*d1766043SAndrew Rist * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d1766043SAndrew Rist * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19*d1766043SAndrew Rist * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_media_XPlayer_idl__ 24cdf0e10cSrcweir#define __com_sun_star_media_XPlayer_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_awt_Size_idl__ 27cdf0e10cSrcweir#include <com/sun/star/awt/Size.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir#ifndef __com_sun_star_media_XPlayerWindow_idl__ 30cdf0e10cSrcweir#include <com/sun/star/media/XPlayerWindow.idl> 31cdf0e10cSrcweir#endif 32cdf0e10cSrcweir#ifndef __com_sun_star_media_XFrameGrabber_idl__ 33cdf0e10cSrcweir#include <com/sun/star/media/XFrameGrabber.idl> 34cdf0e10cSrcweir#endif 35cdf0e10cSrcweir 36cdf0e10cSrcweirmodule com { module sun { module star { module media { 37cdf0e10cSrcweir 38cdf0e10cSrcweir/** is the multimedia stream handling interface. This allows to 39cdf0e10cSrcweir perform every basic operation on videos and sounds. 40cdf0e10cSrcweir */ 41cdf0e10cSrcweirinterface XPlayer 42cdf0e10cSrcweir{ 43cdf0e10cSrcweir /** starts reading the stream from the current position. 44cdf0e10cSrcweir */ 45cdf0e10cSrcweir void start(); 46cdf0e10cSrcweir 47cdf0e10cSrcweir /** stops reading the stream and leave the cursor at its current 48cdf0e10cSrcweir position. 49cdf0e10cSrcweir */ 50cdf0e10cSrcweir void stop(); 51cdf0e10cSrcweir 52cdf0e10cSrcweir /** indicates whether the stream is played or not. 53cdf0e10cSrcweir 54cdf0e10cSrcweir @returns 55cdf0e10cSrcweir <TRUE/> if the stream is played, <FALSE/> otherwise 56cdf0e10cSrcweir */ 57cdf0e10cSrcweir boolean isPlaying(); 58cdf0e10cSrcweir 59cdf0e10cSrcweir /** gets the stream length 60cdf0e10cSrcweir 61cdf0e10cSrcweir @returns 62cdf0e10cSrcweir the stream length in second 63cdf0e10cSrcweir */ 64cdf0e10cSrcweir double getDuration(); 65cdf0e10cSrcweir 66cdf0e10cSrcweir /** sets the new cursor position in the media stream. After using 67cdf0e10cSrcweir this method the stream is stopped. 68cdf0e10cSrcweir 69cdf0e10cSrcweir @param fTime 70cdf0e10cSrcweir the new position to set in seconds 71cdf0e10cSrcweir */ 72cdf0e10cSrcweir void setMediaTime( [in] double fTime ); 73cdf0e10cSrcweir 74cdf0e10cSrcweir /** gets the current position of the cursor in the stream 75cdf0e10cSrcweir 76cdf0e10cSrcweir @returns 77cdf0e10cSrcweir the cursor position in seconds 78cdf0e10cSrcweir */ 79cdf0e10cSrcweir double getMediaTime(); 80cdf0e10cSrcweir 81cdf0e10cSrcweir /** sets the time at which to stop reading the stream. 82cdf0e10cSrcweir 83cdf0e10cSrcweir @param fTime 84cdf0e10cSrcweir the time at which to stop reading the stream in seconds 85cdf0e10cSrcweir */ 86cdf0e10cSrcweir void setStopTime( [in] double fTime ); 87cdf0e10cSrcweir 88cdf0e10cSrcweir /** gets the time at which the stream will stop. The result 89cdf0e10cSrcweir is not guaranteed if no stop time has been set. 90cdf0e10cSrcweir */ 91cdf0e10cSrcweir double getStopTime(); 92cdf0e10cSrcweir 93cdf0e10cSrcweir /** sets the speed of the stream reading relatively to the normal 94cdf0e10cSrcweir speed. 95cdf0e10cSrcweir 96cdf0e10cSrcweir @param fRate 97cdf0e10cSrcweir the stream reading rate. <code>1.0</code> means normal speed. 98cdf0e10cSrcweir */ 99cdf0e10cSrcweir void setRate( [in] double fRate ); 100cdf0e10cSrcweir 101cdf0e10cSrcweir /** gets the speed of the stream reading relatively to the normal 102cdf0e10cSrcweir reading. 103cdf0e10cSrcweir 104cdf0e10cSrcweir @returns 105cdf0e10cSrcweir the relative speed. <code>1.0</code> is the normal speed. 106cdf0e10cSrcweir */ 107cdf0e10cSrcweir double getRate(); 108cdf0e10cSrcweir 109cdf0e10cSrcweir /** sets whether the stream reading should restart at the stream 110cdf0e10cSrcweir start after the end of the stream. 111cdf0e10cSrcweir 112cdf0e10cSrcweir @param bSet 113cdf0e10cSrcweir loops if set to <TRUE/>, otherwise stops at the end of the 114cdf0e10cSrcweir stream. 115cdf0e10cSrcweir */ 116cdf0e10cSrcweir void setPlaybackLoop( [in] boolean bSet ); 117cdf0e10cSrcweir 118cdf0e10cSrcweir /** indicates whether the stream reading will restart after the 119cdf0e10cSrcweir end of the stream. 120cdf0e10cSrcweir 121cdf0e10cSrcweir @returns 122cdf0e10cSrcweir <TRUE/> if the stream will loop, <FALSE/> otherwise. 123cdf0e10cSrcweir */ 124cdf0e10cSrcweir boolean isPlaybackLoop(); 125cdf0e10cSrcweir 126cdf0e10cSrcweir /** sets the audio volume in decibel. 127cdf0e10cSrcweir 128cdf0e10cSrcweir @param nDB 129cdf0e10cSrcweir the new volume in Decibel 130cdf0e10cSrcweir */ 131cdf0e10cSrcweir void setVolumeDB( [in] short nDB ); 132cdf0e10cSrcweir 133cdf0e10cSrcweir /** gets the current audio volume in decibel 134cdf0e10cSrcweir 135cdf0e10cSrcweir @returns 136cdf0e10cSrcweir the volume in decibel 137cdf0e10cSrcweir */ 138cdf0e10cSrcweir short getVolumeDB(); 139cdf0e10cSrcweir 140cdf0e10cSrcweir /** sets the volume to <code>0</code> or to its previous value. 141cdf0e10cSrcweir 142cdf0e10cSrcweir @param bSet 143cdf0e10cSrcweir sets the volume to <code>0</code> if <TRUE/>, and switch 144cdf0e10cSrcweir to the previous non-null value if <FALSE/> 145cdf0e10cSrcweir */ 146cdf0e10cSrcweir void setMute( [in] boolean bSet ); 147cdf0e10cSrcweir 148cdf0e10cSrcweir /** gets whether the volume is temporarily down to <code>0</code> 149cdf0e10cSrcweir or not. 150cdf0e10cSrcweir 151cdf0e10cSrcweir @returns 152cdf0e10cSrcweir <TRUE/> if the volume is temporarily set to <code>0</code>, 153cdf0e10cSrcweir <FALSE/> otherwise. 154cdf0e10cSrcweir */ 155cdf0e10cSrcweir boolean isMute(); 156cdf0e10cSrcweir 157cdf0e10cSrcweir /** gets the preferred window size 158cdf0e10cSrcweir 159cdf0e10cSrcweir @returns 160cdf0e10cSrcweir the <type scope="com::sun::star::awt">Size</type> 161cdf0e10cSrcweir */ 162cdf0e10cSrcweir ::com::sun::star::awt::Size getPreferredPlayerWindowSize(); 163cdf0e10cSrcweir 164cdf0e10cSrcweir /** gets a new player window for this stream control 165cdf0e10cSrcweir 166cdf0e10cSrcweir @param aArguments 167cdf0e10cSrcweir arguments passed to the window during its creation. 168cdf0e10cSrcweir */ 169cdf0e10cSrcweir XPlayerWindow createPlayerWindow( [in] sequence< any > aArguments ); 170cdf0e10cSrcweir 171cdf0e10cSrcweir /** gets a frame grabber for this stream. 172cdf0e10cSrcweir */ 173cdf0e10cSrcweir XFrameGrabber createFrameGrabber(); 174cdf0e10cSrcweir}; 175cdf0e10cSrcweir 176cdf0e10cSrcweir}; }; }; }; 177cdf0e10cSrcweir 178cdf0e10cSrcweir#endif 179