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

Unified Diff: webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h

Issue 2001153003: Integrate QualityScaler into VideoToolboxEncoder. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h
index d54fa612c3d4172dd347f9d02abbc342711d719a..5dfcf9f60a032e6ffec98b5644b9813003e2a677 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h
+++ b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h
@@ -12,9 +12,12 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_VIDEO_TOOLBOX_ENCODER_H_
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_VIDEO_TOOLBOX_ENCODER_H_
+#include "webrtc/base/criticalsection.h"
#include "webrtc/common_video/include/bitrate_adjuster.h"
#include "webrtc/common_video/rotation.h"
#include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
+#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h"
+#include "webrtc/modules/video_coding/utility/quality_scaler.h"
#if defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED)
@@ -44,6 +47,7 @@ class H264VideoToolboxEncoder : public H264Encoder {
int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override;
+ void OnDroppedFrame() override;
int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate) override;
@@ -66,6 +70,7 @@ class H264VideoToolboxEncoder : public H264Encoder {
int ResetCompressionSession();
void ConfigureCompressionSession();
void DestroyCompressionSession();
+ const VideoFrame& GetScaledFrameOnEncode(const VideoFrame& frame);
void SetBitrateBps(uint32_t bitrate_bps);
void SetEncoderBitrateBps(uint32_t bitrate_bps);
@@ -76,6 +81,10 @@ class H264VideoToolboxEncoder : public H264Encoder {
uint32_t encoder_bitrate_bps_;
int32_t width_;
int32_t height_;
+
+ rtc::CriticalSection quality_scaler_crit_;
+ QualityScaler quality_scaler_ GUARDED_BY(quality_scaler_crit_);
+ H264BitstreamParser h264_bitstream_parser_;
}; // H264VideoToolboxEncoder
} // namespace webrtc
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698