| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |