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 #ifndef MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ | 5 #ifndef MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ |
6 #define MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ | 6 #define MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
14 #include "base/time/tick_clock.h" | 14 #include "base/time/tick_clock.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "media/cast/cast_config.h" | 16 #include "media/cast/cast_config.h" |
17 #include "media/cast/cast_environment.h" | 17 #include "media/cast/cast_environment.h" |
18 #include "media/cast/cast_receiver.h" | 18 #include "media/cast/cast_receiver.h" |
19 #include "media/cast/rtcp/rtcp.h" | 19 #include "media/cast/rtcp/rtcp.h" |
20 #include "media/cast/rtp_receiver/rtp_receiver.h" | 20 #include "media/cast/rtp_receiver/rtp_receiver.h" |
21 #include "media/cast/rtp_receiver/rtp_receiver_defines.h" | 21 #include "media/cast/rtp_receiver/rtp_receiver_defines.h" |
22 | 22 |
23 namespace crypto { | 23 namespace crypto { |
24 class Encryptor; | 24 class Encryptor; |
25 class SymmetricKey; | 25 class SymmetricKey; |
26 } | 26 } |
27 | 27 |
28 namespace media { | 28 namespace media { |
29 namespace cast { | 29 namespace cast { |
30 | |
31 class Framer; | 30 class Framer; |
32 class LocalRtpVideoData; | 31 class LocalRtpVideoData; |
33 class LocalRtpVideoFeedback; | 32 class LocalRtpVideoFeedback; |
34 class PacedPacketSender; | |
35 class PeerVideoReceiver; | 33 class PeerVideoReceiver; |
36 class Rtcp; | 34 class Rtcp; |
37 class RtpReceiverStatistics; | 35 class RtpReceiverStatistics; |
38 class VideoDecoder; | 36 class VideoDecoder; |
39 | 37 |
40 // Should only be called from the Main cast thread. | 38 // Should only be called from the Main cast thread. |
41 class VideoReceiver : public base::NonThreadSafe, | 39 class VideoReceiver : public base::NonThreadSafe, |
42 public base::SupportsWeakPtr<VideoReceiver> { | 40 public base::SupportsWeakPtr<VideoReceiver> { |
43 public: | 41 public: |
44 VideoReceiver(scoped_refptr<CastEnvironment> cast_environment, | 42 VideoReceiver(scoped_refptr<CastEnvironment> cast_environment, |
45 const VideoReceiverConfig& video_config, | 43 const VideoReceiverConfig& video_config, |
46 PacedPacketSender* const packet_sender); | 44 transport::PacedPacketSender* const packet_sender); |
47 | 45 |
48 virtual ~VideoReceiver(); | 46 virtual ~VideoReceiver(); |
49 | 47 |
50 // Request a raw frame. Will return frame via callback when available. | 48 // Request a raw frame. Will return frame via callback when available. |
51 void GetRawVideoFrame(const VideoFrameDecodedCallback& callback); | 49 void GetRawVideoFrame(const VideoFrameDecodedCallback& callback); |
52 | 50 |
53 // Request an encoded frame. Will return frame via callback when available. | 51 // Request an encoded frame. Will return frame via callback when available. |
54 void GetEncodedVideoFrame(const VideoFrameEncodedCallback& callback); | 52 void GetEncodedVideoFrame(const VideoFrameEncodedCallback& callback); |
55 | 53 |
56 // Insert a RTP packet to the video receiver. | 54 // Insert a RTP packet to the video receiver. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 125 |
128 base::WeakPtrFactory<VideoReceiver> weak_factory_; | 126 base::WeakPtrFactory<VideoReceiver> weak_factory_; |
129 | 127 |
130 DISALLOW_COPY_AND_ASSIGN(VideoReceiver); | 128 DISALLOW_COPY_AND_ASSIGN(VideoReceiver); |
131 }; | 129 }; |
132 | 130 |
133 } // namespace cast | 131 } // namespace cast |
134 } // namespace media | 132 } // namespace media |
135 | 133 |
136 #endif // MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ | 134 #endif // MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ |
OLD | NEW |