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

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

Issue 2113783002: 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
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 22 matching lines...) Expand all
33 namespace media { 33 namespace media {
34 namespace cast { 34 namespace cast {
35 35
36 FrameReceiver::FrameReceiver( 36 FrameReceiver::FrameReceiver(
37 const scoped_refptr<CastEnvironment>& cast_environment, 37 const scoped_refptr<CastEnvironment>& cast_environment,
38 const FrameReceiverConfig& config, 38 const FrameReceiverConfig& config,
39 EventMediaType event_media_type, 39 EventMediaType event_media_type,
40 CastTransport* const transport) 40 CastTransport* const transport)
41 : cast_environment_(cast_environment), 41 : cast_environment_(cast_environment),
42 transport_(transport), 42 transport_(transport),
43 packet_parser_(config.sender_ssrc, config.rtp_payload_type), 43 packet_parser_(config.sender_ssrc,
44 static_cast<uint8_t>(config.rtp_payload_type)),
44 stats_(cast_environment->Clock()), 45 stats_(cast_environment->Clock()),
45 event_media_type_(event_media_type), 46 event_media_type_(event_media_type),
46 event_subscriber_(kReceiverRtcpEventHistorySize, event_media_type), 47 event_subscriber_(kReceiverRtcpEventHistorySize, event_media_type),
47 rtp_timebase_(config.rtp_timebase), 48 rtp_timebase_(config.rtp_timebase),
48 target_playout_delay_( 49 target_playout_delay_(
49 base::TimeDelta::FromMilliseconds(config.rtp_max_delay_ms)), 50 base::TimeDelta::FromMilliseconds(config.rtp_max_delay_ms)),
50 expected_frame_duration_(base::TimeDelta::FromSeconds(1) / 51 expected_frame_duration_(base::TimeDelta::FromSeconds(1) /
51 config.target_frame_rate), 52 config.target_frame_rate),
52 reports_are_scheduled_(false), 53 reports_are_scheduled_(false),
53 framer_(cast_environment->Clock(), 54 framer_(cast_environment->Clock(),
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 transport_->AddCastFeedback(*cast_message, target_delay); 394 transport_->AddCastFeedback(*cast_message, target_delay);
394 if (pli_message) 395 if (pli_message)
395 transport_->AddPli(*pli_message); 396 transport_->AddPli(*pli_message);
396 if (rtcp_events) 397 if (rtcp_events)
397 transport_->AddRtcpEvents(*rtcp_events); 398 transport_->AddRtcpEvents(*rtcp_events);
398 transport_->SendRtcpFromRtpReceiver(); 399 transport_->SendRtcpFromRtpReceiver();
399 } 400 }
400 401
401 } // namespace cast 402 } // namespace cast
402 } // namespace media 403 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698