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