diff options
Diffstat (limited to 'media/cast/video_sender/codecs/vp8/vp8_encoder.h')
-rw-r--r-- | media/cast/video_sender/codecs/vp8/vp8_encoder.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/media/cast/video_sender/codecs/vp8/vp8_encoder.h b/media/cast/video_sender/codecs/vp8/vp8_encoder.h index 777f862e4a..d09cc27dab 100644 --- a/media/cast/video_sender/codecs/vp8/vp8_encoder.h +++ b/media/cast/video_sender/codecs/vp8/vp8_encoder.h @@ -10,6 +10,10 @@ #include "media/cast/cast_config.h" #include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h" +namespace media { +class VideoFrame; +} + // VPX forward declaration. typedef struct vpx_codec_ctx vpx_enc_ctx_t; @@ -26,7 +30,7 @@ class Vp8Encoder { ~Vp8Encoder(); // Encode a raw image (as a part of a video stream). - bool Encode(const I420VideoFrame& input_image, + bool Encode(const scoped_refptr<media::VideoFrame>& video_frame, EncodedVideoFrame* encoded_image); // Update the encoder with a new target bit rate. @@ -35,7 +39,7 @@ class Vp8Encoder { // Set the next frame to be a key frame. void GenerateKeyFrame(); - void LatestFrameIdToReference(uint8 frame_id); + void LatestFrameIdToReference(uint32 frame_id); private: enum Vp8Buffers { @@ -54,7 +58,7 @@ class Vp8Encoder { Vp8Buffers GetNextBufferToUpdate(); // Calculate which previous frame to reference. - uint8 GetLatestFrameIdToReference(); + uint32 GetLatestFrameIdToReference(); // Get encoder flags for our referenced encoder buffers. void GetCodecReferenceFlags(vpx_codec_flags_t* flags); @@ -74,8 +78,8 @@ class Vp8Encoder { bool key_frame_requested_; int64 timestamp_; - uint8 last_encoded_frame_id_; - uint8 used_buffers_frame_id_[kNumberOfVp8VideoBuffers]; + uint32 last_encoded_frame_id_; + uint32 used_buffers_frame_id_[kNumberOfVp8VideoBuffers]; bool acked_frame_buffers_[kNumberOfVp8VideoBuffers]; Vp8Buffers last_used_vp8_buffer_; int number_of_repeated_buffers_; |