| 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 29 matching lines...) Expand all Loading... |
| 40 // packets, congestion control, video encoder, parsing and sending of | 40 // packets, congestion control, video encoder, parsing and sending of |
| 41 // RTCP packets. | 41 // RTCP packets. |
| 42 // Additionally it posts a bunch of delayed tasks to the main thread for various | 42 // Additionally it posts a bunch of delayed tasks to the main thread for various |
| 43 // timeouts. | 43 // timeouts. |
| 44 class VideoSender : public base::NonThreadSafe, | 44 class VideoSender : public base::NonThreadSafe, |
| 45 public base::SupportsWeakPtr<VideoSender> { | 45 public base::SupportsWeakPtr<VideoSender> { |
| 46 public: | 46 public: |
| 47 VideoSender(scoped_refptr<CastEnvironment> cast_environment, | 47 VideoSender(scoped_refptr<CastEnvironment> cast_environment, |
| 48 const VideoSenderConfig& video_config, | 48 const VideoSenderConfig& video_config, |
| 49 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, | 49 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, |
| 50 const CastInitializationCallback& initialization_status, | 50 const CastInitializationCallback& cast_initialization_cb, |
| 51 transport::CastTransportSender* const transport_sender); | 51 transport::CastTransportSender* const transport_sender); |
| 52 | 52 |
| 53 virtual ~VideoSender(); | 53 virtual ~VideoSender(); |
| 54 | 54 |
| 55 // The video_frame must be valid until the closure callback is called. | 55 // The video_frame must be valid until the closure callback is called. |
| 56 // The closure callback is called from the video encoder thread as soon as | 56 // The closure callback is called from the video encoder thread as soon as |
| 57 // the encoder is done with the frame; it does not mean that the encoded frame | 57 // the encoder is done with the frame; it does not mean that the encoded frame |
| 58 // has been sent out. | 58 // has been sent out. |
| 59 void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, | 59 void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, |
| 60 const base::TimeTicks& capture_time); | 60 const base::TimeTicks& capture_time); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 bool active_session_; | 143 bool active_session_; |
| 144 base::WeakPtrFactory<VideoSender> weak_factory_; | 144 base::WeakPtrFactory<VideoSender> weak_factory_; |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 146 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace cast | 149 } // namespace cast |
| 150 } // namespace media | 150 } // namespace media |
| 151 | 151 |
| 152 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 152 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
| OLD | NEW |