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

Side by Side Diff: media/cast/net/rtp/packet_storage.cc

Issue 388663003: Cast: Reshuffle files under media/cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing includes Created 6 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 | Annotate | Revision Log
« no previous file with comments | « media/cast/net/rtp/packet_storage.h ('k') | media/cast/net/rtp/packet_storage_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 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/transport/rtp_sender/packet_storage/packet_storage.h" 5 #include "media/cast/net/rtp/packet_storage.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "media/cast/cast_defines.h"
10 11
11 namespace media { 12 namespace media {
12 namespace cast { 13 namespace cast {
13 namespace transport {
14 14
15 PacketStorage::PacketStorage(size_t stored_frames) 15 PacketStorage::PacketStorage(size_t stored_frames)
16 : max_stored_frames_(stored_frames), 16 : max_stored_frames_(stored_frames),
17 first_frame_id_in_list_(0), 17 first_frame_id_in_list_(0),
18 last_frame_id_in_list_(0) { 18 last_frame_id_in_list_(0) {
19 } 19 }
20 20
21 PacketStorage::~PacketStorage() { 21 PacketStorage::~PacketStorage() {
22 } 22 }
23 23
(...skipping 29 matching lines...) Expand all
53 const SendPacketVector* PacketStorage::GetFrame8(uint8 frame_id_8bits) const { 53 const SendPacketVector* PacketStorage::GetFrame8(uint8 frame_id_8bits) const {
54 // The requested frame ID has only 8-bits so convert the first frame ID 54 // The requested frame ID has only 8-bits so convert the first frame ID
55 // in list to match. 55 // in list to match.
56 uint8 index_8bits = first_frame_id_in_list_ & 0xFF; 56 uint8 index_8bits = first_frame_id_in_list_ & 0xFF;
57 index_8bits = frame_id_8bits - index_8bits; 57 index_8bits = frame_id_8bits - index_8bits;
58 if (index_8bits >= frames_.size()) 58 if (index_8bits >= frames_.size())
59 return NULL; 59 return NULL;
60 return &(frames_[index_8bits]); 60 return &(frames_[index_8bits]);
61 } 61 }
62 62
63 } // namespace transport
64 } // namespace cast 63 } // namespace cast
65 } // namespace media 64 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtp/packet_storage.h ('k') | media/cast/net/rtp/packet_storage_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698