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

Side by Side Diff: media/cast/framer/framer.cc

Issue 62843002: Cast: Added support for AES-CTR crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 7 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/framer/framer.h" 5 #include "media/cast/framer/framer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 namespace cast { 10 namespace cast {
(...skipping 17 matching lines...) Expand all
28 bool Framer::InsertPacket(const uint8* payload_data, 28 bool Framer::InsertPacket(const uint8* payload_data,
29 size_t payload_size, 29 size_t payload_size,
30 const RtpCastHeader& rtp_header) { 30 const RtpCastHeader& rtp_header) {
31 bool complete = false; 31 bool complete = false;
32 if (!frame_id_map_.InsertPacket(rtp_header, &complete)) return false; 32 if (!frame_id_map_.InsertPacket(rtp_header, &complete)) return false;
33 33
34 // Does this packet belong to a new frame? 34 // Does this packet belong to a new frame?
35 FrameList::iterator it = frames_.find(rtp_header.frame_id); 35 FrameList::iterator it = frames_.find(rtp_header.frame_id);
36 if (it == frames_.end()) { 36 if (it == frames_.end()) {
37 // New frame. 37 // New frame.
38 linked_ptr<FrameBuffer> frame_buffer(new FrameBuffer()); 38 linked_ptr<FrameBuffer> frame_buffer(new FrameBuffer()); // TODO wrap count?
Alpha Left Google 2013/11/07 01:10:11 What does this mean?
pwestin 2013/11/07 17:16:04 I have a separate cl coming changing frame id to b
39 frame_buffer->InsertPacket(payload_data, payload_size, rtp_header); 39 frame_buffer->InsertPacket(payload_data, payload_size, rtp_header);
40 frames_.insert(std::make_pair(rtp_header.frame_id, frame_buffer)); 40 frames_.insert(std::make_pair(rtp_header.frame_id, frame_buffer));
41 } else { 41 } else {
42 // Insert packet to existing frame buffer. 42 // Insert packet to existing frame buffer.
43 it->second->InsertPacket(payload_data, payload_size, rtp_header); 43 it->second->InsertPacket(payload_data, payload_size, rtp_header);
44 } 44 }
45 45
46 if (complete) { 46 if (complete) {
47 // ACK as soon as possible. 47 // ACK as soon as possible.
48 VLOG(1) << "Complete frame " << static_cast<int>(rtp_header.frame_id); 48 VLOG(1) << "Complete frame " << static_cast<int>(rtp_header.frame_id);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 bool Framer::TimeToSendNextCastMessage(base::TimeTicks* time_to_send) { 130 bool Framer::TimeToSendNextCastMessage(base::TimeTicks* time_to_send) {
131 return cast_msg_builder_->TimeToSendNextCastMessage(time_to_send); 131 return cast_msg_builder_->TimeToSendNextCastMessage(time_to_send);
132 } 132 }
133 133
134 void Framer::SendCastMessage() { 134 void Framer::SendCastMessage() {
135 cast_msg_builder_->UpdateCastMessage(); 135 cast_msg_builder_->UpdateCastMessage();
136 } 136 }
137 137
138 } // namespace cast 138 } // namespace cast
139 } // namespace media 139 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698