| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <list> | 11 #include <list> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "media/cast/cast_receiver.h" | 18 #include "media/cast/cast_receiver.h" |
| 19 #include "media/cast/common/clock_drift_smoother.h" | 19 #include "media/cast/common/clock_drift_smoother.h" |
| 20 #include "media/cast/common/rtp_time.h" | 20 #include "media/cast/common/rtp_time.h" |
| 21 #include "media/cast/common/transport_encryption_handler.h" | 21 #include "media/cast/common/transport_encryption_handler.h" |
| 22 #include "media/cast/logging/logging_defines.h" | 22 #include "media/cast/logging/logging_defines.h" |
| 23 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h" | 23 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h" |
| 24 #include "media/cast/net/rtcp/rtcp.h" | 24 #include "media/cast/net/rtcp/receiver_rtcp_session.h" |
| 25 #include "media/cast/net/rtp/framer.h" | 25 #include "media/cast/net/rtp/framer.h" |
| 26 #include "media/cast/net/rtp/receiver_stats.h" | 26 #include "media/cast/net/rtp/receiver_stats.h" |
| 27 #include "media/cast/net/rtp/rtp_defines.h" | 27 #include "media/cast/net/rtp/rtp_defines.h" |
| 28 #include "media/cast/net/rtp/rtp_parser.h" | 28 #include "media/cast/net/rtp/rtp_parser.h" |
| 29 | 29 |
| 30 namespace media { | 30 namespace media { |
| 31 namespace cast { | 31 namespace cast { |
| 32 | 32 |
| 33 class CastEnvironment; | 33 class CastEnvironment; |
| 34 | 34 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // after receiving a first packet (since the first packet identifies the | 154 // after receiving a first packet (since the first packet identifies the |
| 155 // sender for the remainder of the session). | 155 // sender for the remainder of the session). |
| 156 bool reports_are_scheduled_; | 156 bool reports_are_scheduled_; |
| 157 | 157 |
| 158 // Assembles packets into frames, providing this receiver with complete, | 158 // Assembles packets into frames, providing this receiver with complete, |
| 159 // decodable EncodedFrames. | 159 // decodable EncodedFrames. |
| 160 Framer framer_; | 160 Framer framer_; |
| 161 | 161 |
| 162 // Manages sending/receiving of RTCP packets, including sender/receiver | 162 // Manages sending/receiving of RTCP packets, including sender/receiver |
| 163 // reports. | 163 // reports. |
| 164 Rtcp rtcp_; | 164 ReceiverRtcpSession rtcp_; |
| 165 | 165 |
| 166 // Decrypts encrypted frames. | 166 // Decrypts encrypted frames. |
| 167 TransportEncryptionHandler decryptor_; | 167 TransportEncryptionHandler decryptor_; |
| 168 | 168 |
| 169 // Outstanding callbacks to run to deliver on client requests for frames. | 169 // Outstanding callbacks to run to deliver on client requests for frames. |
| 170 std::list<ReceiveEncodedFrameCallback> frame_request_queue_; | 170 std::list<ReceiveEncodedFrameCallback> frame_request_queue_; |
| 171 | 171 |
| 172 // True while there's an outstanding task to re-invoke | 172 // True while there's an outstanding task to re-invoke |
| 173 // EmitAvailableEncodedFrames(). | 173 // EmitAvailableEncodedFrames(). |
| 174 bool is_waiting_for_consecutive_frame_; | 174 bool is_waiting_for_consecutive_frame_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 187 // NOTE: Weak pointers must be invalidated before all other member variables. | 187 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 188 base::WeakPtrFactory<FrameReceiver> weak_factory_; | 188 base::WeakPtrFactory<FrameReceiver> weak_factory_; |
| 189 | 189 |
| 190 DISALLOW_COPY_AND_ASSIGN(FrameReceiver); | 190 DISALLOW_COPY_AND_ASSIGN(FrameReceiver); |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 } // namespace cast | 193 } // namespace cast |
| 194 } // namespace media | 194 } // namespace media |
| 195 | 195 |
| 196 #endif // MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ | 196 #endif // MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ |
| OLD | NEW |