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

Side by Side Diff: webrtc/audio/audio_receive_stream.h

Issue 2867943003: New class RtpDemuxer and RtpPacketSinkInterface, use in Call. (Closed)
Patch Set: Fix Flexfec recursion issue in a different way. Created 3 years, 7 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
« no previous file with comments | « no previous file | webrtc/call/BUILD.gn » ('j') | webrtc/modules/rtp_rtcp/source/flexfec_receiver.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ 11 #ifndef WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_
12 #define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ 12 #define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_
13 13
14 #include <memory> 14 #include <memory>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/api/audio/audio_mixer.h" 17 #include "webrtc/api/audio/audio_mixer.h"
18 #include "webrtc/audio/audio_state.h" 18 #include "webrtc/audio/audio_state.h"
19 #include "webrtc/base/constructormagic.h" 19 #include "webrtc/base/constructormagic.h"
20 #include "webrtc/base/thread_checker.h" 20 #include "webrtc/base/thread_checker.h"
21 #include "webrtc/call/audio_receive_stream.h" 21 #include "webrtc/call/audio_receive_stream.h"
22 #include "webrtc/call/rtp_demuxer.h"
22 #include "webrtc/call/syncable.h" 23 #include "webrtc/call/syncable.h"
23 24
24 namespace webrtc { 25 namespace webrtc {
25 class PacketRouter; 26 class PacketRouter;
26 class RtcEventLog; 27 class RtcEventLog;
27 class RtpPacketReceived; 28 class RtpPacketReceived;
28 29
29 namespace voe { 30 namespace voe {
30 class ChannelProxy; 31 class ChannelProxy;
31 } // namespace voe 32 } // namespace voe
32 33
33 namespace internal { 34 namespace internal {
34 class AudioSendStream; 35 class AudioSendStream;
35 36
36 class AudioReceiveStream final : public webrtc::AudioReceiveStream, 37 class AudioReceiveStream final : public webrtc::AudioReceiveStream,
37 public AudioMixer::Source, 38 public AudioMixer::Source,
38 public Syncable { 39 public Syncable,
40 public RtpPacketSinkInterface {
39 public: 41 public:
40 AudioReceiveStream(PacketRouter* packet_router, 42 AudioReceiveStream(PacketRouter* packet_router,
41 const webrtc::AudioReceiveStream::Config& config, 43 const webrtc::AudioReceiveStream::Config& config,
42 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, 44 const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
43 webrtc::RtcEventLog* event_log); 45 webrtc::RtcEventLog* event_log);
44 ~AudioReceiveStream() override; 46 ~AudioReceiveStream() override;
45 47
46 // webrtc::AudioReceiveStream implementation. 48 // webrtc::AudioReceiveStream implementation.
47 void Start() override; 49 void Start() override;
48 void Stop() override; 50 void Stop() override;
49 webrtc::AudioReceiveStream::Stats GetStats() const override; 51 webrtc::AudioReceiveStream::Stats GetStats() const override;
50 int GetOutputLevel() const override; 52 int GetOutputLevel() const override;
51 void SetSink(std::unique_ptr<AudioSinkInterface> sink) override; 53 void SetSink(std::unique_ptr<AudioSinkInterface> sink) override;
52 void SetGain(float gain) override; 54 void SetGain(float gain) override;
53 std::vector<webrtc::RtpSource> GetSources() const override; 55 std::vector<webrtc::RtpSource> GetSources() const override;
54 56
55 // TODO(nisse): Intended to be part of an RtpPacketReceiver interface. 57 // RtpPacketSinkInterface.
56 void OnRtpPacket(const RtpPacketReceived& packet); 58 void OnRtpPacket(const RtpPacketReceived& packet) override;
57 59
58 // AudioMixer::Source 60 // AudioMixer::Source
59 AudioFrameInfo GetAudioFrameWithInfo(int sample_rate_hz, 61 AudioFrameInfo GetAudioFrameWithInfo(int sample_rate_hz,
60 AudioFrame* audio_frame) override; 62 AudioFrame* audio_frame) override;
61 int Ssrc() const override; 63 int Ssrc() const override;
62 int PreferredSampleRate() const override; 64 int PreferredSampleRate() const override;
63 65
64 // Syncable 66 // Syncable
65 int id() const override; 67 int id() const override;
66 rtc::Optional<Syncable::Info> GetInfo() const override; 68 rtc::Optional<Syncable::Info> GetInfo() const override;
(...skipping 17 matching lines...) Expand all
84 std::unique_ptr<voe::ChannelProxy> channel_proxy_; 86 std::unique_ptr<voe::ChannelProxy> channel_proxy_;
85 87
86 bool playing_ ACCESS_ON(worker_thread_checker_) = false; 88 bool playing_ ACCESS_ON(worker_thread_checker_) = false;
87 89
88 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream); 90 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream);
89 }; 91 };
90 } // namespace internal 92 } // namespace internal
91 } // namespace webrtc 93 } // namespace webrtc
92 94
93 #endif // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_ 95 #endif // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/call/BUILD.gn » ('j') | webrtc/modules/rtp_rtcp/source/flexfec_receiver.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698