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

Unified Diff: webrtc/modules/video_coding/video_coding_impl.cc

Issue 2089773002: Add EncodedImageCallback::OnEncodedImage(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 4 years, 4 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
Index: webrtc/modules/video_coding/video_coding_impl.cc
diff --git a/webrtc/modules/video_coding/video_coding_impl.cc b/webrtc/modules/video_coding/video_coding_impl.cc
index 077f3368a33446a1ade6bdde581fbddd415bc62d..2f709b610c1453a6e8fc9415042189a9f03ddae2 100644
--- a/webrtc/modules/video_coding/video_coding_impl.cc
+++ b/webrtc/modules/video_coding/video_coding_impl.cc
@@ -45,7 +45,8 @@ namespace {
class EncodedImageCallbackWrapper : public EncodedImageCallback {
public:
EncodedImageCallbackWrapper()
- : cs_(CriticalSectionWrapper::CreateCriticalSection()), callback_(NULL) {}
+ : cs_(CriticalSectionWrapper::CreateCriticalSection()),
+ callback_(nullptr) {}
virtual ~EncodedImageCallbackWrapper() {}
@@ -54,14 +55,15 @@ class EncodedImageCallbackWrapper : public EncodedImageCallback {
callback_ = callback;
}
- virtual int32_t Encoded(const EncodedImage& encoded_image,
- const CodecSpecificInfo* codec_specific_info,
- const RTPFragmentationHeader* fragmentation) {
+ virtual Result OnEncodedImage(const EncodedImage& encoded_image,
+ const CodecSpecificInfo* codec_specific_info,
+ const RTPFragmentationHeader* fragmentation) {
CriticalSectionScoped cs(cs_.get());
- if (callback_)
- return callback_->Encoded(encoded_image, codec_specific_info,
- fragmentation);
- return 0;
+ if (callback_) {
+ return callback_->OnEncodedImage(encoded_image, codec_specific_info,
+ fragmentation);
+ }
+ return Result(Result::ERROR_SEND_FAILED);
}
private:

Powered by Google App Engine
This is Rietveld 408576698