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_SENDER_VIDEO_SENDER_H_ | 5 #ifndef MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
6 #define MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 6 #define MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // packets, congestion control, video encoder, parsing and sending of | 39 // packets, congestion control, video encoder, parsing and sending of |
40 // RTCP packets. | 40 // RTCP packets. |
41 // Additionally it posts a bunch of delayed tasks to the main thread for various | 41 // Additionally it posts a bunch of delayed tasks to the main thread for various |
42 // timeouts. | 42 // timeouts. |
43 class VideoSender : public base::NonThreadSafe, | 43 class VideoSender : public base::NonThreadSafe, |
44 public base::SupportsWeakPtr<VideoSender> { | 44 public base::SupportsWeakPtr<VideoSender> { |
45 public: | 45 public: |
46 VideoSender(scoped_refptr<CastEnvironment> cast_environment, | 46 VideoSender(scoped_refptr<CastEnvironment> cast_environment, |
47 const VideoSenderConfig& video_config, | 47 const VideoSenderConfig& video_config, |
48 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, | 48 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, |
49 const CastInitializationCallback& initialization_status, | 49 const CastInitializationCallback& cast_initialization_cb, |
50 transport::CastTransportSender* const transport_sender); | 50 transport::CastTransportSender* const transport_sender); |
51 | 51 |
52 virtual ~VideoSender(); | 52 virtual ~VideoSender(); |
53 | 53 |
54 // The video_frame must be valid until the closure callback is called. | 54 // The video_frame must be valid until the closure callback is called. |
55 // The closure callback is called from the video encoder thread as soon as | 55 // The closure callback is called from the video encoder thread as soon as |
56 // the encoder is done with the frame; it does not mean that the encoded frame | 56 // the encoder is done with the frame; it does not mean that the encoded frame |
57 // has been sent out. | 57 // has been sent out. |
58 void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, | 58 void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, |
59 const base::TimeTicks& capture_time); | 59 const base::TimeTicks& capture_time); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 bool initialized_; | 132 bool initialized_; |
133 base::WeakPtrFactory<VideoSender> weak_factory_; | 133 base::WeakPtrFactory<VideoSender> weak_factory_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 135 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
136 }; | 136 }; |
137 | 137 |
138 } // namespace cast | 138 } // namespace cast |
139 } // namespace media | 139 } // namespace media |
140 | 140 |
141 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 141 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
OLD | NEW |