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

Unified Diff: remoting/base/encoder_vp8.cc

Issue 4476003: Add VideoPacket struct for video packets. Refactor Decode interface to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 10 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
« no previous file with comments | « remoting/base/encoder_verbatim.cc ('k') | remoting/base/encoder_zlib.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/encoder_vp8.cc
diff --git a/remoting/base/encoder_vp8.cc b/remoting/base/encoder_vp8.cc
index 3a0f75be68d1b6a616f07b470f1096ee944cd16d..dd85fb2923a47d3d8e2f3a7e4db0f06a099d1c7d 100644
--- a/remoting/base/encoder_vp8.cc
+++ b/remoting/base/encoder_vp8.cc
@@ -4,10 +4,10 @@
#include "base/logging.h"
#include "media/base/callback.h"
-#include "media/base/data_buffer.h"
#include "media/base/media.h"
#include "remoting/base/capture_data.h"
#include "remoting/base/encoder_vp8.h"
+#include "remoting/proto/video.pb.h"
extern "C" {
#define VPX_CODEC_DISABLE_COMPAT 1
@@ -114,7 +114,7 @@ bool EncoderVp8::PrepareImage(scoped_refptr<CaptureData> capture_data) {
// giv ae gray scale image after conversion.
// TODO(sergeyu): Move this code to a separate routine.
// TODO(sergeyu): Optimize this code.
- DCHECK(capture_data->pixel_format() == PIXEL_FORMAT_RGB32)
+ DCHECK(capture_data->pixel_format() == media::VideoFrame::RGB32)
<< "Only RGB32 is supported";
uint8* in = capture_data->data_planes().data[0];
const int in_stride = capture_data->data_planes().strides[0];
@@ -197,11 +197,6 @@ void EncoderVp8::Encode(scoped_refptr<CaptureData> capture_data,
message->mutable_format()->set_encoding(VideoPacketFormat::ENCODING_VP8);
message->set_flags(VideoPacket::FIRST_PACKET | VideoPacket::LAST_PACKET);
- message->mutable_format()->set_pixel_format(PIXEL_FORMAT_RGB32);
- message->mutable_format()->set_x(0);
- message->mutable_format()->set_y(0);
- message->mutable_format()->set_width(capture_data->width());
- message->mutable_format()->set_height(capture_data->height());
data_available_callback->Run(message);
delete data_available_callback;
« no previous file with comments | « remoting/base/encoder_verbatim.cc ('k') | remoting/base/encoder_zlib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698