CrystalSpace

Public API Reference

CS::Media::iMediaPlayer Struct Reference

The media player can be used to play a media. More...

#include <ivideo/videodecode.h>

Inheritance diagram for CS::Media::iMediaPlayer:

List of all members.

Public Member Functions

virtual float GetAspectRatio ()=0
 Get the aspect ratio of the active video stream.
virtual bool GetCyclic () const =0
 Get whether or not the media has to be played cyclically.
virtual float GetDuration () const =0
 Get the length of the media in seconds.
virtual float GetPosition () const =0
 Get the position of the playing in seconds.
virtual iSndSysStreamGetTargetAudio ()=0
 Get a reference to the internal audio stream.
virtual iTextureHandleGetTargetTexture ()=0
 Get a reference to the internal texture buffer.
virtual void InitializePlayer (iMediaContainer *media)=0
 Initialize the video player, this should be done before any other operations.
virtual bool IsPlaying ()=0
 Check if the media is playing or not.
virtual void Pause ()=0
 Pause the media.
virtual void Play ()=0
 Start or resume the playing of the media.
virtual void RemoveActiveStream (int index)=0
 Deactivate a stream from the media container.
virtual void SetActiveStream (int index)=0
 Activate a stream from the media container.
virtual void SetCacheSize (size_t size)=0
 Set the size of the cache, that is the number of frames in the cache.
virtual void SetCurrentLanguage (const char *identifier)=0
 Select a language from the available ones.
virtual void SetCyclic (bool cyclic)=0
 Set whether or not the media has to be played cyclically. The default value is true.
virtual void SetPosition (float time)=0
 Seek the playing to a specified position in time (in seconds).
virtual void Stop ()=0
 Stop the playing of the media and seek to the beginning.
virtual void UpdatePlayer ()=0
 Update the media player.

Detailed Description

The media player can be used to play a media.

Video streams are redirected to a iTextureHandle, and sound streams are redirected to a iSndSysStream.

Definition at line 282 of file videodecode.h.


Member Function Documentation

virtual float CS::Media::iMediaPlayer::GetAspectRatio (  )  [pure virtual]

Get the aspect ratio of the active video stream.

virtual bool CS::Media::iMediaPlayer::GetCyclic (  )  const [pure virtual]

Get whether or not the media has to be played cyclically.

virtual float CS::Media::iMediaPlayer::GetDuration (  )  const [pure virtual]

Get the length of the media in seconds.

virtual float CS::Media::iMediaPlayer::GetPosition (  )  const [pure virtual]

Get the position of the playing in seconds.

virtual iSndSysStream* CS::Media::iMediaPlayer::GetTargetAudio (  )  [pure virtual]

Get a reference to the internal audio stream.

Returns:
the target audio stream
virtual iTextureHandle* CS::Media::iMediaPlayer::GetTargetTexture (  )  [pure virtual]

Get a reference to the internal texture buffer.

Returns:
the target texture
virtual void CS::Media::iMediaPlayer::InitializePlayer ( iMediaContainer media  )  [pure virtual]

Initialize the video player, this should be done before any other operations.

Parameters:
media The media container to be used by the player
cacheSize The number of frames to cache. If caching is not needed, use 1.
virtual bool CS::Media::iMediaPlayer::IsPlaying (  )  [pure virtual]

Check if the media is playing or not.

virtual void CS::Media::iMediaPlayer::Pause (  )  [pure virtual]

Pause the media.

virtual void CS::Media::iMediaPlayer::Play (  )  [pure virtual]

Start or resume the playing of the media.

virtual void CS::Media::iMediaPlayer::RemoveActiveStream ( int  index  )  [pure virtual]

Deactivate a stream from the media container.

Parameters:
index Index of a media stream
virtual void CS::Media::iMediaPlayer::SetActiveStream ( int  index  )  [pure virtual]

Activate a stream from the media container.

Parameters:
index Index of a media stream
virtual void CS::Media::iMediaPlayer::SetCacheSize ( size_t  size  )  [pure virtual]

Set the size of the cache, that is the number of frames in the cache.

If caching is not needed, then use 1 (default value).

virtual void CS::Media::iMediaPlayer::SetCurrentLanguage ( const char *  identifier  )  [pure virtual]

Select a language from the available ones.

virtual void CS::Media::iMediaPlayer::SetCyclic ( bool  cyclic  )  [pure virtual]

Set whether or not the media has to be played cyclically. The default value is true.

virtual void CS::Media::iMediaPlayer::SetPosition ( float  time  )  [pure virtual]

Seek the playing to a specified position in time (in seconds).

virtual void CS::Media::iMediaPlayer::Stop (  )  [pure virtual]

Stop the playing of the media and seek to the beginning.

virtual void CS::Media::iMediaPlayer::UpdatePlayer (  )  [pure virtual]

Update the media player.

This has to be called every frame.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.1 by doxygen 1.6.1