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

Unified Diff: webrtc/video/audio_receive_stream.cc

Issue 1227923005: Split webrtc/video into webrtc/{audio,call,video}. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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/video/audio_receive_stream.h ('k') | webrtc/video/audio_receive_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/audio_receive_stream.cc
diff --git a/webrtc/video/audio_receive_stream.cc b/webrtc/video/audio_receive_stream.cc
deleted file mode 100644
index a1cf2ca33ef07e8357aa23898e28d45f39fca3dc..0000000000000000000000000000000000000000
--- a/webrtc/video/audio_receive_stream.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/video/audio_receive_stream.h"
-
-#include <string>
-
-#include "webrtc/base/checks.h"
-#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
-#include "webrtc/system_wrappers/interface/tick_util.h"
-
-namespace webrtc {
-std::string AudioReceiveStream::Config::Rtp::ToString() const {
- std::stringstream ss;
- ss << "{remote_ssrc: " << remote_ssrc;
- ss << ", extensions: [";
- for (size_t i = 0; i < extensions.size(); ++i) {
- ss << extensions[i].ToString();
- if (i != extensions.size() - 1)
- ss << ", ";
- }
- ss << ']';
- ss << '}';
- return ss.str();
-}
-
-std::string AudioReceiveStream::Config::ToString() const {
- std::stringstream ss;
- ss << "{rtp: " << rtp.ToString();
- ss << ", voe_channel_id: " << voe_channel_id;
- if (!sync_group.empty())
- ss << ", sync_group: " << sync_group;
- ss << '}';
- return ss.str();
-}
-
-namespace internal {
-AudioReceiveStream::AudioReceiveStream(
- RemoteBitrateEstimator* remote_bitrate_estimator,
- const webrtc::AudioReceiveStream::Config& config)
- : remote_bitrate_estimator_(remote_bitrate_estimator),
- config_(config),
- rtp_header_parser_(RtpHeaderParser::Create()) {
- RTC_DCHECK(config.voe_channel_id != -1);
- RTC_DCHECK(remote_bitrate_estimator_ != nullptr);
- RTC_DCHECK(rtp_header_parser_ != nullptr);
- for (const auto& ext : config.rtp.extensions) {
- // One-byte-extension local identifiers are in the range 1-14 inclusive.
- RTC_DCHECK_GE(ext.id, 1);
- RTC_DCHECK_LE(ext.id, 14);
- if (ext.name == RtpExtension::kAudioLevel) {
- RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
- kRtpExtensionAudioLevel, ext.id));
- } else if (ext.name == RtpExtension::kAbsSendTime) {
- RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
- kRtpExtensionAbsoluteSendTime, ext.id));
- } else if (ext.name == RtpExtension::kTransportSequenceNumber) {
- RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
- kRtpExtensionTransportSequenceNumber, ext.id));
- } else {
- RTC_NOTREACHED() << "Unsupported RTP extension.";
- }
- }
-}
-
-webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const {
- return webrtc::AudioReceiveStream::Stats();
-}
-
-void AudioReceiveStream::Start() {
-}
-
-void AudioReceiveStream::Stop() {
-}
-
-void AudioReceiveStream::SignalNetworkState(NetworkState state) {
-}
-
-bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) {
- return false;
-}
-
-bool AudioReceiveStream::DeliverRtp(const uint8_t* packet,
- size_t length,
- const PacketTime& packet_time) {
- RTPHeader header;
-
- if (!rtp_header_parser_->Parse(packet, length, &header)) {
- return false;
- }
-
- // Only forward if the parsed header has absolute sender time. RTP timestamps
- // may have different rates for audio and video and shouldn't be mixed.
- if (config_.combined_audio_video_bwe &&
- header.extension.hasAbsoluteSendTime) {
- 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 true;
-}
-} // namespace internal
-} // namespace webrtc
« no previous file with comments | « webrtc/video/audio_receive_stream.h ('k') | webrtc/video/audio_receive_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698