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

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

Issue 906403006: [Cast] Size-Adaptable platform video encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed hubbe's comments. Created 5 years, 10 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 | « media/cast/sender/size_adaptable_video_encoder_base.cc ('k') | media/cast/sender/video_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/video_encoder.h
diff --git a/media/cast/sender/video_encoder.h b/media/cast/sender/video_encoder.h
index 92e8547769981ba7294dd4129552e107b91f167c..94b0bbfe3c074b9241ba6b7425239f0c02f69732 100644
--- a/media/cast/sender/video_encoder.h
+++ b/media/cast/sender/video_encoder.h
@@ -8,27 +8,37 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "media/base/video_frame.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
+#include "media/cast/sender/video_frame_factory.h"
namespace media {
namespace cast {
-class VideoFrameFactory;
-
// All these functions are called from the main cast thread.
class VideoEncoder {
public:
typedef base::Callback<void(scoped_ptr<EncodedFrame>)> FrameEncodedCallback;
- virtual ~VideoEncoder() {}
+ // Creates a VideoEncoder instance from the given |video_config| and based on
+ // the current platform's hardware/library support; or null if no
+ // implementation will suffice. The instance will run |status_change_cb| at
+ // some point in the future to indicate initialization success/failure.
+ //
+ // All VideoEncoder instances returned by this function support encoding
+ // sequences of differently-size VideoFrames.
+ //
+ // TODO(miu): Remove the CreateVEA callbacks. http://crbug.com/454029
+ static scoped_ptr<VideoEncoder> Create(
+ const scoped_refptr<CastEnvironment>& cast_environment,
+ const VideoSenderConfig& video_config,
+ const StatusChangeCallback& status_change_cb,
+ const CreateVideoEncodeAcceleratorCallback& create_vea_cb,
+ const CreateVideoEncodeMemoryCallback& create_video_encode_memory_cb);
- // Returns true if the size of video frames passed in successive calls to
- // EncodedVideoFrame() can vary.
- virtual bool CanEncodeVariedFrameSizes() const = 0;
+ virtual ~VideoEncoder() {}
// If true is returned, the Encoder has accepted the request and will process
// it asynchronously, running |frame_encoded_callback| on the MAIN
« no previous file with comments | « media/cast/sender/size_adaptable_video_encoder_base.cc ('k') | media/cast/sender/video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698