Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: media ::

unpublished interface XPlayer
Usage Restrictions
not published
Description
is the multimedia stream handling interface. This allows to perform every basic operation on videos and sounds.

Methods' Summary
start starts reading the stream from the current position.  
stop stops reading the stream and leave the cursor at its current position.  
isPlaying indicates whether the stream is played or not.  
getDuration gets the stream length  
setMediaTime sets the new cursor position in the media stream. After using this method the stream is stopped.  
getMediaTime gets the current position of the cursor in the stream  
setStopTime sets the time at which to stop reading the stream.  
getStopTime gets the time at which the stream will stop. The result is not guaranteed if no stop time has been set.  
setRate sets the speed of the stream reading relatively to the normal speed.  
getRate gets the speed of the stream reading relatively to the normal reading.  
setPlaybackLoop sets whether the stream reading should restart at the stream start after the end of the stream.  
isPlaybackLoop indicates whether the stream reading will restart after the end of the stream.  
setVolumeDB sets the audio volume in decibel.  
getVolumeDB gets the current audio volume in decibel  
setMute sets the volume to 0 or to its previous value.  
isMute gets whether the volume is temporarily down to 0 or not.  
getPreferredPlayerWindowSize gets the preferred window size  
createPlayerWindow gets a new player window for this stream control  
createFrameGrabber gets a frame grabber for this stream.  
Methods' Details
start
void
start();

Description
starts reading the stream from the current position.
stop
void
stop();

Description
stops reading the stream and leave the cursor at its current position.
isPlaying
boolean
isPlaying();

Description
indicates whether the stream is played or not.
Returns
true if the stream is played, false otherwise
getDuration
double
getDuration();

Description
gets the stream length
Returns
the stream length in second
setMediaTime
void
setMediaTime( [in] double  fTime );

Description
sets the new cursor position in the media stream. After using this method the stream is stopped.
Parameter fTime
the new position to set in seconds
getMediaTime
double
getMediaTime();

Description
gets the current position of the cursor in the stream
Returns
the cursor position in seconds
setStopTime
void
setStopTime( [in] double  fTime );

Description
sets the time at which to stop reading the stream.
Parameter fTime
the time at which to stop reading the stream in seconds
getStopTime
double
getStopTime();

Description
gets the time at which the stream will stop. The result is not guaranteed if no stop time has been set.
setRate
void
setRate( [in] double  fRate );

Description
sets the speed of the stream reading relatively to the normal speed.
Parameter fRate
the stream reading rate. 1.0 means normal speed.
getRate
double
getRate();

Description
gets the speed of the stream reading relatively to the normal reading.
Returns
the relative speed. 1.0 is the normal speed.
setPlaybackLoop
void
setPlaybackLoop( [in] boolean  bSet );

Description
sets whether the stream reading should restart at the stream start after the end of the stream.
Parameter bSet
loops if set to true, otherwise stops at the end of the stream.
isPlaybackLoop
boolean
isPlaybackLoop();

Description
indicates whether the stream reading will restart after the end of the stream.
Returns
true if the stream will loop, false otherwise.
setVolumeDB
void
setVolumeDB( [in] short  nDB );

Description
sets the audio volume in decibel.
Parameter nDB
the new volume in Decibel
getVolumeDB
short
getVolumeDB();

Description
gets the current audio volume in decibel
Returns
the volume in decibel
setMute
void
setMute( [in] boolean  bSet );

Description
sets the volume to 0 or to its previous value.
Parameter bSet
sets the volume to 0 if true, and switch to the previous non-null value if false
isMute
boolean
isMute();

Description
gets whether the volume is temporarily down to 0 or not.
Returns
true if the volume is temporarily set to 0, false otherwise.
getPreferredPlayerWindowSize
::com::sun::star::awt::Size
getPreferredPlayerWindowSize();

Description
gets the preferred window size
Returns
the ::com::sun::star::awt::Size
createPlayerWindow
XPlayerWindow
createPlayerWindow( [in] sequence< any >  aArguments );

Description
gets a new player window for this stream control
Parameter aArguments
arguments passed to the window during its creation.
createFrameGrabber
XFrameGrabber
createFrameGrabber();

Description
gets a frame grabber for this stream.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.