NetEq: Change member variables for current RTP types to rtc::Optionals

With this change, the value 0xFF is no longer used to flag that the RTP
type is unknown. Instead, an empty value for the rtc::Optional is used.

Review-Url: https://codereview.webrtc.org/2290153002
Cr-Commit-Position: refs/heads/master@{#13989}
This commit is contained in:
henrik.lundin
2016-08-31 03:14:11 -07:00
committed by Commit bot
parent 9e4a3040ed
commit da8bbf6e3c
7 changed files with 51 additions and 43 deletions

View File

@ -16,6 +16,7 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/optional.h"
#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
#include "webrtc/modules/audio_coding/neteq/defines.h"
@ -397,8 +398,8 @@ class NetEqImpl : public webrtc::NetEq {
bool new_codec_ GUARDED_BY(crit_sect_);
uint32_t timestamp_ GUARDED_BY(crit_sect_);
bool reset_decoder_ GUARDED_BY(crit_sect_);
uint8_t current_rtp_payload_type_ GUARDED_BY(crit_sect_);
uint8_t current_cng_rtp_payload_type_ GUARDED_BY(crit_sect_);
rtc::Optional<uint8_t> current_rtp_payload_type_ GUARDED_BY(crit_sect_);
rtc::Optional<uint8_t> current_cng_rtp_payload_type_ GUARDED_BY(crit_sect_);
uint32_t ssrc_ GUARDED_BY(crit_sect_);
bool first_packet_ GUARDED_BY(crit_sect_);
int error_code_ GUARDED_BY(crit_sect_); // Store last error code.