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_RECEIVER_FRAME_RECEIVER_H_ | 5 #ifndef MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ |
6 #define MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ | 6 #define MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void RequestEncodedFrame(const ReceiveEncodedFrameCallback& callback); | 62 void RequestEncodedFrame(const ReceiveEncodedFrameCallback& callback); |
63 | 63 |
64 // Called to deliver another packet, possibly a duplicate, and possibly | 64 // Called to deliver another packet, possibly a duplicate, and possibly |
65 // out-of-order. Returns true if the parsing of the packet succeeded. | 65 // out-of-order. Returns true if the parsing of the packet succeeded. |
66 bool ProcessPacket(scoped_ptr<Packet> packet); | 66 bool ProcessPacket(scoped_ptr<Packet> packet); |
67 | 67 |
68 protected: | 68 protected: |
69 friend class FrameReceiverTest; // Invokes ProcessParsedPacket(). | 69 friend class FrameReceiverTest; // Invokes ProcessParsedPacket(). |
70 | 70 |
71 void ProcessParsedPacket(const RtpCastHeader& rtp_header, | 71 void ProcessParsedPacket(const RtpCastHeader& rtp_header, |
72 const uint8* payload_data, | 72 const uint8_t* payload_data, |
73 size_t payload_size); | 73 size_t payload_size); |
74 | 74 |
75 // RtpPayloadFeedback implementation. | 75 // RtpPayloadFeedback implementation. |
76 void CastFeedback(const RtcpCastMessage& cast_message) final; | 76 void CastFeedback(const RtcpCastMessage& cast_message) final; |
77 | 77 |
78 private: | 78 private: |
79 // Processes ready-to-consume packets from |framer_|, decrypting each packet's | 79 // Processes ready-to-consume packets from |framer_|, decrypting each packet's |
80 // payload data, and then running the enqueued callbacks in order (one for | 80 // payload data, and then running the enqueued callbacks in order (one for |
81 // each packet). This method may post a delayed task to re-invoke itself in | 81 // each packet). This method may post a delayed task to re-invoke itself in |
82 // the future to wait for missing/incomplete frames. | 82 // the future to wait for missing/incomplete frames. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // NOTE: Weak pointers must be invalidated before all other member variables. | 182 // NOTE: Weak pointers must be invalidated before all other member variables. |
183 base::WeakPtrFactory<FrameReceiver> weak_factory_; | 183 base::WeakPtrFactory<FrameReceiver> weak_factory_; |
184 | 184 |
185 DISALLOW_COPY_AND_ASSIGN(FrameReceiver); | 185 DISALLOW_COPY_AND_ASSIGN(FrameReceiver); |
186 }; | 186 }; |
187 | 187 |
188 } // namespace cast | 188 } // namespace cast |
189 } // namespace media | 189 } // namespace media |
190 | 190 |
191 #endif // MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ | 191 #endif // MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ |
OLD | NEW |