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

Side by Side Diff: media/cast/net/rtcp/receiver_rtcp_event_subscriber.cc

Issue 800533002: Cast: Fix missing variable initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cast_streaming_receiver4
Patch Set: Created 6 years 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 | « no previous file | 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/net/rtcp/receiver_rtcp_event_subscriber.h" 5 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 namespace media { 9 namespace media {
10 namespace cast { 10 namespace cast {
11 11
12 ReceiverRtcpEventSubscriber::ReceiverRtcpEventSubscriber( 12 ReceiverRtcpEventSubscriber::ReceiverRtcpEventSubscriber(
13 const size_t max_size_to_retain, EventMediaType type) 13 const size_t max_size_to_retain, EventMediaType type)
14 : max_size_to_retain_( 14 : max_size_to_retain_(
15 max_size_to_retain * (kResendDelay * kNumResends + 1)), 15 max_size_to_retain * (kResendDelay * kNumResends + 1)),
16 type_(type) { 16 type_(type),
17 popped_events_(0) {
17 DCHECK(max_size_to_retain_ > 0u); 18 DCHECK(max_size_to_retain_ > 0u);
18 DCHECK(type_ == AUDIO_EVENT || type_ == VIDEO_EVENT); 19 DCHECK(type_ == AUDIO_EVENT || type_ == VIDEO_EVENT);
19 for (size_t i = 0; i < kNumResends; i++) { 20 for (size_t i = 0; i < kNumResends; i++) {
20 send_ptrs_[i] = 0; 21 send_ptrs_[i] = 0;
21 } 22 }
22 } 23 }
23 24
24 ReceiverRtcpEventSubscriber::~ReceiverRtcpEventSubscriber() { 25 ReceiverRtcpEventSubscriber::~ReceiverRtcpEventSubscriber() {
25 DCHECK(thread_checker_.CalledOnValidThread()); 26 DCHECK(thread_checker_.CalledOnValidThread());
26 } 27 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 130
130 bool ReceiverRtcpEventSubscriber::ShouldProcessEvent( 131 bool ReceiverRtcpEventSubscriber::ShouldProcessEvent(
131 CastLoggingEvent event_type, EventMediaType event_media_type) { 132 CastLoggingEvent event_type, EventMediaType event_media_type) {
132 return type_ == event_media_type && 133 return type_ == event_media_type &&
133 (event_type == FRAME_ACK_SENT || event_type == FRAME_DECODED || 134 (event_type == FRAME_ACK_SENT || event_type == FRAME_DECODED ||
134 event_type == FRAME_PLAYOUT || event_type == PACKET_RECEIVED); 135 event_type == FRAME_PLAYOUT || event_type == PACKET_RECEIVED);
135 } 136 }
136 137
137 } // namespace cast 138 } // namespace cast
138 } // namespace media 139 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698