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

Media Codec. More...

List of all members.

Public Member Functions

 MediaCodec ()
virtual String GetIdentifier ()
 Identifier.
virtual uint32 GetPhysicalType ()
 Physical type.
virtual View * GetConfigurationView ()
 Configuration view.
virtual status_t Open (MediaFormat_s sInternalFormat, MediaFormat_s sExternalFormat, bool bEncode)
 Open codec.
virtual void Close ()
 Close the codec.
virtual MediaFormat_s GetInternalFormat ()
 Return internal format.
virtual MediaFormat_s GetExternalFormat ()
 Return External format.
virtual status_t CreateAudioOutputPacket (MediaPacket_s *psOutput)
 Create a media output packet for audio data.
virtual void DeleteAudioOutputPacket (MediaPacket_s *psOutput)
 Delete a media output packet for audio data.
virtual status_t CreateVideoOutputPacket (MediaPacket_s *psOutput)
 Create a media output packet for video data.
virtual void DeleteVideoOutputPacket (MediaPacket_s *psOutput)
 Delete a media output packet for video data.
virtual status_t DecodePacket (MediaPacket_s *psPacket, MediaPacket_s *psOutput)
 Decode media data.
virtual status_t ParsePacket (MediaPacket_s *psPacket, os::MediaPacket_s *psOutput)
 Parse media data.
virtual status_t EncodePacket (MediaPacket_s *psPacket, MediaPacket_s *psOutput)
 Encode media data.

Protected Member Functions

virtual ~MediaCodec ()


Detailed Description

Description:
The Media Codec class is used together with the Media Input class to decode / encode audio and video data of packet based streams.
Author:
Arno Klenke


Constructor & Destructor Documentation

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

MediaCodec::MediaCodec (  ) 


Member Function Documentation

String MediaCodec::GetIdentifier (  )  [virtual]

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

uint32 MediaCodec::GetPhysicalType (  )  [virtual]

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

View * MediaCodec::GetConfigurationView (  )  [virtual]

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

status_t MediaCodec::Open ( MediaFormat_s  sInternalFormat,
MediaFormat_s  sExternalFormat,
bool  bEncode 
) [virtual]

Description:
Opens the codec with the formats supplied by the Media Input / Output classes.
Parameters:
sInternalFormat - Internal format of the codec.
sExternalFormat - Format to which the data will be decoded or from which they will be encoded. The most common will be a raw format.
bEncode - If true then the codec will be opened for encoding, otherwise for decoding.
Author:
Arno Klenke

void MediaCodec::Close (  )  [virtual]

Description:
Closes the codec. Needs to be called when the codec is no longer used.
Author:
Arno Klenke

MediaFormat_s MediaCodec::GetInternalFormat (  )  [virtual]

Description:
Returns the internal format of the codec. Should be called after Open() to get the _real_ format.
Author:
Arno Klenke

MediaFormat_s MediaCodec::GetExternalFormat (  )  [virtual]

Description:
Returns the external format of the codec. Should be called after Open() to get the _real_ format.
Author:
Arno Klenke

status_t MediaCodec::CreateAudioOutputPacket ( MediaPacket_s psOutput  )  [virtual]

Description:
Creates a media output packet which can be used with the DecodePacket() / EncodePacket() method.
Note:
You can use this packet as often as you want.
Parameters:
psOutput - Pointer to the output packet.
Author:
Arno Klenke

void MediaCodec::DeleteAudioOutputPacket ( MediaPacket_s psOutput  )  [virtual]

Description:
Deletes a media output packet which has been created with the CreateAudioOutputPacket() method.
Parameters:
psOutput - Pointer to the output packet.
Author:
Arno Klenke

status_t MediaCodec::CreateVideoOutputPacket ( MediaPacket_s psOutput  )  [virtual]

Description:
Creates a media output packet which can be used with the DecodePacket() / EncodePacket() method.
Note:
You can use this packet as often as you want.
Parameters:
psOutput - Pointer to the output packet.
Author:
Arno Klenke

void MediaCodec::DeleteVideoOutputPacket ( MediaPacket_s psOutput  )  [virtual]

Description:
Deletes a media output packet which has been created with the CreateVideoOutputPacket() method.
Parameters:
psOutput - Pointer to the output packet.
Author:
Arno Klenke

status_t MediaCodec::DecodePacket ( MediaPacket_s psPacket,
MediaPacket_s psOutput 
) [virtual]

Description:
Decodes one packet of media data. The packet can be retrieved by calling the ReadPacket() method of a media input object. Returns 0 if successful.
Parameters:
psPacket - packet of media data.
psOutput - Output packet which has been allocated with the Create - Video / Audio - OutputPacket() method.
Author:
Arno Klenke

status_t MediaCodec::ParsePacket ( MediaPacket_s psPacket,
os::MediaPacket_s psOutput 
) [virtual]

Description:
Call this function if you want the codec to parse the media data but not to decode it. This can be useful if you want to decode video data but the computer is to slow to do it in realtime and you want to drop frames.
Parameters:
psPacket - packet of media data.
Note:
If the codec does not implement this method then DecodePacket() will be called.
Parameters:
psPacket - packet of media data.
psOutput - Output packet which has been allocated with the Create - Video / Audio - OutputPacket() method.
Author:
Arno Klenke

status_t MediaCodec::EncodePacket ( MediaPacket_s psPacket,
MediaPacket_s psOutput 
) [virtual]

Description:
Encodes one packet of media data. The packet can be retrieved by calling the ReadPacket() method of a media input object. Returns 0 if successful.
Parameters:
psPacket - packet of media data.
psOutput - Output packet which has been allocated with the Create - Video / Audio - OutputPacket() method.
Author:
Arno Klenke


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