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

Side by Side 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: Rebase 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDEO_E NCODER_H_ 5 #ifndef EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDEO_E NCODER_H_
6 #define EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDEO_E NCODER_H_ 6 #define EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDEO_E NCODER_H_
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "extensions/renderer/api/display_source/wifi_display/wifi_display_media _encoder.h" 9 #include "extensions/renderer/api/display_source/wifi_display/wifi_display_media _encoder.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // A factory method that creates a new encoder instance from the given 51 // A factory method that creates a new encoder instance from the given
52 // |params|, the encoder instance is returned as an argument of 52 // |params|, the encoder instance is returned as an argument of
53 // |result_callback| ('nullptr' argument means encoder creation failure). 53 // |result_callback| ('nullptr' argument means encoder creation failure).
54 static void Create(const InitParameters& params, 54 static void Create(const InitParameters& params,
55 const VideoEncoderCallback& encoder_callback); 55 const VideoEncoderCallback& encoder_callback);
56 56
57 // Encodes the given raw frame. The resulting encoded frame is passed 57 // Encodes the given raw frame. The resulting encoded frame is passed
58 // as an |encoded_callback|'s argument which is set via 'SetCallbacks' 58 // as an |encoded_callback|'s argument which is set via 'SetCallbacks'
59 // method. 59 // method.
60 virtual void InsertRawVideoFrame( 60 void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame,
61 const scoped_refptr<media::VideoFrame>& video_frame, 61 base::TimeTicks reference_time);
62 base::TimeTicks reference_time) = 0;
63 62
64 // Requests the next encoded frame to be an instantaneous decoding refresh 63 // Requests the next encoded frame to be an instantaneous decoding refresh
65 // (IDR) picture. 64 // (IDR) picture.
66 virtual void RequestIDRPicture() = 0; 65 void RequestIDRPicture();
67 66
68 protected: 67 protected:
69 WiFiDisplayVideoEncoder(); 68 explicit WiFiDisplayVideoEncoder(
69 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner);
70 ~WiFiDisplayVideoEncoder() override; 70 ~WiFiDisplayVideoEncoder() override;
71
72 virtual void InsertFrameOnMediaThread(
73 scoped_refptr<media::VideoFrame> video_frame,
74 base::TimeTicks reference_time,
75 bool send_idr) = 0;
76
77 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
78 bool send_idr_;
71 }; 79 };
72 80
73 } // namespace extensions 81 } // namespace extensions
74 82
75 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDE O_ENCODER_H_ 83 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDE O_ENCODER_H_
OLDNEW
« 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