Class AudioMediaFormat
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.dll
Represents an audio media format. This class cannot be inherited.
C#Copypublic sealed class AudioMediaFormat : MediaFormat
- Inheritance
Constructors
AudioMediaFormat(MediaFormatAudioMimeType, int, int, int, int, int, IList<MediaFormatAudioChannelPosition>)
Initializes a new instance of the AudioMediaFormat class with the specified mime type, channel, sample rate, bit, bit rate, bit depth, and audio channel map.
Declaration
C#Copypublic AudioMediaFormat(MediaFormatAudioMimeType mimeType, int channel, int sampleRate, int bit, int bitRate, int bitDepth, IList<MediaFormatAudioChannelPosition> audioChannelMap)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaFormatAudioMimeType | mimeType | The mime type of the format. |
| int | channel | The channel value of the format. |
| int | sampleRate | The sample rate value of the format. |
| int | bit | The bit value of the format. |
| int | bitRate | The bit rate value of the format. |
| int | bitDepth | The bit depth value of the PCM audio format. |
| System.Collections.Generic.IList<T><MediaFormatAudioChannelPosition> | audioChannelMap | The loudspeaker position in PCM audio format. |
Remarks
If audioChannelMap contains None,
channel should be set greater than 0.
If audioChannelMap contains Mono,
channel should be set 1.
User can not set None with another channel positions.
User can not set Mono with another channel positions.
If same channel position is added in audioChannelMap more than once, the duplicaiton will be removed.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException |
|
| System.ArgumentException |
|
| System.ArgumentOutOfRangeException |
|
AudioMediaFormat(MediaFormatAudioMimeType, int, int, int, int, MediaFormatAacType, int, IList<MediaFormatAudioChannelPosition>)
Initializes a new instance of the AudioMediaFormat class with the specified mime type, channel, sample rate, bit, bit rate, bit depth, and audio channel map.
Declaration
C#Copypublic AudioMediaFormat(MediaFormatAudioMimeType mimeType, int channel, int sampleRate, int bit, int bitRate, MediaFormatAacType aacType, int bitDepth, IList<MediaFormatAudioChannelPosition> audioChannelMap)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaFormatAudioMimeType | mimeType | The mime type of the format. |
| int | channel | The channel value of the format. |
| int | sampleRate | The sample rate value of the format. |
| int | bit | The bit value of the format. |
| int | bitRate | The bit rate value of the format. |
| MediaFormatAacType | aacType | The AAC bitstream format(ADIF or ADTS). |
| int | bitDepth | The bit depth value of the PCM audio format. |
| System.Collections.Generic.IList<T><MediaFormatAudioChannelPosition> | audioChannelMap | The loudspeaker position in PCM audio format. |
Remarks
If audioChannelMap contains None,
channel should be set greater than 0.
If audioChannelMap contains Mono,
channel should be set 1.
User can not set None with another channel positions.
User can not set Mono with another channel positions.
If same channel position is added in audioChannelMap more than twice, its duplicaiton will be removed.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException |
|
| System.ArgumentException |
|
| System.ArgumentOutOfRangeException |
|
AudioMediaFormat(MediaFormatAudioMimeType, int, int, int, int, MediaFormatAacType)
Initializes a new instance of the AudioMediaFormat class with the specified mime type, channel, sample rate, bit, bit rate, and AAC type.
Declaration
C#Copypublic AudioMediaFormat(MediaFormatAudioMimeType mimeType, int channel, int sampleRate, int bit, int bitRate, MediaFormatAacType aacType)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaFormatAudioMimeType | mimeType | The mime type of the format. |
| int | channel | The channel value of the format. |
| int | sampleRate | The sample rate value of the format. |
| int | bit | The bit value of the format. |
| int | bitRate | The bit rate value of the format. |
| MediaFormatAacType | aacType | The AAC bitstream format(ADIF or ADTS). |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException |
|
| System.ArgumentOutOfRangeException |
|
AudioMediaFormat(MediaFormatAudioMimeType, int, int, int, int)
Initializes a new instance of the AudioMediaFormat class with the specified mime type, channel, sample rate, bit, and bit rate.
Declaration
C#Copypublic AudioMediaFormat(MediaFormatAudioMimeType mimeType, int channel, int sampleRate, int bit, int bitRate)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaFormatAudioMimeType | mimeType | The mime type of the format. |
| int | channel | The channel value of the format. |
| int | sampleRate | The sample rate value of the format. |
| int | bit | The bit value of the format. |
| int | bitRate | The bit rate value of the format. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException |
|
| System.ArgumentOutOfRangeException |
|
Properties
Declaration
C#Copypublic MediaFormatAacType AacType { get; }
Property Value
| Type | Description |
|---|---|
| MediaFormatAacType |
Declaration
C#Copypublic ReadOnlyCollection<MediaFormatAudioChannelPosition> AudioChannelMap { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.ObjectModel.ReadOnlyCollection<T><MediaFormatAudioChannelPosition> |
Remarks
The channel mask specifies the mapping of channels to speakers. default value is 0.
Declaration
C#Copypublic int Bit { get; }
Property Value
| Type | Description |
|---|---|
| int |
Declaration
C#Copypublic int BitDepth { get; }
Property Value
| Type | Description |
|---|---|
| int |
Declaration
C#Copypublic int BitRate { get; }
Property Value
| Type | Description |
|---|---|
| int |
Declaration
C#Copypublic int Channel { get; }
Property Value
| Type | Description |
|---|---|
| int |
Declaration
C#Copypublic MediaFormatAudioMimeType MimeType { get; }
Property Value
| Type | Description |
|---|---|
| MediaFormatAudioMimeType |
Declaration
C#Copypublic int SampleRate { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Declaration
C#Copypublic override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | A object to compare. |
Returns
| Type | Description |
|---|---|
| bool | true if the formats are equal; otherwise, false. |
Overrides
Declaration
C#Copypublic override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | The hash code for this instance of AudioMediaFormat. |
Overrides
Declaration
C#Copypublic override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |