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_SENDER_CODECS_VP8_VP8_ENCODER_H_ | 5 #ifndef MEDIA_CAST_SENDER_CODECS_VP8_VP8_ENCODER_H_ |
6 #define MEDIA_CAST_SENDER_CODECS_VP8_VP8_ENCODER_H_ | 6 #define MEDIA_CAST_SENDER_CODECS_VP8_VP8_ENCODER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class Vp8Encoder : public SoftwareVideoEncoder { | 23 class Vp8Encoder : public SoftwareVideoEncoder { |
24 public: | 24 public: |
25 explicit Vp8Encoder(const VideoSenderConfig& video_config); | 25 explicit Vp8Encoder(const VideoSenderConfig& video_config); |
26 | 26 |
27 ~Vp8Encoder() final; | 27 ~Vp8Encoder() final; |
28 | 28 |
29 // SoftwareVideoEncoder implementations. | 29 // SoftwareVideoEncoder implementations. |
30 void Initialize() final; | 30 void Initialize() final; |
31 void Encode(const scoped_refptr<media::VideoFrame>& video_frame, | 31 void Encode(const scoped_refptr<media::VideoFrame>& video_frame, |
32 const base::TimeTicks& reference_time, | 32 const base::TimeTicks& reference_time, |
33 SenderEncodedFrame* encoded_frame) final; | 33 EncodedFrame* encoded_frame) final; |
34 void UpdateRates(uint32 new_bitrate) final; | 34 void UpdateRates(uint32 new_bitrate) final; |
35 void GenerateKeyFrame() final; | 35 void GenerateKeyFrame() final; |
36 void LatestFrameIdToReference(uint32 frame_id) final; | 36 void LatestFrameIdToReference(uint32 frame_id) final; |
37 | 37 |
38 private: | 38 private: |
39 enum { kNumberOfVp8VideoBuffers = 3 }; | 39 enum { kNumberOfVp8VideoBuffers = 3 }; |
40 | 40 |
41 enum Vp8Buffers { | 41 enum Vp8Buffers { |
42 kAltRefBuffer = 0, | 42 kAltRefBuffer = 0, |
43 kGoldenBuffer = 1, | 43 kGoldenBuffer = 1, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // This is bound to the thread where Initialize() is called. | 114 // This is bound to the thread where Initialize() is called. |
115 base::ThreadChecker thread_checker_; | 115 base::ThreadChecker thread_checker_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(Vp8Encoder); | 117 DISALLOW_COPY_AND_ASSIGN(Vp8Encoder); |
118 }; | 118 }; |
119 | 119 |
120 } // namespace cast | 120 } // namespace cast |
121 } // namespace media | 121 } // namespace media |
122 | 122 |
123 #endif // MEDIA_CAST_SENDER_CODECS_VP8_VP8_ENCODER_H_ | 123 #endif // MEDIA_CAST_SENDER_CODECS_VP8_VP8_ENCODER_H_ |
OLD | NEW |