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

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: clean up 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
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 memcpy(decoded_frame->u_plane.data, img->planes[VPX_PLANE_U], 76 memcpy(decoded_frame->u_plane.data, img->planes[VPX_PLANE_U],
77 decoded_frame->u_plane.length); 77 decoded_frame->u_plane.length);
78 78
79 decoded_frame->v_plane.stride = img->stride[VPX_PLANE_V]; 79 decoded_frame->v_plane.stride = img->stride[VPX_PLANE_V];
80 decoded_frame->v_plane.length = img->stride[VPX_PLANE_V] * (img->d_h + 1) / 2; 80 decoded_frame->v_plane.length = img->stride[VPX_PLANE_V] * (img->d_h + 1) / 2;
81 decoded_frame->v_plane.data = new uint8[decoded_frame->v_plane.length]; 81 decoded_frame->v_plane.data = new uint8[decoded_frame->v_plane.length];
82 82
83 memcpy(decoded_frame->v_plane.data, img->planes[VPX_PLANE_V], 83 memcpy(decoded_frame->v_plane.data, img->planes[VPX_PLANE_V],
84 decoded_frame->v_plane.length); 84 decoded_frame->v_plane.length);
85 85
86 cast_environment_->Logging()->InsertFrameEvent(kVideoFrameDecoded,
87 -1, encoded_frame->frame_id);
Alpha Left Google 2013/11/14 00:29:24 Add a TODO here to replace -1 with something meani
mikhal 2013/11/14 17:42:31 Done.
86 // Return frame. 88 // Return frame.
87 VLOG(1) << "Decoded frame " << frame_id_int; 89 VLOG(1) << "Decoded frame " << frame_id_int;
88 // Frame decoded - return frame to the user via callback. 90 // Frame decoded - return frame to the user via callback.
89 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, 91 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE,
90 base::Bind(frame_decoded_cb, base::Passed(&decoded_frame), render_time)); 92 base::Bind(frame_decoded_cb, base::Passed(&decoded_frame), render_time));
91 93
92 return true; 94 return true;
93 } 95 }
94 96
95 } // namespace cast 97 } // namespace cast
96 } // namespace media 98 } // namespace media
97 99
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698