webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
webrtc::test::MockAudioDecoder Class Referencefinal
Inheritance diagram for webrtc::test::MockAudioDecoder:
webrtc::AudioDecoder

Classes

class  MockFrame
 

Public Member Functions

 MockAudioDecoder (int sample_rate_hz, size_t num_channels)
 
 ~MockAudioDecoder ()
 
 MOCK_METHOD0 (Die, void())
 
 MOCK_METHOD0 (Reset, void())
 
std::vector< ParseResultParsePayload (rtc::Buffer &&payload, uint32_t timestamp)
 
int PacketDuration (const uint8_t *encoded, size_t encoded_len) const
 
bool PacketHasFec (const uint8_t *encoded, size_t encoded_len) const
 
int SampleRateHz () const
 
size_t Channels () const
 
void set_fec_enabled (bool enable_fec)
 
bool fec_enabled () const
 
- Public Member Functions inherited from webrtc::AudioDecoder
 AudioDecoder ()=default
 
virtual ~AudioDecoder ()=default
 
int Decode (const uint8_t *encoded, size_t encoded_len, int sample_rate_hz, size_t max_decoded_bytes, int16_t *decoded, SpeechType *speech_type)
 
int DecodeRedundant (const uint8_t *encoded, size_t encoded_len, int sample_rate_hz, size_t max_decoded_bytes, int16_t *decoded, SpeechType *speech_type)
 
virtual bool HasDecodePlc () const
 
virtual size_t DecodePlc (size_t num_frames, int16_t *decoded)
 
virtual void Reset ()=0
 
virtual int IncomingPacket (const uint8_t *payload, size_t payload_len, uint16_t rtp_sequence_number, uint32_t rtp_timestamp, uint32_t arrival_timestamp)
 
virtual int ErrorCode ()
 
virtual int PacketDurationRedundant (const uint8_t *encoded, size_t encoded_len) const
 
 AudioDecoder ()=default
 
virtual ~AudioDecoder ()=default
 
int Decode (const uint8_t *encoded, size_t encoded_len, int sample_rate_hz, size_t max_decoded_bytes, int16_t *decoded, SpeechType *speech_type)
 
int DecodeRedundant (const uint8_t *encoded, size_t encoded_len, int sample_rate_hz, size_t max_decoded_bytes, int16_t *decoded, SpeechType *speech_type)
 
virtual bool HasDecodePlc () const
 
virtual size_t DecodePlc (size_t num_frames, int16_t *decoded)
 
virtual void Reset ()=0
 
virtual int IncomingPacket (const uint8_t *payload, size_t payload_len, uint16_t rtp_sequence_number, uint32_t rtp_timestamp, uint32_t arrival_timestamp)
 
virtual int ErrorCode ()
 
virtual int PacketDurationRedundant (const uint8_t *encoded, size_t encoded_len) const
 

Static Public Attributes

static const int kPacketDuration = 960
 

Protected Member Functions

int DecodeInternal (const uint8_t *encoded, size_t encoded_len, int sample_rate_hz, int16_t *decoded, SpeechType *speech_type)
 
- Protected Member Functions inherited from webrtc::AudioDecoder
virtual int DecodeRedundantInternal (const uint8_t *encoded, size_t encoded_len, int sample_rate_hz, int16_t *decoded, SpeechType *speech_type)
 
virtual int DecodeRedundantInternal (const uint8_t *encoded, size_t encoded_len, int sample_rate_hz, int16_t *decoded, SpeechType *speech_type)
 

Additional Inherited Members

- Public Types inherited from webrtc::AudioDecoder
enum  SpeechType { kSpeech = 1, kComfortNoise = 2, kSpeech = 1, kComfortNoise = 2 }
 
enum  { kNotImplemented = -2 }
 
enum  SpeechType { kSpeech = 1, kComfortNoise = 2, kSpeech = 1, kComfortNoise = 2 }
 
enum  { kNotImplemented = -2 }
 
- Static Protected Member Functions inherited from webrtc::AudioDecoder
static SpeechType ConvertSpeechType (int16_t type)
 
static SpeechType ConvertSpeechType (int16_t type)
 

Constructor & Destructor Documentation

◆ MockAudioDecoder()

webrtc::test::MockAudioDecoder::MockAudioDecoder ( int  sample_rate_hz,
size_t  num_channels 
)
inline

◆ ~MockAudioDecoder()

webrtc::test::MockAudioDecoder::~MockAudioDecoder ( )
inline

Member Function Documentation

◆ Channels()

size_t webrtc::test::MockAudioDecoder::Channels ( ) const
inlinevirtual

Implements webrtc::AudioDecoder.

◆ DecodeInternal()

int webrtc::test::MockAudioDecoder::DecodeInternal ( const uint8_t encoded,
size_t  encoded_len,
int  sample_rate_hz,
int16_t decoded,
SpeechType speech_type 
)
inlineprotectedvirtual

Implements webrtc::AudioDecoder.

◆ fec_enabled()

bool webrtc::test::MockAudioDecoder::fec_enabled ( ) const
inline

◆ MOCK_METHOD0() [1/2]

webrtc::test::MockAudioDecoder::MOCK_METHOD0 ( Die  ,
void()   
)

◆ MOCK_METHOD0() [2/2]

webrtc::test::MockAudioDecoder::MOCK_METHOD0 ( Reset  ,
void()   
)

◆ PacketDuration()

int webrtc::test::MockAudioDecoder::PacketDuration ( const uint8_t encoded,
size_t  encoded_len 
) const
inlinevirtual

Reimplemented from webrtc::AudioDecoder.

◆ PacketHasFec()

bool webrtc::test::MockAudioDecoder::PacketHasFec ( const uint8_t encoded,
size_t  encoded_len 
) const
inlinevirtual

Reimplemented from webrtc::AudioDecoder.

◆ ParsePayload()

std::vector<ParseResult> webrtc::test::MockAudioDecoder::ParsePayload ( rtc::Buffer &&  payload,
uint32_t  timestamp 
)
inlinevirtual

Reimplemented from webrtc::AudioDecoder.

◆ SampleRateHz()

int webrtc::test::MockAudioDecoder::SampleRateHz ( ) const
inlinevirtual

Implements webrtc::AudioDecoder.

◆ set_fec_enabled()

void webrtc::test::MockAudioDecoder::set_fec_enabled ( bool  enable_fec)
inline

Member Data Documentation

◆ kPacketDuration

const int webrtc::test::MockAudioDecoder::kPacketDuration = 960
static

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