Index: webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc |
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc |
index 280270095371ce4c9f5b568186f9edca0a1d6042..d7927eb7ba161f36bc99d7a143493a083211e443 100644 |
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc |
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc |
@@ -26,9 +26,9 @@ class Vp8SequenceCoderEncodeCallback : public webrtc::EncodedImageCallback { |
explicit Vp8SequenceCoderEncodeCallback(FILE* encoded_file) |
: encoded_file_(encoded_file), encoded_bytes_(0) {} |
~Vp8SequenceCoderEncodeCallback(); |
- int Encoded(const webrtc::EncodedImage& encoded_image, |
- const webrtc::CodecSpecificInfo* codecSpecificInfo, |
- const webrtc::RTPFragmentationHeader*); |
+ Result OnEncodedImage(const webrtc::EncodedImage& encoded_image, |
+ const webrtc::CodecSpecificInfo* codec_specific_info, |
+ const webrtc::RTPFragmentationHeader*); |
// Returns the encoded image. |
webrtc::EncodedImage encoded_image() { return encoded_image_; } |
size_t encoded_bytes() { return encoded_bytes_; } |
@@ -43,7 +43,9 @@ Vp8SequenceCoderEncodeCallback::~Vp8SequenceCoderEncodeCallback() { |
delete[] encoded_image_._buffer; |
encoded_image_._buffer = NULL; |
} |
-int Vp8SequenceCoderEncodeCallback::Encoded( |
+ |
+webrtc::EncodedImageCallback::Result |
+Vp8SequenceCoderEncodeCallback::OnEncodedImage( |
const webrtc::EncodedImage& encoded_image, |
const webrtc::CodecSpecificInfo* codecSpecificInfo, |
const webrtc::RTPFragmentationHeader* fragmentation) { |
@@ -58,11 +60,11 @@ int Vp8SequenceCoderEncodeCallback::Encoded( |
if (encoded_file_ != NULL) { |
if (fwrite(encoded_image._buffer, 1, encoded_image._length, |
encoded_file_) != encoded_image._length) { |
- return -1; |
+ return Result(Result::ERROR_SEND_FAILED, 0); |
} |
} |
encoded_bytes_ += encoded_image_._length; |
- return 0; |
+ return Result(Result::OK, 0); |
} |
// TODO(mikhal): Add support for varying the frame size. |