| 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_CODECS_VP8_VP8_ENCODER_H_ | 5 #ifndef MEDIA_CAST_VIDEO_SENDER_CODECS_VP8_VP8_ENCODER_H_ |
| 6 #define MEDIA_CAST_VIDEO_SENDER_CODECS_VP8_VP8_ENCODER_H_ | 6 #define MEDIA_CAST_VIDEO_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 "media/cast/cast_config.h" | 10 #include "media/cast/cast_config.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 class Vp8Encoder { | 25 class Vp8Encoder { |
| 26 public: | 26 public: |
| 27 Vp8Encoder(const VideoSenderConfig& video_config, | 27 Vp8Encoder(const VideoSenderConfig& video_config, |
| 28 uint8 max_unacked_frames); | 28 uint8 max_unacked_frames); |
| 29 | 29 |
| 30 ~Vp8Encoder(); | 30 ~Vp8Encoder(); |
| 31 | 31 |
| 32 // Encode a raw image (as a part of a video stream). | 32 // Encode a raw image (as a part of a video stream). |
| 33 bool Encode(const scoped_refptr<media::VideoFrame>& video_frame, | 33 bool Encode(const scoped_refptr<media::VideoFrame>& video_frame, |
| 34 transport::EncodedVideoFrame* encoded_image); | 34 EncodedVideoFrame* encoded_image); |
| 35 | 35 |
| 36 // Update the encoder with a new target bit rate. | 36 // Update the encoder with a new target bit rate. |
| 37 void UpdateRates(uint32 new_bitrate); | 37 void UpdateRates(uint32 new_bitrate); |
| 38 | 38 |
| 39 // Set the next frame to be a key frame. | 39 // Set the next frame to be a key frame. |
| 40 void GenerateKeyFrame(); | 40 void GenerateKeyFrame(); |
| 41 | 41 |
| 42 void LatestFrameIdToReference(uint32 frame_id); | 42 void LatestFrameIdToReference(uint32 frame_id); |
| 43 | 43 |
| 44 private: | 44 private: |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 uint32 used_buffers_frame_id_[kNumberOfVp8VideoBuffers]; | 82 uint32 used_buffers_frame_id_[kNumberOfVp8VideoBuffers]; |
| 83 bool acked_frame_buffers_[kNumberOfVp8VideoBuffers]; | 83 bool acked_frame_buffers_[kNumberOfVp8VideoBuffers]; |
| 84 Vp8Buffers last_used_vp8_buffer_; | 84 Vp8Buffers last_used_vp8_buffer_; |
| 85 int number_of_repeated_buffers_; | 85 int number_of_repeated_buffers_; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace cast | 88 } // namespace cast |
| 89 } // namespace media | 89 } // namespace media |
| 90 | 90 |
| 91 #endif // MEDIA_CAST_VIDEO_SENDER_CODECS_VP8_VP8_ENCODER_H_ | 91 #endif // MEDIA_CAST_VIDEO_SENDER_CODECS_VP8_VP8_ENCODER_H_ |
| OLD | NEW |