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

Side by Side Diff: media/base/video_frame.cc

Issue 68503005: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 51b76b9a Rebase, comments. Review this please. 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/base/video_frame.h" 5 #include "media/base/video_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 } 305 }
306 case VideoFrame::UNKNOWN: 306 case VideoFrame::UNKNOWN:
307 case VideoFrame::NATIVE_TEXTURE: 307 case VideoFrame::NATIVE_TEXTURE:
308 case VideoFrame::HISTOGRAM_MAX: 308 case VideoFrame::HISTOGRAM_MAX:
309 #if defined(GOOGLE_TV) 309 #if defined(GOOGLE_TV)
310 case VideoFrame::HOLE: 310 case VideoFrame::HOLE:
311 #endif 311 #endif
312 break; 312 break;
313 } 313 }
314 NOTREACHED() << "Unsupported video frame format/plane: " 314 NOTREACHED() << "Unsupported video frame format/plane: " << format << "/"
315 << format << "/" << plane; 315 << plane;
316 return 0; 316 return 0;
317 } 317 }
318 318
319 // Release data allocated by AllocateYUV(). 319 // Release data allocated by AllocateYUV().
320 static void ReleaseData(uint8* data) { 320 static void ReleaseData(uint8* data) {
321 DCHECK(data); 321 DCHECK(data);
322 base::AlignedFree(data); 322 base::AlignedFree(data);
323 } 323 }
324 324
325 void VideoFrame::AllocateYUV() { 325 void VideoFrame::AllocateYUV() {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 : mailbox_(mailbox), 497 : mailbox_(mailbox),
498 sync_point_(sync_point), 498 sync_point_(sync_point),
499 release_callback_(release_callback) {} 499 release_callback_(release_callback) {}
500 500
501 VideoFrame::MailboxHolder::~MailboxHolder() { 501 VideoFrame::MailboxHolder::~MailboxHolder() {
502 if (!release_callback_.is_null()) 502 if (!release_callback_.is_null())
503 release_callback_.Run(sync_point_); 503 release_callback_.Run(sync_point_);
504 } 504 }
505 505
506 } // namespace media 506 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698