Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_packet_source_input.h

Issue 2020363003: Refactor neteq_rtpplay (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change how SSRC filtering works Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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.
9 */
10
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_PACKET_SOURCE_INPUT_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_PACKET_SOURCE_INPUT_H_
13
14 #include <string>
15
16 #include "webrtc/modules/audio_coding/neteq/tools/neteq_input.h"
17
18 namespace webrtc {
19 namespace test {
20
21 // An adapter class to dress up a PacketSource object as a NetEqInput.
22 class NetEqPacketSourceInput : public NetEqInput {
23 public:
24 NetEqPacketSourceInput();
25 rtc::Optional<int64_t> NextPacketTime() const override;
26 std::unique_ptr<PacketData> GetPacket() override;
27 rtc::Optional<RTPHeader> NextHeader() const override;
28 bool ended() const override { return !next_output_event_ms_; }
29
30 protected:
31 virtual PacketSource* source() = 0;
32 void LoadNextPacket();
33
34 rtc::Optional<int64_t> next_output_event_ms_;
35
36 private:
37 std::unique_ptr<Packet> packet_;
38 };
39
40 class RtpFileSource;
ivoc 2016/06/14 16:39:56 Isn't it normal to put the forward declarations at
hlundin-webrtc 2016/06/17 10:30:08 Done.
41
42 // Implementation of NetEqPacketSourceInput to be used with an RtpFileSource.
43 class NetEqRtpDumpInput final : public NetEqPacketSourceInput {
44 public:
45 explicit NetEqRtpDumpInput(const std::string& file_name);
46
47 rtc::Optional<int64_t> NextOutputEventTime() const override;
48 void AdvanceOutputEvent() override;
49
50 protected:
51 PacketSource* source() override;
52
53 private:
54 static constexpr int64_t kOutputPeriodMs = 10;
55
56 std::unique_ptr<RtpFileSource> source_;
57 };
58
59 class RtcEventLogSource;
ivoc 2016/06/14 16:39:56 Same here.
hlundin-webrtc 2016/06/17 10:30:08 Done.
60
61 // Implementation of NetEqPacketSourceInput to be used with an
62 // RtcEventLogSource.
63 class NetEqEventLogInput final : public NetEqPacketSourceInput {
64 public:
65 explicit NetEqEventLogInput(const std::string& file_name);
66
67 rtc::Optional<int64_t> NextOutputEventTime() const override;
68 void AdvanceOutputEvent() override;
69
70 protected:
71 PacketSource* source() override;
72
73 private:
74 std::unique_ptr<RtcEventLogSource> source_;
75 };
76
77 } // namespace test
78 } // namespace webrtc
79 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_PACKET_SOURCE_INPUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698