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

Side by Side Diff: media/cast/receiver/frame_receiver.cc

Issue 2133223003: Revert of Refactoring: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « media/cast/cast_sender_impl.cc ('k') | media/cast/receiver/video_decoder_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/receiver/frame_receiver.h" 5 #include "media/cast/receiver/frame_receiver.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/big_endian.h" 10 #include "base/big_endian.h"
(...skipping 30 matching lines...) Expand all
41 : cast_environment_(cast_environment), 41 : cast_environment_(cast_environment),
42 transport_(transport), 42 transport_(transport),
43 packet_parser_(config.sender_ssrc, 43 packet_parser_(config.sender_ssrc,
44 static_cast<uint8_t>(config.rtp_payload_type)), 44 static_cast<uint8_t>(config.rtp_payload_type)),
45 stats_(cast_environment->Clock()), 45 stats_(cast_environment->Clock()),
46 event_media_type_(event_media_type), 46 event_media_type_(event_media_type),
47 event_subscriber_(kReceiverRtcpEventHistorySize, event_media_type), 47 event_subscriber_(kReceiverRtcpEventHistorySize, event_media_type),
48 rtp_timebase_(config.rtp_timebase), 48 rtp_timebase_(config.rtp_timebase),
49 target_playout_delay_( 49 target_playout_delay_(
50 base::TimeDelta::FromMilliseconds(config.rtp_max_delay_ms)), 50 base::TimeDelta::FromMilliseconds(config.rtp_max_delay_ms)),
51 expected_frame_duration_( 51 expected_frame_duration_(base::TimeDelta::FromSeconds(1) /
52 base::TimeDelta::FromSecondsD(1.0 / config.target_frame_rate)), 52 config.target_frame_rate),
53 reports_are_scheduled_(false), 53 reports_are_scheduled_(false),
54 framer_(cast_environment->Clock(), 54 framer_(cast_environment->Clock(),
55 this, 55 this,
56 config.sender_ssrc, 56 config.sender_ssrc,
57 true, 57 true,
58 static_cast<int>( 58 config.rtp_max_delay_ms * config.target_frame_rate / 1000),
59 config.rtp_max_delay_ms * config.target_frame_rate / 1000)),
60 rtcp_(cast_environment_->Clock(), 59 rtcp_(cast_environment_->Clock(),
61 config.receiver_ssrc, 60 config.receiver_ssrc,
62 config.sender_ssrc), 61 config.sender_ssrc),
63 is_waiting_for_consecutive_frame_(false), 62 is_waiting_for_consecutive_frame_(false),
64 lip_sync_drift_(ClockDriftSmoother::GetDefaultTimeConstant()), 63 lip_sync_drift_(ClockDriftSmoother::GetDefaultTimeConstant()),
65 weak_factory_(this) { 64 weak_factory_(this) {
66 transport_->AddValidRtpReceiver(config.sender_ssrc, config.receiver_ssrc); 65 transport_->AddValidRtpReceiver(config.sender_ssrc, config.receiver_ssrc);
67 DCHECK_GT(config.rtp_max_delay_ms, 0); 66 DCHECK_GT(config.rtp_max_delay_ms, 0);
68 DCHECK_GT(config.target_frame_rate, 0); 67 DCHECK_GT(config.target_frame_rate, 0);
69 decryptor_.Initialize(config.aes_key, config.aes_iv_mask); 68 decryptor_.Initialize(config.aes_key, config.aes_iv_mask);
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 transport_->AddCastFeedback(*cast_message, target_delay); 394 transport_->AddCastFeedback(*cast_message, target_delay);
396 if (pli_message) 395 if (pli_message)
397 transport_->AddPli(*pli_message); 396 transport_->AddPli(*pli_message);
398 if (rtcp_events) 397 if (rtcp_events)
399 transport_->AddRtcpEvents(*rtcp_events); 398 transport_->AddRtcpEvents(*rtcp_events);
400 transport_->SendRtcpFromRtpReceiver(); 399 transport_->SendRtcpFromRtpReceiver();
401 } 400 }
402 401
403 } // namespace cast 402 } // namespace cast
404 } // namespace media 403 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/cast_sender_impl.cc ('k') | media/cast/receiver/video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698