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

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

Issue 1030253002: Fix missing symbols for pre-linking of the Cast sender library for iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « media/base/video_frame.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 scoped_refptr<VideoFrame> VideoFrame::CreateEOSFrame() { 471 scoped_refptr<VideoFrame> VideoFrame::CreateEOSFrame() {
472 return new VideoFrame(VideoFrame::UNKNOWN, 472 return new VideoFrame(VideoFrame::UNKNOWN,
473 gfx::Size(), 473 gfx::Size(),
474 gfx::Rect(), 474 gfx::Rect(),
475 gfx::Size(), 475 gfx::Size(),
476 scoped_ptr<gpu::MailboxHolder>(), 476 scoped_ptr<gpu::MailboxHolder>(),
477 kNoTimestamp(), 477 kNoTimestamp(),
478 true); 478 true);
479 } 479 }
480 480
481 #if !defined(MEDIA_FOR_CAST_IOS)
481 // static 482 // static
482 scoped_refptr<VideoFrame> VideoFrame::CreateColorFrame( 483 scoped_refptr<VideoFrame> VideoFrame::CreateColorFrame(
Nico 2015/03/25 18:35:39 So you use this class in cast, but you rely on not
483 const gfx::Size& size, 484 const gfx::Size& size,
484 uint8 y, uint8 u, uint8 v, 485 uint8 y, uint8 u, uint8 v,
485 base::TimeDelta timestamp) { 486 base::TimeDelta timestamp) {
486 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame( 487 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame(
487 VideoFrame::YV12, size, gfx::Rect(size), size, timestamp); 488 VideoFrame::YV12, size, gfx::Rect(size), size, timestamp);
488 FillYUV(frame.get(), y, u, v); 489 FillYUV(frame.get(), y, u, v);
489 return frame; 490 return frame;
490 } 491 }
491 492
492 // static 493 // static
493 scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(const gfx::Size& size) { 494 scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(const gfx::Size& size) {
494 const uint8 kBlackY = 0x00; 495 const uint8 kBlackY = 0x00;
495 const uint8 kBlackUV = 0x80; 496 const uint8 kBlackUV = 0x80;
496 const base::TimeDelta kZero; 497 const base::TimeDelta kZero;
497 return CreateColorFrame(size, kBlackY, kBlackUV, kBlackUV, kZero); 498 return CreateColorFrame(size, kBlackY, kBlackUV, kBlackUV, kZero);
498 } 499 }
499 500
500 // static 501 // static
501 scoped_refptr<VideoFrame> VideoFrame::CreateTransparentFrame( 502 scoped_refptr<VideoFrame> VideoFrame::CreateTransparentFrame(
502 const gfx::Size& size) { 503 const gfx::Size& size) {
503 const uint8 kBlackY = 0x00; 504 const uint8 kBlackY = 0x00;
504 const uint8 kBlackUV = 0x00; 505 const uint8 kBlackUV = 0x00;
505 const uint8 kTransparentA = 0x00; 506 const uint8 kTransparentA = 0x00;
506 const base::TimeDelta kZero; 507 const base::TimeDelta kZero;
507 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame( 508 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame(
508 VideoFrame::YV12A, size, gfx::Rect(size), size, kZero); 509 VideoFrame::YV12A, size, gfx::Rect(size), size, kZero);
509 FillYUVA(frame.get(), kBlackY, kBlackUV, kBlackUV, kTransparentA); 510 FillYUVA(frame.get(), kBlackY, kBlackUV, kBlackUV, kTransparentA);
510 return frame; 511 return frame;
511 } 512 }
513 #endif // defined(MEDIA_FOR_CAST_IOS)
512 514
513 #if defined(VIDEO_HOLE) 515 #if defined(VIDEO_HOLE)
514 // This block and other blocks wrapped around #if defined(VIDEO_HOLE) is not 516 // This block and other blocks wrapped around #if defined(VIDEO_HOLE) is not
515 // maintained by the general compositor team. Please contact the following 517 // maintained by the general compositor team. Please contact the following
516 // people instead: 518 // people instead:
517 // 519 //
518 // wonsik@chromium.org 520 // wonsik@chromium.org
519 // ycheo@chromium.org 521 // ycheo@chromium.org
520 522
521 // static 523 // static
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 for (size_t plane = 0; plane < NumPlanes(format_); ++plane) { 813 for (size_t plane = 0; plane < NumPlanes(format_); ++plane) {
812 for (int row = 0; row < rows(plane); ++row) { 814 for (int row = 0; row < rows(plane); ++row) {
813 base::MD5Update(context, base::StringPiece( 815 base::MD5Update(context, base::StringPiece(
814 reinterpret_cast<char*>(data(plane) + stride(plane) * row), 816 reinterpret_cast<char*>(data(plane) + stride(plane) * row),
815 row_bytes(plane))); 817 row_bytes(plane)));
816 } 818 }
817 } 819 }
818 } 820 }
819 821
820 } // namespace media 822 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698