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

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

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr include 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/test/sender.cc ('k') | media/cast/video_receiver/video_decoder_unittest.cc » ('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/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "third_party/libvpx/source/libvpx/vpx/vp8dx.h" 10 #include "third_party/libvpx/source/libvpx/vpx/vp8dx.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 memcpy(decoded_frame->u_plane.data, img->planes[VPX_PLANE_U], 77 memcpy(decoded_frame->u_plane.data, img->planes[VPX_PLANE_U],
78 decoded_frame->u_plane.length); 78 decoded_frame->u_plane.length);
79 79
80 decoded_frame->v_plane.stride = img->stride[VPX_PLANE_V]; 80 decoded_frame->v_plane.stride = img->stride[VPX_PLANE_V];
81 decoded_frame->v_plane.length = img->stride[VPX_PLANE_V] * (img->d_h + 1) / 2; 81 decoded_frame->v_plane.length = img->stride[VPX_PLANE_V] * (img->d_h + 1) / 2;
82 decoded_frame->v_plane.data = new uint8[decoded_frame->v_plane.length]; 82 decoded_frame->v_plane.data = new uint8[decoded_frame->v_plane.length];
83 83
84 memcpy(decoded_frame->v_plane.data, img->planes[VPX_PLANE_V], 84 memcpy(decoded_frame->v_plane.data, img->planes[VPX_PLANE_V],
85 decoded_frame->v_plane.length); 85 decoded_frame->v_plane.length);
86 86
87 // Return frame. 87 cast_environment_->Logging()->InsertFrameEvent(kVideoFrameDecoded,
88 kFrameIdUnknown, encoded_frame->frame_id);
88 VLOG(1) << "Decoded frame " << frame_id_int; 89 VLOG(1) << "Decoded frame " << frame_id_int;
90
89 // Frame decoded - return frame to the user via callback. 91 // Frame decoded - return frame to the user via callback.
90 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, 92 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE,
91 base::Bind(frame_decoded_cb, base::Passed(&decoded_frame), render_time)); 93 base::Bind(frame_decoded_cb, base::Passed(&decoded_frame), render_time));
92 94
93 return true; 95 return true;
94 } 96 }
95 97
96 } // namespace cast 98 } // namespace cast
97 } // namespace media 99 } // namespace media
98 100
OLDNEW
« no previous file with comments | « media/cast/test/sender.cc ('k') | media/cast/video_receiver/video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698