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

Unified Diff: webrtc/video_encoder.h

Issue 2484863009: Move VideoEncoderSoftwareFallbackWrapper from webrtc/video_encoder.h to webrtc/media/engine/ (Closed)
Patch Set: Rebase Created 4 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 | « webrtc/video/video_encoder_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_encoder.h
diff --git a/webrtc/video_encoder.h b/webrtc/video_encoder.h
index 8bfa72fe1ef47e83ec38961ef5f01e4dbb7b0edf..39a27a8bfcdb32707a10f759f00e244fc4227bc0 100644
--- a/webrtc/video_encoder.h
+++ b/webrtc/video_encoder.h
@@ -156,56 +156,5 @@ class VideoEncoder {
virtual const char* ImplementationName() const { return "unknown"; }
};
-// Class used to wrap external VideoEncoders to provide a fallback option on
-// software encoding when a hardware encoder fails to encode a stream due to
-// hardware restrictions, such as max resolution.
-class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder {
- public:
- VideoEncoderSoftwareFallbackWrapper(VideoCodecType codec_type,
- webrtc::VideoEncoder* encoder);
-
- int32_t InitEncode(const VideoCodec* codec_settings,
- int32_t number_of_cores,
- size_t max_payload_size) override;
-
- int32_t RegisterEncodeCompleteCallback(
- EncodedImageCallback* callback) override;
-
- int32_t Release() override;
- int32_t Encode(const VideoFrame& frame,
- const CodecSpecificInfo* codec_specific_info,
- const std::vector<FrameType>* frame_types) override;
- int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
-
- int32_t SetRates(uint32_t bitrate, uint32_t framerate) override;
- void OnDroppedFrame() override;
- bool SupportsNativeHandle() const override;
-
- private:
- bool InitFallbackEncoder();
-
- // Settings used in the last InitEncode call and used if a dynamic fallback to
- // software is required.
- VideoCodec codec_settings_;
- int32_t number_of_cores_;
- size_t max_payload_size_;
-
- // The last bitrate/framerate set, and a flag for noting they are set.
- bool rates_set_;
- uint32_t bitrate_;
- uint32_t framerate_;
-
- // The last channel parameters set, and a flag for noting they are set.
- bool channel_parameters_set_;
- uint32_t packet_loss_;
- int64_t rtt_;
-
- const EncoderType encoder_type_;
- webrtc::VideoEncoder* const encoder_;
-
- std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_;
- std::string fallback_implementation_name_;
- EncodedImageCallback* callback_;
-};
} // namespace webrtc
#endif // WEBRTC_VIDEO_ENCODER_H_
« no previous file with comments | « webrtc/video/video_encoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698