2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ4_MOCK_MOCK_PACKET_BUFFER_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ4_MOCK_MOCK_PACKET_BUFFER_H_
14 #include "webrtc/modules/audio_coding/neteq4/packet_buffer.h"
16 #include "gmock/gmock.h"
20 class MockPacketBuffer : public PacketBuffer {
22 MockPacketBuffer(size_t max_number_of_packets)
23 : PacketBuffer(max_number_of_packets) {}
24 virtual ~MockPacketBuffer() { Die(); }
25 MOCK_METHOD0(Die, void());
28 MOCK_CONST_METHOD0(Empty,
30 MOCK_METHOD1(InsertPacket,
32 MOCK_METHOD4(InsertPacketList,
33 int(PacketList* packet_list,
34 const DecoderDatabase& decoder_database,
35 uint8_t* current_rtp_payload_type,
36 uint8_t* current_cng_rtp_payload_type));
37 MOCK_CONST_METHOD1(NextTimestamp,
38 int(uint32_t* next_timestamp));
39 MOCK_CONST_METHOD2(NextHigherTimestamp,
40 int(uint32_t timestamp, uint32_t* next_timestamp));
41 MOCK_CONST_METHOD0(NextRtpHeader,
43 MOCK_METHOD1(GetNextPacket,
44 Packet*(int* discard_count));
45 MOCK_METHOD0(DiscardNextPacket,
47 MOCK_METHOD1(DiscardOldPackets,
48 int(uint32_t timestamp_limit));
49 MOCK_CONST_METHOD0(NumPacketsInBuffer,
51 MOCK_METHOD1(IncrementWaitingTimes,
53 MOCK_CONST_METHOD0(current_memory_bytes,
58 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ4_MOCK_MOCK_PACKET_BUFFER_H_