| OLD | NEW |
| 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/transport/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 namespace transport { |
| 14 | 15 |
| 15 PacketStorage::PacketStorage(size_t stored_frames) | 16 PacketStorage::PacketStorage(size_t stored_frames) |
| 16 : max_stored_frames_(stored_frames), | 17 : max_stored_frames_(stored_frames), |
| 17 first_frame_id_in_list_(0), | 18 first_frame_id_in_list_(0), |
| 18 last_frame_id_in_list_(0) { | 19 last_frame_id_in_list_(0) { |
| 19 } | 20 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 uint8 index_8bits = first_frame_id_in_list_ & 0xFF; | 57 uint8 index_8bits = first_frame_id_in_list_ & 0xFF; |
| 57 index_8bits = frame_id_8bits - index_8bits; | 58 index_8bits = frame_id_8bits - index_8bits; |
| 58 if (index_8bits >= frames_.size()) | 59 if (index_8bits >= frames_.size()) |
| 59 return NULL; | 60 return NULL; |
| 60 return &(frames_[index_8bits]); | 61 return &(frames_[index_8bits]); |
| 61 } | 62 } |
| 62 | 63 |
| 63 } // namespace transport | 64 } // namespace transport |
| 64 } // namespace cast | 65 } // namespace cast |
| 65 } // namespace media | 66 } // namespace media |
| OLD | NEW |