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

Unified Diff: media/cast/cast_sender.h

Issue 688423003: [Cast] VideoFrameFactory interface to vend frames with encoder affinity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final patch cleanup. Created 6 years, 1 month 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/cast.gyp ('k') | media/cast/cast_sender_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_sender.h
diff --git a/media/cast/cast_sender.h b/media/cast/cast_sender.h
index 7615c28602c8f58052f4f7bf024c4eba79bc6bcc..841e1ba143ae97ef0c4fb3e15cbb571f6bdb4672 100644
--- a/media/cast/cast_sender.h
+++ b/media/cast/cast_sender.h
@@ -36,6 +36,19 @@ class VideoFrameInput : public base::RefCountedThreadSafe<VideoFrameInput> {
const scoped_refptr<media::VideoFrame>& video_frame,
const base::TimeTicks& capture_time) = 0;
+ // Creates a |VideoFrame| optimized for the encoder. When available, these
+ // frames offer performance benefits, such as memory copy elimination. The
+ // format is guaranteed to be I420 or NV12.
+ //
+ // Not every encoder supports this method. Use |ShouldCreateOptimizedFrame|
+ // to determine if you can and should use this method. Calling
+ // this method when |ShouldCreateOptimizedFrame| is false will CHECK.
+ virtual scoped_refptr<VideoFrame> CreateOptimizedFrame(
+ base::TimeDelta timestamp) = 0;
+
+ // Returns true if the encoder supports creating optimized frames.
+ virtual bool SupportsCreateOptimizedFrame() const = 0;
+
protected:
virtual ~VideoFrameInput() {}
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/cast_sender_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698