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

Side by Side Diff: webrtc/video_encoder.h

Issue 2263043003: Make MediaCodecEncoder fallback to a software encoder on failure. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes according to Stefan's comments. Created 4 years, 2 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 | « webrtc/video/video_encoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 class VideoEncoder { 76 class VideoEncoder {
77 public: 77 public:
78 enum EncoderType { 78 enum EncoderType {
79 kH264, 79 kH264,
80 kVp8, 80 kVp8,
81 kVp9, 81 kVp9,
82 kUnsupportedCodec, 82 kUnsupportedCodec,
83 }; 83 };
84 84
85 static VideoEncoder* Create(EncoderType codec_type); 85 static VideoEncoder* Create(EncoderType codec_type);
86 // Returns true if this type of encoder can be created using
87 // VideoEncoder::Create.
88 static bool IsSupportedSoftware(EncoderType codec_type);
89 static EncoderType CodecToEncoderType(VideoCodecType codec_type);
86 90
87 static VideoCodecVP8 GetDefaultVp8Settings(); 91 static VideoCodecVP8 GetDefaultVp8Settings();
88 static VideoCodecVP9 GetDefaultVp9Settings(); 92 static VideoCodecVP9 GetDefaultVp9Settings();
89 static VideoCodecH264 GetDefaultH264Settings(); 93 static VideoCodecH264 GetDefaultH264Settings();
90 94
91 virtual ~VideoEncoder() {} 95 virtual ~VideoEncoder() {}
92 96
93 // Initialize the encoder with the information from the codecSettings 97 // Initialize the encoder with the information from the codecSettings
94 // 98 //
95 // Input: 99 // Input:
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 215
212 const EncoderType encoder_type_; 216 const EncoderType encoder_type_;
213 webrtc::VideoEncoder* const encoder_; 217 webrtc::VideoEncoder* const encoder_;
214 218
215 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; 219 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_;
216 std::string fallback_implementation_name_; 220 std::string fallback_implementation_name_;
217 EncodedImageCallback* callback_; 221 EncodedImageCallback* callback_;
218 }; 222 };
219 } // namespace webrtc 223 } // namespace webrtc
220 #endif // WEBRTC_VIDEO_ENCODER_H_ 224 #endif // WEBRTC_VIDEO_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698