Delete unused methods in VCMFrameBuffer and VCMSessionInfo.

Bug: None
Change-Id: Ia97bb14ac9fa1a31dae248fc5a0f58e07b588ec7
Reviewed-on: https://webrtc-review.googlesource.com/82164
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23566}
This commit is contained in:
Niels Möller 2018-06-08 15:17:41 +02:00 committed by Commit Bot
parent 6d19180030
commit 425f713d24
4 changed files with 2 additions and 76 deletions

View File

@ -63,10 +63,6 @@ int VCMFrameBuffer::Tl0PicId() const {
return _sessionInfo.Tl0PicId();
}
bool VCMFrameBuffer::NonReference() const {
return _sessionInfo.NonReference();
}
std::vector<NaluInfo> VCMFrameBuffer::GetNaluInfos() const {
return _sessionInfo.GetNaluInfos();
}
@ -219,11 +215,6 @@ bool VCMFrameBuffer::HaveFirstPacket() const {
return _sessionInfo.HaveFirstPacket();
}
bool VCMFrameBuffer::HaveLastPacket() const {
TRACE_EVENT0("webrtc", "VCMFrameBuffer::HaveLastPacket");
return _sessionInfo.HaveLastPacket();
}
int VCMFrameBuffer::NumPackets() const {
TRACE_EVENT0("webrtc", "VCMFrameBuffer::NumPackets");
return _sessionInfo.NumPackets();
@ -278,17 +269,6 @@ VCMFrameBufferStateEnum VCMFrameBuffer::GetState() const {
return _state;
}
// Get current state of frame
VCMFrameBufferStateEnum VCMFrameBuffer::GetState(uint32_t& timeStamp) const {
TRACE_EVENT0("webrtc", "VCMFrameBuffer::GetState");
timeStamp = TimeStamp();
return GetState();
}
bool VCMFrameBuffer::IsRetransmitted() const {
return _sessionInfo.session_nack();
}
void VCMFrameBuffer::PrepareForDecode(bool continuous) {
TRACE_EVENT0("webrtc", "VCMFrameBuffer::PrepareForDecode");
size_t bytes_removed = _sessionInfo.MakeDecodable();

View File

@ -39,17 +39,11 @@ class VCMFrameBuffer : public VCMEncodedFrame {
// State
// Get current state of frame
VCMFrameBufferStateEnum GetState() const;
// Get current state and timestamp of frame
VCMFrameBufferStateEnum GetState(uint32_t& timeStamp) const;
void PrepareForDecode(bool continuous);
bool IsRetransmitted() const;
bool IsSessionComplete() const;
bool HaveFirstPacket() const;
bool HaveLastPacket() const;
int NumPackets() const;
// Makes sure the session contain a decodable stream.
void MakeSessionDecodable();
// Sequence numbers
// Get lowest packet sequence number in frame
@ -61,7 +55,6 @@ class VCMFrameBuffer : public VCMEncodedFrame {
int TemporalId() const;
bool LayerSync() const;
int Tl0PicId() const;
bool NonReference() const;
std::vector<NaluInfo> GetNaluInfos() const;
@ -77,10 +70,7 @@ class VCMFrameBuffer : public VCMEncodedFrame {
int64_t LatestPacketTimeMs() const;
webrtc::FrameType FrameType() const;
void SetPreviousFrameLoss();
// The number of packets discarded because the decoder can't make use of them.
int NotDecodablePackets() const;
private:
void SetState(VCMFrameBufferStateEnum state); // Set state of frame

View File

@ -24,8 +24,7 @@ uint16_t BufferToUWord16(const uint8_t* dataBuffer) {
} // namespace
VCMSessionInfo::VCMSessionInfo()
: session_nack_(false),
complete_(false),
: complete_(false),
decodable_(false),
frame_type_(kVideoFrameDelta),
packets_(),
@ -105,12 +104,6 @@ int VCMSessionInfo::Tl0PicId() const {
}
}
bool VCMSessionInfo::NonReference() const {
if (packets_.empty() || packets_.front().video_header.codec != kVideoCodecVP8)
return false;
return packets_.front().video_header.codecHeader.VP8.nonReference;
}
std::vector<NaluInfo> VCMSessionInfo::GetNaluInfos() const {
if (packets_.empty() ||
packets_.front().video_header.codec != kVideoCodecH264)
@ -144,7 +137,6 @@ void VCMSessionInfo::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) {
}
void VCMSessionInfo::Reset() {
session_nack_ = false;
complete_ = false;
decodable_ = false;
frame_type_ = kVideoFrameDelta;
@ -409,12 +401,6 @@ size_t VCMSessionInfo::MakeDecodable() {
return return_length;
}
void VCMSessionInfo::SetNotDecodableIfIncomplete() {
// We don't need to check for completeness first because the two are
// orthogonal. If complete_ is true, decodable_ is irrelevant.
decodable_ = false;
}
bool VCMSessionInfo::HaveFirstPacket() const {
return !packets_.empty() && (first_packet_seq_num_ != -1);
}
@ -423,10 +409,6 @@ bool VCMSessionInfo::HaveLastPacket() const {
return !packets_.empty() && (last_packet_seq_num_ != -1);
}
bool VCMSessionInfo::session_nack() const {
return session_nack_;
}
int VCMSessionInfo::InsertPacket(const VCMPacket& packet,
uint8_t* frame_buffer,
VCMDecodeErrorMode decode_error_mode,

View File

@ -33,19 +33,6 @@ class VCMSessionInfo {
void UpdateDataPointers(const uint8_t* old_base_ptr,
const uint8_t* new_base_ptr);
// NACK - Building the NACK lists.
// Build hard NACK list: Zero out all entries in list up to and including
// _lowSeqNum.
int BuildHardNackList(int* seq_num_list,
int seq_num_list_length,
int nack_seq_nums_index);
// Build soft NACK list: Zero out only a subset of the packets, discard
// empty packets.
int BuildSoftNackList(int* seq_num_list,
int seq_num_list_length,
int nack_seq_nums_index,
int rtt_ms);
void Reset();
int InsertPacket(const VCMPacket& packet,
uint8_t* frame_buffer,
@ -60,17 +47,11 @@ class VCMSessionInfo {
// Returns the number of bytes deleted from the session.
size_t MakeDecodable();
// Sets decodable_ to false.
// Used by the dual decoder. After the mode is changed to kNoErrors from
// kWithErrors or kSelective errors, any states that have been marked
// decodable and are not complete are marked as non-decodable.
void SetNotDecodableIfIncomplete();
// TODO(nisse): Used by tests only.
size_t SessionLength() const;
int NumPackets() const;
bool HaveFirstPacket() const;
bool HaveLastPacket() const;
bool session_nack() const;
webrtc::FrameType FrameType() const { return frame_type_; }
int LowSequenceNumber() const;
@ -80,16 +61,11 @@ class VCMSessionInfo {
int TemporalId() const;
bool LayerSync() const;
int Tl0PicId() const;
bool NonReference() const;
std::vector<NaluInfo> GetNaluInfos() const;
void SetGofInfo(const GofInfoVP9& gof_info, size_t idx);
// The number of packets discarded because the decoder can't make use of
// them.
int packets_not_decodable() const;
private:
enum { kMaxVP8Partitions = 9 };
@ -142,8 +118,6 @@ class VCMSessionInfo {
// frame, we know that the frame is medium or large-sized.
void UpdateDecodableSession(const FrameData& frame_data);
// If this session has been NACKed by the jitter buffer.
bool session_nack_;
bool complete_;
bool decodable_;
webrtc::FrameType frame_type_;