os::MediaInput Class Reference
[The Syllable Media API]

Media Input. More...

List of all members.

Public Member Functions

 MediaInput ()
virtual String GetIdentifier ()
 Identifier.
virtual uint32 GetPhysicalType ()
 Physical type.
virtual View * GetConfigurationView ()
 Configuration view.
virtual bool FileNameRequired ()
 Filename required.
virtual status_t Open (String zFileName)
 Open one device / file.
virtual void Close ()
 Close the device / file.
virtual void Clear ()
 Clear the input.
virtual bool PacketBased ()
 Whether the device / file is packet based.
virtual bool StreamBased ()
 Whether the device / file is stream based.
virtual uint32 GetTrackCount ()
 Number of tracks.
virtual uint32 SelectTrack (uint32 nTrack)
 Select one track.
virtual String GetTitle ()
 Title.
virtual String GetAuthor ()
 Author.
virtual String GetAlbum ()
 Album.
virtual String GetComment ()
 Comment.
virtual uint32 GetStreamCount ()
 Stream number.
virtual MediaFormat_s GetStreamFormat (uint32 nIndex)
 Return the format of one stream.
virtual status_t ReadPacket (MediaPacket_s *psPacket)
 Read one packet.
virtual void FreePacket (MediaPacket_s *psPacket)
 Free one packet.
virtual status_t StartTrack ()
 Start track.
virtual void StopTrack ()
 Stop track.
virtual uint64 GetLength ()
 Length of the device / file.
virtual uint64 GetCurrentPosition ()
 Current position of the device / file.
virtual uint64 Seek (uint64 nPosition)
 Seek.

Protected Member Functions

virtual ~MediaInput ()


Detailed Description

Description:
The Media Input class can be used standalone for non packet based files / devices. For packet based files it is used to split the media file into various streams which can be transcoded by the Media Codec class.
Author:
Arno Klenke


Constructor & Destructor Documentation

MediaInput::~MediaInput (  )  [protected, virtual]

MediaInput::MediaInput (  ) 


Member Function Documentation

String MediaInput::GetIdentifier (  )  [virtual]

Description:
Returns the identifier of the object.
Author:
Arno Klenke

uint32 MediaInput::GetPhysicalType (  )  [virtual]

Description:
Returns the physical type of the device.
Author:
Arno Klenke

View * MediaInput::GetConfigurationView (  )  [virtual]

Description:
Returns a view which includes configuration controls or NULL if this is not supported.
Author:
Arno Klenke

bool MediaInput::FileNameRequired (  )  [virtual]

Description:
Returns true if a filename for the Open() method is required.
Author:
Arno Klenke

status_t MediaInput::Open ( String  zFileName  )  [virtual]

Description:
Opens one device or file. Returns true if successful.
Parameters:
zFileName - Filename of the device / file if FileNameRequired() returns true. This parameter might also be used to pass parameters to the input.
Author:
Arno Klenke

void MediaInput::Close (  )  [virtual]

Description:
Closes the opened device or file. Needs to be called when the input is no longer used.
Author:
Arno Klenke

void MediaInput::Clear (  )  [virtual]

Description:
Clears all caches of the input.
Author:
Arno Klenke

bool MediaInput::PacketBased (  )  [virtual]

Description:
When this method returns true then the ReadPacket() / FreePacket() methods are valid. Otherwise you have to use the *Track() methods.
Author:
Arno Klenke

bool MediaInput::StreamBased (  )  [virtual]

Description:
When this method returns true then the GetLength(), GetCurrentPosition() and Seek() members are not valid.
Author:
Arno Klenke

uint32 MediaInput::GetTrackCount (  )  [virtual]

Description:
Returns the number of tracks.
Author:
Arno Klenke

uint32 MediaInput::SelectTrack ( uint32  nTrack  )  [virtual]

Description:
Selects one track of the device / file ( The first track is Track 0 ). Returns the now selected track.
Note:
The input will decide if it seeks to the start.
Parameters:
nTrack - Selected track.
Author:
Arno Klenke

String MediaInput::GetTitle (  )  [virtual]

Description:
Returns the title or ""
Author:
Arno Klenke

String MediaInput::GetAuthor (  )  [virtual]

Description:
Returns the author or ""
Author:
Arno Klenke

String MediaInput::GetAlbum (  )  [virtual]

Description:
Returns the album or ""
Author:
Arno Klenke

String MediaInput::GetComment (  )  [virtual]

Description:
Returns a comment or ""
Author:
Arno Klenke

uint32 MediaInput::GetStreamCount (  )  [virtual]

Description:
Returns the number of streams inside packet based devices / files.
Author:
Arno Klenke

MediaFormat_s MediaInput::GetStreamFormat ( uint32  nIndex  )  [virtual]

Description:
Returns the format of one stream.
Parameters:
nIndex - Index of the stream.
Author:
Arno Klenke

status_t MediaInput::ReadPacket ( MediaPacket_s psPacket  )  [virtual]

Description:
Reads one packet of media data. Returns 0 if successful.
Parameters:
psPacket - pointer to the packet which is filled wit the data.
Author:
Arno Klenke

void MediaInput::FreePacket ( MediaPacket_s psPacket  )  [virtual]

Description:
Frees one packet of media data. Call it if the packet is no longer used.
Note:
Not calling this method can cause memory leaks!
Author:
Arno Klenke

status_t MediaInput::StartTrack (  )  [virtual]

Description:
Starts the selected track of non packet based devices / files.
Author:
Arno Klenke

void MediaInput::StopTrack (  )  [virtual]

Description:
Stops the selected track of non packet based devices / files.
Author:
Arno Klenke

uint64 MediaInput::GetLength (  )  [virtual]

Description:
Returns the length of the device / file in seconds.
Author:
Arno Klenke

uint64 MediaInput::GetCurrentPosition (  )  [virtual]

Description:
Returns the current position of the device / files.
Author:
Arno Klenke

uint64 MediaInput::Seek ( uint64  nPosition  )  [virtual]

Description:
Seeks inside one device / file. Returns the position the device / file was seeked to.
Note:
Non packet based devices will start playing after seeking!
Parameters:
nPosition - Position the device / file should seek to.
Author:
Arno Klenke


Generated on Sat May 9 22:49:20 2009 for Syllable Media API by  doxygen 1.5.1