- MultiMedia_MediaCommon
- Overview
- Summary
- Files
- Data Structures
- Enumerations
- Functions
- Details
- Enumeration Type Documentation
- AudioBitWidth
- AudioCodecFormat
- AudioSourceType
- AudioStreamType
- BufferFlags
- FormatDataType
- SourceType
- VideoCodecFormat
- Function Documentation
- CopyFrom()
- ErrCodeOffset()
- Format()
- GetBuffer()
- GetDoubleValue() [1/2]
- GetDoubleValue() [2/2]
- GetFloatValue() [1/2]
- GetFloatValue() [2/2]
- GetFormatMap()
- GetInt32Value()
- GetInt64Value()
- GetIntValue()
- GetLongValue()
- GetSourceHeader()
- GetSourceStream()
- GetSourceStreamFormat()
- GetSourceType()
- GetSourceUri()
- GetStringValue() [1/2]
- GetStringValue() [2/2]
- GetType()
- OnBufferAvailable()
- PutDoubleValue()
- PutFloatValue()
- PutIntValue()
- PutLongValue()
- PutStringValue()
- QueueBuffer()
- SetParameters()
- SetStreamCallback()
- SetValue() [1/5]
- SetValue() [2/5]
- SetValue() [3/5]
- SetValue() [4/5]
- SetValue() [5/5]
- Source() [1/3]
- Source() [2/3]
- Source() [3/3]
- Variable Documentation
- BITRATE_MODE_CBR
- BITRATE_MODE_CQ
- BITRATE_MODE_VBR
- CODEC_MIME
- COLOR_FORMAT_ARGB8888_32BIT
- COLOR_FORMAT_YUV420SP
- deviceId
- deviceName
- ERR_EARLY_PREPARE
- ERR_ILLEGAL_STATE
- ERR_INVALID_OPERATION
- ERR_INVALID_PARAM
- ERR_INVALID_READ
- ERR_NOFREE_CHANNEL
- ERR_NOT_STARTED
- ERR_READ_BUFFER
- ERR_SOURCE_NOT_SET
- ERR_UNKNOWN
- ERROR
- inputSourceType
- KEY_IS_SYNC_FRAME
- KEY_TIME_US
- MIME_AUDIO_AAC
- MIME_AUDIO_RAW
- SUCCESS
MultiMedia_MediaCommon
Overview
Provides data types and media formats required for recording and playing audio and videos.
Since:
1.0
Version:
1.0
Summary
Files
Data Structures
Saves and sets media metadata, such as the media playback duration. |
|
Provides functions to obtain the address of a buffer memory and write the filled buffers into the playback queue. You need to implement the StreamCallback functions in a player object. |
|
Provides functions related to the stream source for upper-layer applications. |
|
Enumerations
Functions
OHOS::Media::FormatData::GetType () const |
|
OHOS::Media::FormatData::SetValue (int32_t val) |
|
OHOS::Media::FormatData::SetValue (int64_t val) |
|
OHOS::Media::FormatData::SetValue (float val) |
|
OHOS::Media::FormatData::SetValue (double val) |
|
OHOS::Media::FormatData::SetValue (const std::string &val) |
|
OHOS::Media::FormatData::GetInt32Value (int32_t &val) const |
|
OHOS::Media::FormatData::GetInt64Value (int64_t &val) const |
|
OHOS::Media::FormatData::GetFloatValue (float &val) const |
|
OHOS::Media::FormatData::GetDoubleValue (double &val) const |
|
OHOS::Media::FormatData::GetStringValue (std::string &val) const |
|
Default constructor of the Format instance. |
|
OHOS::Media::Format::PutIntValue (const std::string &key, int32_t value) |
|
OHOS::Media::Format::PutLongValue (const std::string &key, int64_t value) |
|
OHOS::Media::Format::PutFloatValue (const std::string &key, float value) |
|
OHOS::Media::Format::PutDoubleValue (const std::string &key, double value) |
|
OHOS::Media::Format::PutStringValue (const std::string &key, const std::string &value) |
|
OHOS::Media::Format::GetIntValue (const std::string &key, int32_t &value) const |
|
OHOS::Media::Format::GetLongValue (const std::string &key, int64_t &value) const |
|
OHOS::Media::Format::GetFloatValue (const std::string &key, float &value) const |
Obtains the metadata value of the single-precision floating-point type. |
OHOS::Media::Format::GetDoubleValue (const std::string &key, double &value) const |
Obtains the metadata value of the double-precision floating-point type. |
OHOS::Media::Format::GetStringValue (const std::string &key, std::string &value) const |
|
OHOS::Media::Format::GetFormatMap () const |
const std::map< std::string, FormatData > & |
OHOS::Media::Format::CopyFrom (const Format &format) |
|
OHOS::Media::ErrCodeOffset (unsigned int subsystem, unsigned int module=0) |
Generates a start error code with a unique identifier based on specified subsystem and module bit numbers. |
OHOS::Media::StreamCallback::GetBuffer (size_t index)=0 |
Obtains the virtual address of a buffer memory block based on its index. |
OHOS::Media::StreamCallback::QueueBuffer (size_t index, size_t offset, size_t size, int64_t timestampUs, uint32_t flags)=0 |
Writes the filled buffer memory block into the player memory. |
OHOS::Media::StreamCallback::SetParameters (const Format ¶ms)=0 |
|
OHOS::Media::StreamSource::OnBufferAvailable (size_t index, size_t offset, size_t size)=0 |
Notifies your application of the information about the buffer memory block that can be filled with data. |
OHOS::Media::StreamSource::SetStreamCallback (const std::shared_ptr< StreamCallback > &callback)=0 |
|
OHOS::Media::Source::Source (const std::string &uri) |
A constructor used to create a Source instance based on a specified URI. |
OHOS::Media::Source::Source (const std::string &uri, const std::map< std::string, std::string > &header) |
A constructor used to create a Source instance based on a specified URI and header. |
OHOS::Media::Source::Source (const std::shared_ptr< StreamSource > &stream, const Format &formats) |
A constructor used to create a Source instance based on the stream source and format information. |
OHOS::Media::Source::GetSourceType () const |
|
OHOS::Media::Source::GetSourceUri () const |
|
OHOS::Media::Source::GetSourceHeader () const |
|
OHOS::Media::Source::GetSourceStream () const |
const std::shared_ptr< StreamSource > & |
const Format & |
Details
Enumeration Type Documentation
AudioBitWidth
enum [AudioBitWidth]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#gae3e35ee2a2222a667fdebbc5b793ca7c)
Description:
Enumerates audio bit widths.
BIT_WIDTH_8 | |
BIT_WIDTH_16 | |
BIT_WIDTH_24 | |
BIT_WIDTH_BUTT |
AudioCodecFormat
enum [AudioCodecFormat]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#gaa4ea6f314644ed287e0704be26c768b7)
Description:
Enumerates audio codec formats.
AUDIO_DEFAULT | |
AAC_LC | |
AAC_HE_V1 | High-Efficiency Advanced Audio Coding (AAC-HE), previously known as AAC+ or aacPlus v1 |
AAC_HE_V2 | |
AAC_LD | |
AAC_ELD | |
FORMAT_BUTT |
AudioSourceType
enum [AudioSourceType]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#gadc3158e093b995ca7b9b6aa32388ccdd)
Description:
Enumerates audio source types.
AudioStreamType
enum [AudioStreamType]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#gae7077e4211e48131ae544adb20fc494a)
Description:
Enumerates audio stream types.
TYPE_DEFAULT | |
TYPE_MEDIA | |
TYPE_VOICE_COMMUNICATION | |
TYPE_SYSTEM | |
TYPE_RING | |
TYPE_MUSIC | |
TYPE_ALARM | |
TYPE_NOTIFICATION | |
TYPE_BLUETOOTH_SCO | |
TYPE_ENFORCED_AUDIBLE | |
TYPE_DTMF | |
TYPE_TTS | |
TYPE_ACCESSIBILITY |
BufferFlags
enum [OHOS::Media::StreamCallback::BufferFlags]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#ga6f4847f443de5cdf3641386011335e21) : uint32_t
Description:
Enumerates buffer types of stream sources.
FormatDataType
enum [OHOS::Media::FormatDataType]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#gaa3bfacc6563d8ec8bc870f4b216b4f46) : uint32_t
Description:
Enumerates formats.
FORMAT_TYPE_NONE | |
FORMAT_TYPE_INT32 | |
FORMAT_TYPE_INT64 | |
FORMAT_TYPE_FLOAT | |
FORMAT_TYPE_DOUBLE | |
FORMAT_TYPE_STRING |
SourceType
enum [OHOS::Media::SourceType]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#ga4052b7b55dfd94f1d07678e79d80b507) : int32_t
Description:
Enumerates media source types.
SOURCE_TYPE_URI | |
SOURCE_TYPE_FD | |
SOURCE_TYPE_STREAM | Stream data, such as Advanced Audio Coding (AAC) stream data |
VideoCodecFormat
enum [VideoCodecFormat]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#ga797e6c5e38e23e730eff5bcc41427d7e)
Description:
Enumerates video codec formats.
VIDEO_DEFAULT | |
H264 | |
HEVC |
Function Documentation
CopyFrom()
bool OHOS::Media::Format::CopyFrom (const [Format]($api-api-SmartVision-Devices-OHOS-Media-Format.md) & format)
Description:
Sets all metadata to a specified format.
Parameters:
format | Indicates the format. For details, see Format. |
Returns:
Returns true if the setting is successful; returns false otherwise.
ErrCodeOffset()
constexpr ErrCode OHOS::Media::ErrCodeOffset (unsigned int subsystem, unsigned int module = [/topic/body/section/screen/code
{""}) 0 (code] )
Description:
Generates a start error code with a unique identifier based on specified subsystem and module bit numbers.
Parameters:
subsystem | Indicates the subsystem bit number. |
module | Indicates the module bit number. |
Returns:
Format()
OHOS::Media::Format::Format ()
Description:
Default constructor of the Format instance.
GetBuffer()
virtual uint8_t* OHOS::Media::StreamCallback::GetBuffer (size_t index)
Description:
Obtains the virtual address of a buffer memory block based on its index.
Parameters:
index | Indicates the index of the buffer memory block. |
Returns:
Returns the pointer to the virtual address of the buffer memory block.
GetDoubleValue() [1/2]
bool OHOS::Media::Format::GetDoubleValue (const std::string & key, double & value ) const
Description:
Obtains the metadata value of the double-precision floating-point type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value to obtain, which is a double-precision floating-point number. |
Returns:
Returns true if the double-precision number is successfully obtained; returns false otherwise.
GetDoubleValue() [2/2]
bool OHOS::Media::FormatData::GetDoubleValue (double & val) const
Description:
Obtains a double-precision floating-point number.
Parameters:
val | Indicates the double-precision floating-point number to obtain. |
Returns:
Returns true if the double-precision number is successfully obtained; returns false otherwise.
GetFloatValue() [1/2]
bool OHOS::Media::Format::GetFloatValue (const std::string & key, float & value ) const
Description:
Obtains the metadata value of the single-precision floating-point type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value to obtain, which is a single-precision floating-point number. |
Returns:
Returns true if the single-precision number is successfully obtained; returns false otherwise.
GetFloatValue() [2/2]
bool OHOS::Media::FormatData::GetFloatValue (float & val) const
Description:
Obtains a single-precision floating-point number.
Parameters:
val | Indicates the single-precision floating-point number to obtain. |
Returns:
Returns true if the single-precision number is successfully obtained; returns false otherwise.
GetFormatMap()
const std::map<std::string, [FormatData]($api-api-SmartVision-Devices-OHOS-Media-FormatData.md) *>& OHOS::Media::Format::GetFormatMap () const
Description:
Obtains the metadata map.
Returns:
Returns the map object.
GetInt32Value()
bool OHOS::Media::FormatData::GetInt32Value (int32_t & val) const
Description:
Obtains a 32-bit integer.
Parameters:
val | Indicates the 32-bit integer to obtain. |
Returns:
Returns true if the integer is successfully obtained; returns false otherwise.
GetInt64Value()
bool OHOS::Media::FormatData::GetInt64Value (int64_t & val) const
Description:
Obtains a long integer.
Parameters:
val | Indicates the long integer to obtain. |
Returns:
Returns true if the integer is successfully obtained; returns false otherwise.
GetIntValue()
bool OHOS::Media::Format::GetIntValue (const std::string & key, int32_t & value ) const
Description:
Obtains the metadata value of the integer type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value to obtain, which is a 32-bit integer. |
Returns:
Returns true if the integer is successfully obtained; returns false otherwise.
GetLongValue()
bool OHOS::Media::Format::GetLongValue (const std::string & key, int64_t & value ) const
Description:
Obtains the metadata value of the long integer type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value to obtain, which is a 64-bit long integer. |
Returns:
Returns true if the integer is successfully obtained; returns false otherwise.
GetSourceHeader()
const std::map<std::string, std::string>& OHOS::Media::Source::GetSourceHeader () const
Description:
Obtains the HTTP header for the media source.
This function is called only when the SourceType is SOURCE_TYPE_URI.
Returns:
Returns the media source header.
GetSourceStream()
const std::shared_ptr<[StreamSource]($api-api-SmartVision-Devices-OHOS-Media-StreamSource.md)>& OHOS::Media::Source::GetSourceStream () const
Description:
Obtains information about the media source stream.
This function is called only when the SourceType is SOURCE_TYPE_STREAM.
Returns:
Returns information about the media source stream. For details, see StreamSource.
GetSourceStreamFormat()
const [Format]($api-api-SmartVision-Devices-OHOS-Media-Format.md)& OHOS::Media::Source::GetSourceStreamFormat () const
Description:
Obtains the media source stream format.
Returns:
Returns the media source stream format. For details, see Format.
GetSourceType()
[SourceType]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#ga4052b7b55dfd94f1d07678e79d80b507) OHOS::Media::Source::GetSourceType () const
Description:
Obtains the source type.
Returns:
Returns the source type. For details, see SourceType.
GetSourceUri()
const std::string& OHOS::Media::Source::GetSourceUri () const
Description:
Obtains the media source URI.
This function is called only when the SourceType is SOURCE_TYPE_URI.
Returns:
Returns the media source URI.
GetStringValue() [1/2]
bool OHOS::Media::Format::GetStringValue (const std::string & key, std::string & value ) const
Description:
Obtains the metadata value of the string type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value to obtain, which is a string. |
Returns:
Returns true if the string is successfully obtained; returns false otherwise.
GetStringValue() [2/2]
bool OHOS::Media::FormatData::GetStringValue (std::string & val) const
Description:
Obtains a string.
Parameters:
val | Indicates the string to obtain. |
Returns:
Returns true if the string is successfully obtained; returns false otherwise.
GetType()
[FormatDataType]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#gaa3bfacc6563d8ec8bc870f4b216b4f46) OHOS::Media::FormatData::GetType () const
Description:
Obtains the format type.
Returns:
Returns the format type. For details, see OHOS::Media::FormatDataType.
OnBufferAvailable()
virtual void OHOS::Media::StreamSource::OnBufferAvailable (size_t index, size_t offset, size_t size )
Description:
Notifies your application of the information about the buffer memory block that can be filled with data.
Parameters:
index | Indicates the index of the buffer memory block. |
offset | Indicates the start offset into which the data will be written. |
size | Indicates the size of data that the buffer memory block can store. |
PutDoubleValue()
bool OHOS::Media::Format::PutDoubleValue (const std::string & key, double value )
Description:
Sets metadata of the double-precision floating-point type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value, which is a double-precision floating-point number. |
Returns:
Returns true if the setting is successful; returns false otherwise.
PutFloatValue()
bool OHOS::Media::Format::PutFloatValue (const std::string & key, float value )
Description:
Sets metadata of the single-precision floating-point type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value, which is a single-precision floating-point number. |
Returns:
Returns true if the metadata is successfully set; returns false otherwise.
PutIntValue()
bool OHOS::Media::Format::PutIntValue (const std::string & key, int32_t value )
Description:
Sets metadata of the integer type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value, which is a 32-bit integer. |
Returns:
Returns true if the setting is successful; returns false otherwise.
PutLongValue()
bool OHOS::Media::Format::PutLongValue (const std::string & key, int64_t value )
Description:
Sets metadata of the long integer type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value, which is a 64-bit integer. |
Returns:
Returns true if the setting is successful; returns false otherwise.
PutStringValue()
bool OHOS::Media::Format::PutStringValue (const std::string & key, const std::string & value )
Description:
Sets metadata of the string type.
Parameters:
key | Indicates the metadata key. |
value | Indicates the metadata value, which is a string. |
Returns:
Returns true if the metadata is successfully set; returns false otherwise.
QueueBuffer()
virtual void OHOS::Media::StreamCallback::QueueBuffer (size_t index, size_t offset, size_t size, int64_t timestampUs, uint32_t flags )
Description:
Writes the filled buffer memory block into the player memory.
Parameters:
index | Indicates the index of the buffer memory block. |
offset | Indicates the start offset into which the buffer memory block will be written. |
size | Indicates the size of the data filled in the buffer memory block. |
timestampUs | Indicates the timestamp of the frame filled in the buffer memory block. As data in AAC streams can be filled not on a frame basis, set this parameter to 0 for AAC streams. |
flags | Indicates the type of the current buffer memory block. For details, see BufferFlags. |
SetParameters()
virtual void OHOS::Media::StreamCallback::SetParameters (const [Format]($api-api-SmartVision-Devices-OHOS-Media-Format.md) & params)
Description:
Sets additional information about a stream.
Parameters:
params | Indicates the parameters for additional stream information. For details, see Format. |
SetStreamCallback()
virtual void OHOS::Media::StreamSource::SetStreamCallback (const std::shared_ptr< [StreamCallback]($api-api-SmartVision-Devices-OHOS-Media-StreamCallback.md) > & callback)
Description:
Sets a callback function for your application.
Parameters:
callback | Indicates the StreamCallback function to set. |
SetValue() [1/5]
bool OHOS::Media::FormatData::SetValue (const std::string & val)
Description:
Sets a string.
Parameters:
val | Indicates the string to set. |
Returns:
Returns true if the setting is successful; returns false otherwise.
SetValue() [2/5]
bool OHOS::Media::FormatData::SetValue (double val)
Description:
Sets a double-precision floating-point number.
Parameters:
val | Indicates the double-precision floating-point number to set. |
Returns:
Returns true if the double-precision floating-point number is successfully set; returns false otherwise.
SetValue() [3/5]
bool OHOS::Media::FormatData::SetValue (float val)
Description:
Sets a single-precision floating-point number.
Parameters:
val | Indicates the single-precision floating-point number to set. |
Returns:
Returns true if the setting is successful; returns false otherwise.
SetValue() [4/5]
bool OHOS::Media::FormatData::SetValue (int32_t val)
Description:
Sets a 32-bit integer.
Parameters:
val | Indicates the 32-bit integer to set. |
Returns:
Returns true if the setting is successful; returns false otherwise.
SetValue() [5/5]
bool OHOS::Media::FormatData::SetValue (int64_t val)
Description:
Sets a 64-bit long integer.
Parameters:
val | Indicates the 64-bit long integer to set. |
Returns:
Returns true if the setting is successful; returns false otherwise.
Source() [1/3]
OHOS::Media::Source::Source (const std::shared_ptr< [StreamSource]($api-api-SmartVision-Devices-OHOS-Media-StreamSource.md) > & stream, const [Format]($api-api-SmartVision-Devices-OHOS-Media-Format.md) & formats )
Description:
A constructor used to create a Source instance based on the stream source and format information.
Parameters:
stream | Indicates the media source stream. For details, see StreamSource. |
formats | Indicates stream data information, which is subject to the stream type. For example, the key is CODEC_MIME, and the value is MIME_AUDIO_AAC. For details, see Format. This parameter can be null if no information needs to be passed. |
Source() [2/3]
OHOS::Media::Source::Source (const std::string & uri)
Description:
A constructor used to create a Source instance based on a specified URI.
Parameters:
uri | Indicates the media source URI, which can be a network URI or local file path. |
Source() [3/3]
OHOS::Media::Source::Source (const std::string & uri, const std::map< std::string, std::string > & header )
Description:
A constructor used to create a Source instance based on a specified URI and header.
If the HTTP URL header does not carry valid information for network playback, this function is equivalent to Source(const std::string& uri).
Parameters:
uri | Indicates the media source URI. |
header | Indicates the header. |
Variable Documentation
BITRATE_MODE_CBR
const int BITRATE_MODE_CBR = 2
Description:
Indicates the constant bit rate mode. In this mode, the codec keeps the output bit rate as constant as possible.
BITRATE_MODE_CQ
const int BITRATE_MODE_CQ = 0
Description:
Indicates the constant quality mode. In this mode, the bit rate is not limited to guarantee the image quality to the largest extent.
BITRATE_MODE_VBR
const int BITRATE_MODE_VBR = 1
Description:
Indicates the variable bit rate mode. In this mode, the codec dynamically adjusts the output bit rate based on the image complexity. The codec increases the bit rate if the image is complex and decreases the bit rate if the image is simple.
CODEC_MIME
const char* OHOS::Media::CODEC_MIME
Description:
Indicates the key representing the codec type.
COLOR_FORMAT_ARGB8888_32BIT
const int32_t COLOR_FORMAT_ARGB8888_32BIT = 16
Description:
Indicates the ARGB8888 color format.
COLOR_FORMAT_YUV420SP
const int32_t COLOR_FORMAT_YUV420SP = 21
Description:
Indicates the YUV420SP color format.
deviceId
uint32_t AudioDeviceDesc::deviceId
Description:
Bits 31-24: reserved bits; bits 23-16: mode ID; bits 15-8: device ID; bits 7-0: channel ID
deviceName
std::string AudioDeviceDesc::deviceName
Description:
Device name
ERR_EARLY_PREPARE
const int32_t OHOS::Media::ERR_EARLY_PREPARE = BASE_MEDIA_ERR_OFFSET + 3
Description:
Early media preparation
ERR_ILLEGAL_STATE
const int32_t OHOS::Media::ERR_ILLEGAL_STATE = BASE_MEDIA_ERR_OFFSET + 1
Description:
Status error
ERR_INVALID_OPERATION
const int32_t OHOS::Media::ERR_INVALID_OPERATION = BASE_MEDIA_ERR_OFFSET + 5
Description:
Invalid operation
ERR_INVALID_PARAM
const int32_t OHOS::Media::ERR_INVALID_PARAM = BASE_MEDIA_ERR_OFFSET + 2
Description:
Invalid parameter
ERR_INVALID_READ
const int32_t OHOS::Media::ERR_INVALID_READ = -1
Description:
Invalid data size that has been read
ERR_NOFREE_CHANNEL
const int32_t OHOS::Media::ERR_NOFREE_CHANNEL = BASE_MEDIA_ERR_OFFSET + 6
Description:
No idle channel
ERR_NOT_STARTED
const int32_t OHOS::Media::ERR_NOT_STARTED = BASE_MEDIA_ERR_OFFSET + 8
Description:
Device not started
ERR_READ_BUFFER
const int32_t OHOS::Media::ERR_READ_BUFFER = BASE_MEDIA_ERR_OFFSET + 7
Description:
Buffer reading failed
ERR_SOURCE_NOT_SET
const int32_t OHOS::Media::ERR_SOURCE_NOT_SET = BASE_MEDIA_ERR_OFFSET + 4
Description:
No media source
ERR_UNKNOWN
const int32_t OHOS::Media::ERR_UNKNOWN = BASE_MEDIA_ERR_OFFSET + 200
Description:
Unknown error
ERROR
const int32_t OHOS::Media::ERROR = BASE_MEDIA_ERR_OFFSET
Description:
Fail
inputSourceType
[AudioSourceType]($api-api-SmartVision-Devices-MultiMedia_MediaCommon.md#gadc3158e093b995ca7b9b6aa32388ccdd) AudioDeviceDesc::inputSourceType
Description:
Type of the audio input source
KEY_IS_SYNC_FRAME
const std::string KEY_IS_SYNC_FRAME = "is-sync-frame"
Description:
Indicates that the current frame is an Instantaneous Decoder Refresh (IDR) frame.
KEY_TIME_US
const std::string KEY_TIME_US = "timeUs"
Description:
Indicates the frame timestamp.
MIME_AUDIO_AAC
const char* OHOS::Media::MIME_AUDIO_AAC
Description:
Indicates the codec for Advanced Audio Coding (AAC) streams, which is a value of the codec type key.
MIME_AUDIO_RAW
const char* OHOS::Media::MIME_AUDIO_RAW
Description:
Indicates the codec for RAW audios (not supported yet), which is a value of the codec type key.
SUCCESS
const int32_t OHOS::Media::SUCCESS = 0
Description:
Success