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

Unified Diff: media/cast/video_receiver/video_decoder.cc

Issue 59753007: Passing frame decoded callback to the codec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responding to review Created 7 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
Index: media/cast/video_receiver/video_decoder.cc
diff --git a/media/cast/video_receiver/video_decoder.cc b/media/cast/video_receiver/video_decoder.cc
index 4a76ae684206132bc97368dc2be6749a5579a525..659d4e0e7f919add190acc707a633b7cd5c12c46 100644
--- a/media/cast/video_receiver/video_decoder.cc
+++ b/media/cast/video_receiver/video_decoder.cc
@@ -12,13 +12,14 @@
namespace media {
namespace cast {
-VideoDecoder::VideoDecoder(const VideoReceiverConfig& video_config)
+VideoDecoder::VideoDecoder(const VideoReceiverConfig& video_config,
+ scoped_refptr<CastEnvironment> cast_environment)
: codec_(video_config.codec),
vp8_decoder_() {
switch (video_config.codec) {
case kVp8:
// Initializing to use one core.
- vp8_decoder_.reset(new Vp8Decoder(1));
+ vp8_decoder_.reset(new Vp8Decoder(1, cast_environment));
break;
case kH264:
NOTIMPLEMENTED();
@@ -31,13 +32,13 @@ VideoDecoder::VideoDecoder(const VideoReceiverConfig& video_config)
VideoDecoder::~VideoDecoder() {}
-bool VideoDecoder::DecodeVideoFrame(
- const EncodedVideoFrame* encoded_frame,
- const base::TimeTicks render_time,
- I420VideoFrame* video_frame) {
+bool VideoDecoder::DecodeVideoFrame(const EncodedVideoFrame* encoded_frame,
+ const base::TimeTicks render_time,
+ const VideoFrameDecodedCallback
+ frame_decoded_cb) {
DCHECK(encoded_frame->codec == codec_) << "Invalid codec";
DCHECK_GT(encoded_frame->data.size(), GG_UINT64_C(0)) << "Empty video frame";
- return vp8_decoder_->Decode(*encoded_frame, video_frame);
+ return vp8_decoder_->Decode(encoded_frame, render_time, frame_decoded_cb);
}
} // namespace cast

Powered by Google App Engine
This is Rietveld 408576698