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

Unified Diff: media/cast/rtp_receiver/rtp_receiver.cc

Issue 308043006: [Cast] Clean-up: Merge RtpReceiver+AudioReceiver+VideoReceiver-->FrameReceiver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed hclam's comments. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/rtp_receiver/rtp_receiver.h ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/rtp_receiver/rtp_receiver.cc
diff --git a/media/cast/rtp_receiver/rtp_receiver.cc b/media/cast/rtp_receiver/rtp_receiver.cc
deleted file mode 100644
index f7ff50b3752d5dab9f3fdfd6770e48df9b172f25..0000000000000000000000000000000000000000
--- a/media/cast/rtp_receiver/rtp_receiver.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/cast/rtp_receiver/rtp_receiver.h"
-
-#include "base/big_endian.h"
-#include "base/logging.h"
-#include "media/cast/rtp_receiver/receiver_stats.h"
-#include "media/cast/rtp_receiver/rtp_parser/rtp_parser.h"
-#include "media/cast/rtp_receiver/rtp_receiver_defines.h"
-
-namespace media {
-namespace cast {
-
-RtpReceiver::RtpReceiver(base::TickClock* clock,
- const FrameReceiverConfig* audio_config,
- const FrameReceiverConfig* video_config) :
- packet_parser_(audio_config ? audio_config->incoming_ssrc :
- (video_config ? video_config->incoming_ssrc : 0),
- audio_config ? audio_config->rtp_payload_type :
- (video_config ? video_config->rtp_payload_type : 0)),
- stats_(clock) {
- DCHECK(audio_config || video_config);
-}
-
-RtpReceiver::~RtpReceiver() {}
-
-// static
-uint32 RtpReceiver::GetSsrcOfSender(const uint8* rtcp_buffer, size_t length) {
- DCHECK_GE(length, kMinLengthOfRtp) << "Invalid RTP packet";
- uint32 ssrc_of_sender;
- base::BigEndianReader big_endian_reader(
- reinterpret_cast<const char*>(rtcp_buffer), length);
- big_endian_reader.Skip(8); // Skip header
- big_endian_reader.ReadU32(&ssrc_of_sender);
- return ssrc_of_sender;
-}
-
-bool RtpReceiver::ReceivedPacket(const uint8* packet, size_t length) {
- RtpCastHeader rtp_header;
- const uint8* payload_data;
- size_t payload_size;
- if (!packet_parser_.ParsePacket(
- packet, length, &rtp_header, &payload_data, &payload_size)) {
- return false;
- }
-
- OnReceivedPayloadData(payload_data, payload_size, rtp_header);
- stats_.UpdateStatistics(rtp_header);
- return true;
-}
-
-} // namespace cast
-} // namespace media
« no previous file with comments | « media/cast/rtp_receiver/rtp_receiver.h ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698