Index: webrtc/modules/video_coding/generic_encoder.cc |
diff --git a/webrtc/modules/video_coding/generic_encoder.cc b/webrtc/modules/video_coding/generic_encoder.cc |
index e63da026fe1dcf066f133fc282c162238d282150..28eb10ada1f43c3a5dd092cfd9531320ded9257c 100644 |
--- a/webrtc/modules/video_coding/generic_encoder.cc |
+++ b/webrtc/modules/video_coding/generic_encoder.cc |
@@ -21,6 +21,7 @@ |
#include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
namespace webrtc { |
+ |
VCMGenericEncoder::VCMGenericEncoder( |
VideoEncoder* encoder, |
VCMEncodedFrameCallback* encoded_frame_callback, |
@@ -143,23 +144,25 @@ VCMEncodedFrameCallback::VCMEncodedFrameCallback( |
VCMEncodedFrameCallback::~VCMEncodedFrameCallback() {} |
-int32_t VCMEncodedFrameCallback::Encoded( |
+EncodedImageCallback::Result VCMEncodedFrameCallback::OnEncodedImage( |
const EncodedImage& encoded_image, |
const CodecSpecificInfo* codec_specific, |
const RTPFragmentationHeader* fragmentation_header) { |
TRACE_EVENT_INSTANT1("webrtc", "VCMEncodedFrameCallback::Encoded", |
"timestamp", encoded_image._timeStamp); |
- int ret_val = post_encode_callback_->Encoded(encoded_image, codec_specific, |
- fragmentation_header); |
- if (ret_val < 0) |
- return ret_val; |
+ Result result = post_encode_callback_->OnEncodedImage( |
+ encoded_image, codec_specific, fragmentation_header); |
+ if (result.error != Result::OK) |
+ return result; |
if (media_opt_) { |
media_opt_->UpdateWithEncodedData(encoded_image); |
- if (internal_source_) |
- return media_opt_->DropFrame(); // Signal to encoder to drop next frame. |
+ if (internal_source_) { |
+ // Signal to encoder to drop next frame. |
+ result.drop_next_frame = media_opt_->DropFrame(); |
+ } |
} |
- return VCM_OK; |
+ return result; |
} |
} // namespace webrtc |