NaCl Player API
NaCl Player API Documentation
Samsung::NaClPlayer::AudioElementaryStream Class Reference

#include <es_data_source.h>

Inheritance diagram for Samsung::NaClPlayer::AudioElementaryStream:
Collaboration diagram for Samsung::NaClPlayer::AudioElementaryStream:

Public Member Functions

 AudioElementaryStream (const AudioElementaryStream &other)
 
AudioElementaryStreamoperator= (const AudioElementaryStream &other)
 
virtual ElementaryStreamType GetStreamType () const
 
AudioCodec_Type GetAudioCodecType () const
 Retrieves a currently set audio codec type.
 
void SetAudioCodecType (AudioCodec_Type audio_codec)
 
AudioCodec_Profile GetAudioCodecProfile () const
 Retrieves a currently set audio codec profile.
 
void SetAudioCodecProfile (AudioCodec_Profile profile)
 
SampleFormat GetSampleFormat () const
 Retrieves a currently set audio sample format.
 
void SetSampleFormat (SampleFormat sample_format)
 
ChannelLayout GetChannelLayout () const
 Retrieves a currently set audio channel layout.
 
void SetChannelLayout (ChannelLayout channel_layout)
 Sets a new audio channel layout.
 
int32_t GetBitsPerChannel () const
 
void SetBitsPerChannel (int32_t bits_per_channel)
 
int32_t GetSamplesPerSecond () const
 Retrieves a currently set sample rate.
 
void SetSamplesPerSecond (int32_t samples_per_second)
 Sets how many audio samples were recorded per second (sample rate).
 
void SetCodecExtraData (uint32_t extra_data_size, const void *extra_data)
 
- Public Member Functions inherited from Samsung::NaClPlayer::ElementaryStream
 ElementaryStream (const ElementaryStream &other)
 
ElementaryStreamoperator= (const ElementaryStream &other)
 
int32_t InitializeDone (const std::function< void(int32_t)> &callback)
 
int32_t InitializeDone ()
 
int32_t InitializeDone (StreamInitializationMode mode, const std::function< void(int32_t)> &callback)
 
int32_t InitializeDone (StreamInitializationMode mode)
 
int32_t AppendPacket (const ESPacket &packet, const std::function< void(int32_t)> &callback)
 
int32_t AppendPacket (const ESPacket &packet)
 
int32_t AppendEncryptedPacket (const ESPacket &packet, const ESPacketEncryptionInfo &encryption_info, const std::function< void(int32_t)> &callback)
 
int32_t AppendEncryptedPacket (const ESPacket &packet, const ESPacketEncryptionInfo &encryption_info)
 
int32_t AppendTrustZonePacket (const ESPacket &packet, const TrustZoneReference &handle, const std::function< void(int32_t)> &callback)
 
int32_t AppendTrustZonePacket (const ESPacket &packet, const TrustZoneReference &handle)
 
int32_t Flush (const std::function< void(int32_t)> &callback)
 
int32_t Flush ()
 
int32_t SetDRMInitData (const std::string &type, uint32_t init_data_size, const void *init_data, const std::function< void(int32_t)> &callback)
 
int32_t SetDRMInitData (const std::string &type, uint32_t init_data_size, const void *init_data)
 

Protected Member Functions

ElementaryStream::Impl * impl ()
 

Friends

class ESDataSource
 

Detailed Description

Interface representing an audio elementary stream and containing methods to set audio codec specific configuration.

All pending configuration changes/initialization must be confirmed by call to ElementaryStream.InitializeDone.

All getters return last set configuration, which might be not confirmed yet.

Definition at line 266 of file es_data_source.h.

Member Function Documentation

◆ GetBitsPerChannel()

int32_t Samsung::NaClPlayer::AudioElementaryStream::GetBitsPerChannel ( ) const

Retrieves a currently set number of bits that are used to represent audio sample per each channel.

◆ GetStreamType()

virtual ElementaryStreamType Samsung::NaClPlayer::AudioElementaryStream::GetStreamType ( ) const
virtual

Retrieves stream type represented by this resource, in this case ElementaryStream::Audio.

Implements Samsung::NaClPlayer::ElementaryStream.

◆ SetAudioCodecProfile()

void Samsung::NaClPlayer::AudioElementaryStream::SetAudioCodecProfile ( AudioCodec_Profile  profile)

Sets a new audio codec profile.

Remarks
This parameter can be figured out by the platform most of the times and therefore isn't mandatory to set for all configurations.

◆ SetAudioCodecType()

void Samsung::NaClPlayer::AudioElementaryStream::SetAudioCodecType ( AudioCodec_Type  audio_codec)

Sets a new audio codec type.

Remarks
This is a mandatory parameter which must be set for every stream.

◆ SetBitsPerChannel()

void Samsung::NaClPlayer::AudioElementaryStream::SetBitsPerChannel ( int32_t  bits_per_channel)

Sets how many bits are used to represent audio sample per each channel.

Remarks
This parameter can be figured out by the platform most of the times and therefore isn't mandatory to set for all configurations.

◆ SetCodecExtraData()

void Samsung::NaClPlayer::AudioElementaryStream::SetCodecExtraData ( uint32_t  extra_data_size,
const void *  extra_data 
)

Sets audio codec specific extra data. Those data are needed by audio codec to initialize properly audio decoding.

Parameters
[in]extra_data_sizeSize in bytes of extra_data buffer.
[in]extra_dataA pointer to the buffer containing audio codec specific extra data.

◆ SetSampleFormat()

void Samsung::NaClPlayer::AudioElementaryStream::SetSampleFormat ( SampleFormat  sample_format)

Sets a new audio sample format.

Remarks
This parameter can be figured out by the platform most of the times. It must be set explictly only for PCM and MULAW audio streams.

The documentation for this class was generated from the following file: