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

Unified Diff: webrtc/audio/audio_receive_stream.cc

Issue 1924793002: Remove webrtc/stream.h and unutilized inheritance. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: re-rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/audio/audio_send_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_receive_stream.cc
diff --git a/webrtc/audio/audio_receive_stream.cc b/webrtc/audio/audio_receive_stream.cc
index 449f2f492f0ff7ae53a1dfe355b121e5c58ffb65..f984c7fb2096f9c293137a65311e9d4b94e04fcd 100644
--- a/webrtc/audio/audio_receive_stream.cc
+++ b/webrtc/audio/audio_receive_stream.cc
@@ -143,46 +143,6 @@ void AudioReceiveStream::Stop() {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
}
-void AudioReceiveStream::SignalNetworkState(NetworkState state) {
- RTC_DCHECK(thread_checker_.CalledOnValidThread());
-}
-
-bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) {
- // TODO(solenberg): Tests call this function on a network thread, libjingle
- // calls on the worker thread. We should move towards always using a network
- // thread. Then this check can be enabled.
- // RTC_DCHECK(!thread_checker_.CalledOnValidThread());
- return channel_proxy_->ReceivedRTCPPacket(packet, length);
-}
-
-bool AudioReceiveStream::DeliverRtp(const uint8_t* packet,
- size_t length,
- const PacketTime& packet_time) {
- // TODO(solenberg): Tests call this function on a network thread, libjingle
- // calls on the worker thread. We should move towards always using a network
- // thread. Then this check can be enabled.
- // RTC_DCHECK(!thread_checker_.CalledOnValidThread());
- RTPHeader header;
- if (!rtp_header_parser_->Parse(packet, length, &header)) {
- return false;
- }
-
- // Only forward if the parsed header has one of the headers necessary for
- // bandwidth estimation. RTP timestamps has different rates for audio and
- // video and shouldn't be mixed.
- if (remote_bitrate_estimator_ &&
- header.extension.hasTransportSequenceNumber) {
- int64_t arrival_time_ms = TickTime::MillisecondTimestamp();
- if (packet_time.timestamp >= 0)
- arrival_time_ms = (packet_time.timestamp + 500) / 1000;
- size_t payload_size = length - header.headerLength;
- remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size,
- header, false);
- }
-
- return channel_proxy_->ReceivedRTPPacket(packet, length, packet_time);
-}
-
webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
webrtc::AudioReceiveStream::Stats stats;
@@ -241,6 +201,46 @@ const webrtc::AudioReceiveStream::Config& AudioReceiveStream::config() const {
return config_;
}
+void AudioReceiveStream::SignalNetworkState(NetworkState state) {
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
+}
+
+bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) {
+ // TODO(solenberg): Tests call this function on a network thread, libjingle
+ // calls on the worker thread. We should move towards always using a network
+ // thread. Then this check can be enabled.
+ // RTC_DCHECK(!thread_checker_.CalledOnValidThread());
+ return channel_proxy_->ReceivedRTCPPacket(packet, length);
+}
+
+bool AudioReceiveStream::DeliverRtp(const uint8_t* packet,
+ size_t length,
+ const PacketTime& packet_time) {
+ // TODO(solenberg): Tests call this function on a network thread, libjingle
+ // calls on the worker thread. We should move towards always using a network
+ // thread. Then this check can be enabled.
+ // RTC_DCHECK(!thread_checker_.CalledOnValidThread());
+ RTPHeader header;
+ if (!rtp_header_parser_->Parse(packet, length, &header)) {
+ return false;
+ }
+
+ // Only forward if the parsed header has one of the headers necessary for
+ // bandwidth estimation. RTP timestamps has different rates for audio and
+ // video and shouldn't be mixed.
+ if (remote_bitrate_estimator_ &&
+ header.extension.hasTransportSequenceNumber) {
+ int64_t arrival_time_ms = TickTime::MillisecondTimestamp();
+ if (packet_time.timestamp >= 0)
+ arrival_time_ms = (packet_time.timestamp + 500) / 1000;
+ size_t payload_size = length - header.headerLength;
+ remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size,
+ header, false);
+ }
+
+ return channel_proxy_->ReceivedRTPPacket(packet, length, packet_time);
+}
+
VoiceEngine* AudioReceiveStream::voice_engine() const {
internal::AudioState* audio_state =
static_cast<internal::AudioState*>(audio_state_.get());
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/audio/audio_send_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698