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

Side by Side Diff: media/cast/video_receiver/codecs/vp8/vp8_decoder.cc

Issue 25544003: Fix code style and gyp files in cast to build cast_unittest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed gyp files Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/rtp_sender/rtp_sender.gyp ('k') | media/cast/video_receiver/video_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/video_receiver/codecs/vp8/vp8_decoder.h" 5 #include "media/cast/video_receiver/codecs/vp8/vp8_decoder.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/libvpx/source/libvpx/vpx/vp8dx.h" 8 #include "third_party/libvpx/source/libvpx/vpx/vp8dx.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 bool Vp8Decoder::Decode(const EncodedVideoFrame& input_image, 30 bool Vp8Decoder::Decode(const EncodedVideoFrame& input_image,
31 I420VideoFrame* decoded_frame) { 31 I420VideoFrame* decoded_frame) {
32 if (input_image.data.empty()) return false; 32 if (input_image.data.empty()) return false;
33 33
34 vpx_codec_iter_t iter = NULL; 34 vpx_codec_iter_t iter = NULL;
35 vpx_image_t* img; 35 vpx_image_t* img;
36 if (vpx_codec_decode(decoder_.get(), 36 if (vpx_codec_decode(decoder_.get(),
37 input_image.data.data(), 37 input_image.data.data(),
38 input_image.data.size(), 38 static_cast<unsigned int>(input_image.data.size()),
39 0, 39 0,
40 1 /* real time*/)) { 40 1 /* real time*/)) {
41 return false; 41 return false;
42 } 42 }
43 43
44 img = vpx_codec_get_frame(decoder_.get(), &iter); 44 img = vpx_codec_get_frame(decoder_.get(), &iter);
45 if (img == NULL) return false; 45 if (img == NULL) return false;
46 46
47 // Populate the decoded image. 47 // Populate the decoded image.
48 decoded_frame->width = img->d_w; 48 decoded_frame->width = img->d_w;
(...skipping 10 matching lines...) Expand all
59 decoded_frame->v_plane.stride = img->stride[VPX_PLANE_V]; 59 decoded_frame->v_plane.stride = img->stride[VPX_PLANE_V];
60 decoded_frame->v_plane.length = img->stride[VPX_PLANE_V] * img->d_h; 60 decoded_frame->v_plane.length = img->stride[VPX_PLANE_V] * img->d_h;
61 decoded_frame->v_plane.data = img->planes[VPX_PLANE_V]; 61 decoded_frame->v_plane.data = img->planes[VPX_PLANE_V];
62 62
63 return true; 63 return true;
64 } 64 }
65 65
66 } // namespace cast 66 } // namespace cast
67 } // namespace media 67 } // namespace media
68 68
OLDNEW
« no previous file with comments | « media/cast/rtp_sender/rtp_sender.gyp ('k') | media/cast/video_receiver/video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698