OLD | NEW |
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 #ifndef MEDIA_CAST_NET_RTP_FRAMER_H_ | 5 #ifndef MEDIA_CAST_NET_RTP_FRAMER_H_ |
6 #define MEDIA_CAST_NET_RTP_FRAMER_H_ | 6 #define MEDIA_CAST_NET_RTP_FRAMER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
| 12 #include <memory> |
12 | 13 |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/linked_ptr.h" | 15 #include "base/memory/linked_ptr.h" |
15 #include "base/memory/scoped_ptr.h" | |
16 #include "base/time/tick_clock.h" | 16 #include "base/time/tick_clock.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "media/cast/net/rtp/cast_message_builder.h" | 18 #include "media/cast/net/rtp/cast_message_builder.h" |
19 #include "media/cast/net/rtp/frame_buffer.h" | 19 #include "media/cast/net/rtp/frame_buffer.h" |
20 #include "media/cast/net/rtp/rtp_defines.h" | 20 #include "media/cast/net/rtp/rtp_defines.h" |
21 | 21 |
22 namespace media { | 22 namespace media { |
23 namespace cast { | 23 namespace cast { |
24 | 24 |
25 typedef std::map<uint32_t, linked_ptr<FrameBuffer>> FrameList; | 25 typedef std::map<uint32_t, linked_ptr<FrameBuffer>> FrameList; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void GetMissingPackets(uint32_t frame_id, | 77 void GetMissingPackets(uint32_t frame_id, |
78 bool last_frame, | 78 bool last_frame, |
79 PacketIdSet* missing_packets) const; | 79 PacketIdSet* missing_packets) const; |
80 | 80 |
81 private: | 81 private: |
82 bool ContinuousFrame(FrameBuffer* frame) const; | 82 bool ContinuousFrame(FrameBuffer* frame) const; |
83 bool DecodableFrame(FrameBuffer* frame) const; | 83 bool DecodableFrame(FrameBuffer* frame) const; |
84 | 84 |
85 const bool decoder_faster_than_max_frame_rate_; | 85 const bool decoder_faster_than_max_frame_rate_; |
86 FrameList frames_; | 86 FrameList frames_; |
87 scoped_ptr<CastMessageBuilder> cast_msg_builder_; | 87 std::unique_ptr<CastMessageBuilder> cast_msg_builder_; |
88 bool waiting_for_key_; | 88 bool waiting_for_key_; |
89 uint32_t last_released_frame_; | 89 uint32_t last_released_frame_; |
90 uint32_t newest_frame_id_; | 90 uint32_t newest_frame_id_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(Framer); | 92 DISALLOW_COPY_AND_ASSIGN(Framer); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace cast | 95 } // namespace cast |
96 } // namespace media | 96 } // namespace media |
97 | 97 |
98 #endif // MEDIA_CAST_NET_RTP_FRAMER_H_ | 98 #endif // MEDIA_CAST_NET_RTP_FRAMER_H_ |
OLD | NEW |