Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: remoting/codec/video_encoder_vpx.h

Issue 304653002: Extend VideoControl to allow clients to request lossless modes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/codec/video_encoder.h ('k') | remoting/codec/video_encoder_vpx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/video_encoder_vpx.h
diff --git a/remoting/codec/video_encoder_vpx.h b/remoting/codec/video_encoder_vpx.h
index 8a8d68be642b8999c66cf3c6fbf8a0febb609cb9..133b754ec4c0e7554a37f6adde472a285217ca03 100644
--- a/remoting/codec/video_encoder_vpx.h
+++ b/remoting/codec/video_encoder_vpx.h
@@ -23,25 +23,18 @@ class VideoEncoderVpx : public VideoEncoder {
public:
// Create encoder for the specified protocol.
static scoped_ptr<VideoEncoderVpx> CreateForVP8();
- static scoped_ptr<VideoEncoderVpx> CreateForVP9I420();
- static scoped_ptr<VideoEncoderVpx> CreateForVP9I444();
+ static scoped_ptr<VideoEncoderVpx> CreateForVP9();
virtual ~VideoEncoderVpx();
// VideoEncoder interface.
+ virtual void SetLosslessEncode(bool want_lossless) OVERRIDE;
+ virtual void SetLosslessColor(bool want_lossless) OVERRIDE;
virtual scoped_ptr<VideoPacket> Encode(
const webrtc::DesktopFrame& frame) OVERRIDE;
private:
- typedef base::Callback<ScopedVpxCodec(const webrtc::DesktopSize&)>
- CreateCodecCallback;
- typedef base::Callback<void(const webrtc::DesktopSize&,
- scoped_ptr<vpx_image_t>* out_image,
- scoped_ptr<uint8[]>* out_image_buffer)>
- CreateImageCallback;
-
- VideoEncoderVpx(const CreateCodecCallback& create_codec,
- const CreateImageCallback& create_image);
+ explicit VideoEncoderVpx(bool use_vp9);
// Initializes the codec for frames of |size|. Returns true if successful.
bool Initialize(const webrtc::DesktopSize& size);
@@ -55,8 +48,13 @@ class VideoEncoderVpx : public VideoEncoder {
// given to the encoder to speed up encoding.
void PrepareActiveMap(const webrtc::DesktopRegion& updated_region);
- CreateCodecCallback create_codec_;
- CreateImageCallback create_image_;
+ // True if the encoder should generate VP9, false for VP8.
+ bool use_vp9_;
+
+ // Options controlling VP9 encode quantization and color space.
+ // These are always off (false) for VP8.
+ bool lossless_encode_;
+ bool lossless_color_;
ScopedVpxCodec codec_;
base::TimeTicks timestamp_base_;
« no previous file with comments | « remoting/codec/video_encoder.h ('k') | remoting/codec/video_encoder_vpx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698