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

Unified Diff: extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.h

Issue 1905673002: [chrome.displaySource] Add common functionality to base video encoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: 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
« no previous file with comments | « no previous file | extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.h
diff --git a/extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.h b/extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.h
index c612089b1ffb0771fc491d98c9ca47135d33b599..99741006f2f7947c9f75d93bceb0c4fc6cb07fdd 100644
--- a/extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.h
+++ b/extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.h
@@ -78,13 +78,12 @@ class WiFiDisplayVideoEncoder :
// Encodes the given raw frame. The resulting encoded frame is passed
// as an |encoded_callback|'s argument which is set via 'SetCallbacks'
// method.
- virtual void InsertRawVideoFrame(
- const scoped_refptr<media::VideoFrame>& video_frame,
- base::TimeTicks reference_time) = 0;
+ void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame,
+ base::TimeTicks reference_time);
// Requests the next encoded frame to be an instantaneous decoding refresh
// (IDR) picture.
- virtual void RequestIDRPicture() = 0;
+ void RequestIDRPicture() { send_idr_ = true; }
Mikhail 2016/04/22 09:28:34 pls. move body to .cc
e_hakkinen 2016/04/22 09:54:50 Done.
// Sets callbacks for the obtained encoder instance:
// |encoded_callback| is invoked to return the next encoded frame
@@ -94,11 +93,19 @@ class WiFiDisplayVideoEncoder :
protected:
friend class base::RefCountedThreadSafe<WiFiDisplayVideoEncoder>;
- WiFiDisplayVideoEncoder();
+ WiFiDisplayVideoEncoder(
Mikhail 2016/04/22 09:28:34 explicit
e_hakkinen 2016/04/22 09:54:50 Done.
+ const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner);
Mikhail 2016/04/22 09:28:34 think we can pass just scoped_refptr<base::SingleT
e_hakkinen 2016/04/22 09:54:50 Done.
virtual ~WiFiDisplayVideoEncoder();
+ virtual void InsertFrameOnMediaThread(
+ scoped_refptr<media::VideoFrame> video_frame,
+ base::TimeTicks reference_time,
+ bool send_idr) = 0;
+
EncodedFrameCallback encoded_callback_;
base::Closure error_callback_;
+ scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
+ bool send_idr_;
};
} // namespace extensions
« no previous file with comments | « no previous file | extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698