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

Side by Side Diff: extensions/renderer/api/display_source/wifi_display/wifi_display_video_encoder.h

Issue 1900233004: [chrome.displaySource] Implement software based H.264 video encoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Check proprietary_codecs Created 4 years, 7 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, 60 void InsertRawVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame,
61 base::TimeTicks reference_time); 61 base::TimeTicks reference_time);
62 62
63 // Requests the next encoded frame to be an instantaneous decoding refresh 63 // Requests the next encoded frame to be an instantaneous decoding refresh
64 // (IDR) picture. 64 // (IDR) picture.
65 void RequestIDRPicture(); 65 void RequestIDRPicture();
66 66
67 protected: 67 protected:
68 // A factory method that creates a new encoder instance which uses OpenH264
69 // SVC encoder for encoding.
70 static void CreateSVC(const InitParameters& params,
71 const VideoEncoderCallback& encoder_callback);
72
68 // A factory method that creates a new encoder instance which uses Video 73 // A factory method that creates a new encoder instance which uses Video
69 // Encode Accelerator (VEA) for encoding. 74 // Encode Accelerator (VEA) for encoding.
70 static void CreateVEA(const InitParameters& params, 75 static void CreateVEA(const InitParameters& params,
71 const VideoEncoderCallback& encoder_callback); 76 const VideoEncoderCallback& encoder_callback);
77 static void OnCreatedVEA(const InitParameters& params,
78 const VideoEncoderCallback& encoder_callback,
79 scoped_refptr<WiFiDisplayVideoEncoder> vea_encoder);
72 80
73 explicit WiFiDisplayVideoEncoder( 81 explicit WiFiDisplayVideoEncoder(
74 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner); 82 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner);
75 ~WiFiDisplayVideoEncoder() override; 83 ~WiFiDisplayVideoEncoder() override;
76 84
77 virtual void InsertFrameOnMediaThread( 85 virtual void InsertFrameOnMediaThread(
78 scoped_refptr<media::VideoFrame> video_frame, 86 scoped_refptr<media::VideoFrame> video_frame,
79 base::TimeTicks reference_time, 87 base::TimeTicks reference_time,
80 bool send_idr) = 0; 88 bool send_idr) = 0;
81 89
82 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; 90 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
83 bool send_idr_; 91 bool send_idr_;
84 }; 92 };
85 93
86 } // namespace extensions 94 } // namespace extensions
87 95
88 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDE O_ENCODER_H_ 96 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_VIDE O_ENCODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698