| 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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 static bool ParseSenderSsrc(const uint8* packet, size_t length, uint32* ssrc); | 69 static bool ParseSenderSsrc(const uint8* packet, size_t length, uint32* ssrc); |
| 70 | 70 |
| 71 protected: | 71 protected: |
| 72 friend class FrameReceiverTest; // Invokes ProcessParsedPacket(). | 72 friend class FrameReceiverTest; // Invokes ProcessParsedPacket(). |
| 73 | 73 |
| 74 void ProcessParsedPacket(const RtpCastHeader& rtp_header, | 74 void ProcessParsedPacket(const RtpCastHeader& rtp_header, |
| 75 const uint8* payload_data, | 75 const uint8* payload_data, |
| 76 size_t payload_size); | 76 size_t payload_size); |
| 77 | 77 |
| 78 // RtpPayloadFeedback implementation. | 78 // RtpPayloadFeedback implementation. |
| 79 virtual void CastFeedback(const RtcpCastMessage& cast_message) OVERRIDE; | 79 virtual void CastFeedback(const RtcpCastMessage& cast_message) override; |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 // Processes ready-to-consume packets from |framer_|, decrypting each packet's | 82 // Processes ready-to-consume packets from |framer_|, decrypting each packet's |
| 83 // payload data, and then running the enqueued callbacks in order (one for | 83 // payload data, and then running the enqueued callbacks in order (one for |
| 84 // each packet). This method may post a delayed task to re-invoke itself in | 84 // each packet). This method may post a delayed task to re-invoke itself in |
| 85 // the future to wait for missing/incomplete frames. | 85 // the future to wait for missing/incomplete frames. |
| 86 void EmitAvailableEncodedFrames(); | 86 void EmitAvailableEncodedFrames(); |
| 87 | 87 |
| 88 // Clears the |is_waiting_for_consecutive_frame_| flag and invokes | 88 // Clears the |is_waiting_for_consecutive_frame_| flag and invokes |
| 89 // EmitAvailableEncodedFrames(). | 89 // EmitAvailableEncodedFrames(). |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // NOTE: Weak pointers must be invalidated before all other member variables. | 185 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 186 base::WeakPtrFactory<FrameReceiver> weak_factory_; | 186 base::WeakPtrFactory<FrameReceiver> weak_factory_; |
| 187 | 187 |
| 188 DISALLOW_COPY_AND_ASSIGN(FrameReceiver); | 188 DISALLOW_COPY_AND_ASSIGN(FrameReceiver); |
| 189 }; | 189 }; |
| 190 | 190 |
| 191 } // namespace cast | 191 } // namespace cast |
| 192 } // namespace media | 192 } // namespace media |
| 193 | 193 |
| 194 #endif // MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ | 194 #endif // MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ |
| OLD | NEW |