| 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_VIDEO_SENDER_VIDEO_ENCODER_IMPL_H_ | 5 #ifndef MEDIA_CAST_VIDEO_SENDER_VIDEO_ENCODER_IMPL_H_ |
| 6 #define MEDIA_CAST_VIDEO_SENDER_VIDEO_ENCODER_IMPL_H_ | 6 #define MEDIA_CAST_VIDEO_SENDER_VIDEO_ENCODER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "media/cast/cast_config.h" | 10 #include "media/cast/cast_config.h" |
| 11 #include "media/cast/cast_environment.h" | 11 #include "media/cast/cast_environment.h" |
| 12 #include "media/cast/video_sender/codecs/vp8/vp8_encoder.h" | 12 #include "media/cast/video_sender/codecs/vp8/vp8_encoder.h" |
| 13 #include "media/cast/video_sender/video_encoder.h" | 13 #include "media/cast/video_sender/video_encoder.h" |
| 14 | 14 |
| 15 namespace media { | 15 namespace media { |
| 16 class VideoFrame; | 16 class VideoFrame; |
| 17 | 17 |
| 18 namespace cast { | 18 namespace cast { |
| 19 | 19 |
| 20 // This object is called external from the main cast thread and internally from | 20 // This object is called external from the main cast thread and internally from |
| 21 // the video encoder thread. | 21 // the video encoder thread. |
| 22 class VideoEncoderImpl : public VideoEncoder { | 22 class VideoEncoderImpl : public VideoEncoder { |
| 23 public: | 23 public: |
| 24 typedef base::Callback<void(scoped_ptr<transport::EncodedVideoFrame>, | 24 typedef base::Callback<void(scoped_ptr<EncodedVideoFrame>, |
| 25 const base::TimeTicks&)> FrameEncodedCallback; | 25 const base::TimeTicks&)> FrameEncodedCallback; |
| 26 | 26 |
| 27 VideoEncoderImpl(scoped_refptr<CastEnvironment> cast_environment, | 27 VideoEncoderImpl(scoped_refptr<CastEnvironment> cast_environment, |
| 28 const VideoSenderConfig& video_config, | 28 const VideoSenderConfig& video_config, |
| 29 uint8 max_unacked_frames); | 29 uint8 max_unacked_frames); |
| 30 | 30 |
| 31 virtual ~VideoEncoderImpl(); | 31 virtual ~VideoEncoderImpl(); |
| 32 | 32 |
| 33 // Called from the main cast thread. This function post the encode task to the | 33 // Called from the main cast thread. This function post the encode task to the |
| 34 // video encoder thread; | 34 // video encoder thread; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 bool skip_next_frame_; | 71 bool skip_next_frame_; |
| 72 int skip_count_; | 72 int skip_count_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(VideoEncoderImpl); | 74 DISALLOW_COPY_AND_ASSIGN(VideoEncoderImpl); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace cast | 77 } // namespace cast |
| 78 } // namespace media | 78 } // namespace media |
| 79 | 79 |
| 80 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_ENCODER_IMPL_H_ | 80 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_ENCODER_IMPL_H_ |
| OLD | NEW |