Include buffer size limits in NetEq config struct
This change includes max_packets_in_buffer and max_delay_ms in the
NetEq config struct. The packet buffer is also no longer limited in
terms of payload sizes (bytes), only number of packets.
The old constants governing the packet buffer limits are deleted.
BUG=3083
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/14389004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5989 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq4/packet_buffer.h b/webrtc/modules/audio_coding/neteq4/packet_buffer.h
index e964c28..3d22ad0 100644
--- a/webrtc/modules/audio_coding/neteq4/packet_buffer.h
+++ b/webrtc/modules/audio_coding/neteq4/packet_buffer.h
@@ -29,14 +29,12 @@
kNotFound,
kBufferEmpty,
kInvalidPacket,
- kInvalidPointer,
- kOversizePacket
+ kInvalidPointer
};
// Constructor creates a buffer which can hold a maximum of
- // |max_number_of_packets| packets and |max_payload_memory| bytes of payload,
- // excluding RTP headers.
- PacketBuffer(size_t max_number_of_packets, size_t max_payload_memory);
+ // |max_number_of_packets| packets.
+ PacketBuffer(size_t max_number_of_packets);
// Deletes all packets in the buffer before destroying the buffer.
virtual ~PacketBuffer();
@@ -116,12 +114,7 @@
// The default value for |inc| is 1.
virtual void IncrementWaitingTimes(int inc = 1);
- virtual void BufferStat(int* num_packets,
- int* max_num_packets,
- int* current_memory_bytes,
- int* max_memory_bytes) const;
-
- virtual int current_memory_bytes() const { return current_memory_bytes_; }
+ virtual void BufferStat(int* num_packets, int* max_num_packets) const;
// Static method that properly deletes the first packet, and its payload
// array, in |packet_list|. Returns false if |packet_list| already was empty,
@@ -134,8 +127,6 @@
private:
size_t max_number_of_packets_;
- size_t max_memory_bytes_;
- int current_memory_bytes_;
PacketList buffer_;
DISALLOW_COPY_AND_ASSIGN(PacketBuffer);
};