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

Unified Diff: media/cast/sender/size_adaptable_video_encoder_base.h

Issue 1913503002: Memory copy the VideoFrame to match the requirement for HW encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 8 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
Index: media/cast/sender/size_adaptable_video_encoder_base.h
diff --git a/media/cast/sender/size_adaptable_video_encoder_base.h b/media/cast/sender/size_adaptable_video_encoder_base.h
index b12119f2cc0a8f2c4994f572397c2451a0072be9..5ab423fa5f8ce2b512f0e542279ace1ef8a3e5d4 100644
--- a/media/cast/sender/size_adaptable_video_encoder_base.h
+++ b/media/cast/sender/size_adaptable_video_encoder_base.h
@@ -9,7 +9,6 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
@@ -41,7 +40,7 @@ class SizeAdaptableVideoEncoderBase : public VideoEncoder {
const FrameEncodedCallback& frame_encoded_callback) final;
void SetBitRate(int new_bit_rate) final;
void GenerateKeyFrame() final;
- scoped_ptr<VideoFrameFactory> CreateVideoFrameFactory() final;
+ std::unique_ptr<VideoFrameFactory> CreateVideoFrameFactory() final;
void EmitFrames() final;
protected:
@@ -65,7 +64,7 @@ class SizeAdaptableVideoEncoderBase : public VideoEncoder {
// Overridden by subclasses to create a new encoder instance that handles
// frames of the size specified by |frame_size()|.
- virtual scoped_ptr<VideoEncoder> CreateEncoder() = 0;
+ virtual std::unique_ptr<VideoEncoder> CreateEncoder() = 0;
// Overridden by subclasses to perform additional steps when
// |replacement_encoder| becomes the active encoder.
@@ -86,7 +85,7 @@ class SizeAdaptableVideoEncoderBase : public VideoEncoder {
// Called by the |encoder_| with the next EncodedFrame.
void OnEncodedVideoFrame(const FrameEncodedCallback& frame_encoded_callback,
- scoped_ptr<SenderEncodedFrame> encoded_frame);
+ std::unique_ptr<SenderEncodedFrame> encoded_frame);
const scoped_refptr<CastEnvironment> cast_environment_;
@@ -98,7 +97,7 @@ class SizeAdaptableVideoEncoderBase : public VideoEncoder {
const StatusChangeCallback status_change_cb_;
// The underlying platform video encoder and the frame size it expects.
- scoped_ptr<VideoEncoder> encoder_;
+ std::unique_ptr<VideoEncoder> encoder_;
gfx::Size frame_size_;
// The number of frames in |encoder_|'s pipeline. If this is set to

Powered by Google App Engine
This is Rietveld 408576698