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

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: a7375761 Rebase. 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 } 308 }
309 } 309 }
310 case VideoFrame::UNKNOWN: 310 case VideoFrame::UNKNOWN:
311 case VideoFrame::NATIVE_TEXTURE: 311 case VideoFrame::NATIVE_TEXTURE:
312 case VideoFrame::HISTOGRAM_MAX: 312 case VideoFrame::HISTOGRAM_MAX:
313 #if defined(GOOGLE_TV) 313 #if defined(GOOGLE_TV)
314 case VideoFrame::HOLE: 314 case VideoFrame::HOLE:
315 #endif 315 #endif
316 break; 316 break;
317 } 317 }
318 NOTREACHED() << "Unsupported video frame format/plane: " 318 NOTREACHED() << "Unsupported video frame format/plane: " << format << "/"
319 << format << "/" << plane; 319 << plane;
320 return 0; 320 return 0;
321 } 321 }
322 322
323 // Release data allocated by AllocateYUV(). 323 // Release data allocated by AllocateYUV().
324 static void ReleaseData(uint8* data) { 324 static void ReleaseData(uint8* data) {
325 DCHECK(data); 325 DCHECK(data);
326 base::AlignedFree(data); 326 base::AlignedFree(data);
327 } 327 }
328 328
329 void VideoFrame::AllocateYUV() { 329 void VideoFrame::AllocateYUV() {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 : mailbox_(mailbox), 501 : mailbox_(mailbox),
502 sync_point_(sync_point), 502 sync_point_(sync_point),
503 release_callback_(release_callback) {} 503 release_callback_(release_callback) {}
504 504
505 VideoFrame::MailboxHolder::~MailboxHolder() { 505 VideoFrame::MailboxHolder::~MailboxHolder() {
506 if (!release_callback_.is_null()) 506 if (!release_callback_.is_null())
507 release_callback_.Run(sync_point_); 507 release_callback_.Run(sync_point_);
508 } 508 }
509 509
510 } // namespace media 510 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698