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

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

Issue 288103002: [Cast] EncodedAudioFrame+EncodedVideoFrame+reference_time --> EncodedFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | « media/cast/video_receiver/video_decoder.h ('k') | media/cast/video_receiver/video_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9f167490e9969655277f44e3c97792c0e36002b1..07a11ad5e4c38f03c1ecfe1f697359610def9425 100644
--- a/media/cast/video_receiver/video_decoder.cc
+++ b/media/cast/video_receiver/video_decoder.cc
@@ -9,7 +9,6 @@
#include "base/json/json_reader.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/stl_util.h"
#include "base/values.h"
#include "media/base/video_util.h"
#include "media/cast/cast_defines.h"
@@ -41,18 +40,10 @@ class VideoDecoder::ImplBase
return cast_initialization_status_;
}
- void DecodeFrame(scoped_ptr<transport::EncodedVideoFrame> encoded_frame,
+ void DecodeFrame(scoped_ptr<transport::EncodedFrame> encoded_frame,
const DecodeFrameCallback& callback) {
DCHECK_EQ(cast_initialization_status_, STATUS_VIDEO_INITIALIZED);
- if (encoded_frame->codec != codec_) {
- NOTREACHED();
- cast_environment_->PostTask(
- CastEnvironment::MAIN,
- FROM_HERE,
- base::Bind(callback, scoped_refptr<VideoFrame>(NULL), false));
- }
-
COMPILE_ASSERT(sizeof(encoded_frame->frame_id) == sizeof(last_frame_id_),
size_of_frame_id_types_do_not_match);
bool is_continuous = true;
@@ -68,7 +59,7 @@ class VideoDecoder::ImplBase
last_frame_id_ = encoded_frame->frame_id;
const scoped_refptr<VideoFrame> decoded_frame = Decode(
- reinterpret_cast<uint8*>(string_as_array(&encoded_frame->data)),
+ encoded_frame->mutable_bytes(),
static_cast<int>(encoded_frame->data.size()));
cast_environment_->PostTask(
CastEnvironment::MAIN,
@@ -248,7 +239,7 @@ CastInitializationStatus VideoDecoder::InitializationResult() const {
}
void VideoDecoder::DecodeFrame(
- scoped_ptr<transport::EncodedVideoFrame> encoded_frame,
+ scoped_ptr<transport::EncodedFrame> encoded_frame,
const DecodeFrameCallback& callback) {
DCHECK(encoded_frame.get());
DCHECK(!callback.is_null());
« no previous file with comments | « media/cast/video_receiver/video_decoder.h ('k') | media/cast/video_receiver/video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698