OHOS::Media::Format

Overview

Related Modules:

MultiMedia_MediaCommon

Description:

Saves and sets media metadata, such as the media playback duration.

Since:

1.0

Version:

1.0

Summary

Public Member Functions

Public Member Function Name

Description

Format ()

 

Default constructor of the Format instance.

PutIntValue (const std::string &key, int32_t value)

bool 

Sets metadata of the integer type.

PutLongValue (const std::string &key, int64_t value)

bool 

Sets metadata of the long integer type.

PutFloatValue (const std::string &key, float value)

bool 

Sets metadata of the single-precision floating-point type.

PutDoubleValue (const std::string &key, double value)

bool 

Sets metadata of the double-precision floating-point type.

PutStringValue (const std::string &key, const std::string &value)

bool 

Sets metadata of the string type.

GetIntValue (const std::string &key, int32_t &value) const

bool 

Obtains the metadata value of the integer type.

GetLongValue (const std::string &key, int64_t &value) const

bool 

Obtains the metadata value of the long integer type.

GetFloatValue (const std::string &key, float &value) const

bool 

Obtains the metadata value of the single-precision floating-point type.

GetDoubleValue (const std::string &key, double &value) const

bool 

Obtains the metadata value of the double-precision floating-point type.

GetStringValue (const std::string &key, std::string &value) const

bool 

Obtains the metadata value of the string type.

GetFormatMap () const

const std::map< std::string, FormatData * > & 

Obtains the metadata map.

CopyFrom (const Format &format)

bool 

Sets all metadata to a specified format.