NetEq: Add codec name and RTP timestamp rate to DecoderInfo

The new fields are default-populated for built-in decoders, but for
external decoders, the name can now be given when registering the
decoder.

BUG=webrtc:3520

Review URL: https://codereview.webrtc.org/1484343003

Cr-Commit-Position: refs/heads/master@{#10952}
This commit is contained in:
henrik.lundin
2015-12-09 06:20:58 -08:00
committed by Commit bot
parent 3980d46960
commit 4cf61dd116
26 changed files with 232 additions and 151 deletions

View File

@ -11,6 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_
#include <string>
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_annotations.h"
@ -108,17 +110,13 @@ class NetEqImpl : public webrtc::NetEq {
int* num_channels,
NetEqOutputType* type) override;
// Associates |rtp_payload_type| with |codec| and stores the information in
// the codec database. Returns kOK on success, kFail on failure.
int RegisterPayloadType(NetEqDecoder codec,
const std::string& codec_name,
uint8_t rtp_payload_type) override;
// Provides an externally created decoder object |decoder| to insert in the
// decoder database. The decoder implements a decoder of type |codec| and
// associates it with |rtp_payload_type|. The decoder will produce samples
// at the rate |sample_rate_hz|. Returns kOK on success, kFail on failure.
int RegisterExternalDecoder(AudioDecoder* decoder,
NetEqDecoder codec,
const std::string& codec_name,
uint8_t rtp_payload_type,
int sample_rate_hz) override;