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

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

Issue 2179943004: Set the RTP payload type to fixed values for audio/video streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromium receiver. Created 4 years, 4 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/net/rtp/rtp_sender.cc ('k') | no next file » | 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 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, 43 packet_parser_(
44 static_cast<uint8_t>(config.rtp_payload_type)), 44 config.sender_ssrc,
45 config.rtp_payload_type <= RtpPayloadType::AUDIO_LAST ? 127 : 96),
45 stats_(cast_environment->Clock()), 46 stats_(cast_environment->Clock()),
46 event_media_type_(event_media_type), 47 event_media_type_(event_media_type),
47 event_subscriber_(kReceiverRtcpEventHistorySize, event_media_type), 48 event_subscriber_(kReceiverRtcpEventHistorySize, event_media_type),
48 rtp_timebase_(config.rtp_timebase), 49 rtp_timebase_(config.rtp_timebase),
49 target_playout_delay_( 50 target_playout_delay_(
50 base::TimeDelta::FromMilliseconds(config.rtp_max_delay_ms)), 51 base::TimeDelta::FromMilliseconds(config.rtp_max_delay_ms)),
51 expected_frame_duration_( 52 expected_frame_duration_(
52 base::TimeDelta::FromSecondsD(1.0 / config.target_frame_rate)), 53 base::TimeDelta::FromSecondsD(1.0 / config.target_frame_rate)),
53 reports_are_scheduled_(false), 54 reports_are_scheduled_(false),
54 framer_(cast_environment->Clock(), 55 framer_(cast_environment->Clock(),
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 transport_->AddCastFeedback(*cast_message, target_delay); 396 transport_->AddCastFeedback(*cast_message, target_delay);
396 if (pli_message) 397 if (pli_message)
397 transport_->AddPli(*pli_message); 398 transport_->AddPli(*pli_message);
398 if (rtcp_events) 399 if (rtcp_events)
399 transport_->AddRtcpEvents(*rtcp_events); 400 transport_->AddRtcpEvents(*rtcp_events);
400 transport_->SendRtcpFromRtpReceiver(); 401 transport_->SendRtcpFromRtpReceiver();
401 } 402 }
402 403
403 } // namespace cast 404 } // namespace cast
404 } // namespace media 405 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtp/rtp_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698