 Chromium Code Reviews
 Chromium Code Reviews Issue 1699553002:
  Mojo Video Capture service in media/capture  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1699553002:
  Mojo Video Capture service in media/capture  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ | 5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ | 
| 6 #define MEDIA_BASE_VIDEO_FRAME_H_ | 6 #define MEDIA_BASE_VIDEO_FRAME_H_ | 
| 7 | 7 | 
| 8 #include <stddef.h> | 8 #include <stddef.h> | 
| 9 #include <stdint.h> | 9 #include <stdint.h> | 
| 10 | 10 | 
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 406 | 406 | 
| 407 // It uses |client| to insert a new sync point and potentially waits on a | 407 // It uses |client| to insert a new sync point and potentially waits on a | 
| 408 // older sync point. The final sync point will be used to release this | 408 // older sync point. The final sync point will be used to release this | 
| 409 // VideoFrame. | 409 // VideoFrame. | 
| 410 // This method is thread safe. Both blink and compositor threads can call it. | 410 // This method is thread safe. Both blink and compositor threads can call it. | 
| 411 void UpdateReleaseSyncToken(SyncTokenClient* client); | 411 void UpdateReleaseSyncToken(SyncTokenClient* client); | 
| 412 | 412 | 
| 413 // Returns a human-readable string describing |*this|. | 413 // Returns a human-readable string describing |*this|. | 
| 414 std::string AsHumanReadableString(); | 414 std::string AsHumanReadableString(); | 
| 415 | 415 | 
| 416 protected: | |
| 417 friend class base::RefCountedThreadSafe<VideoFrame>; | |
| 418 virtual ~VideoFrame(); | |
| 419 | |
| 420 // Clients must use the static factory/wrapping methods to create a new frame. | |
| 421 VideoFrame(VideoPixelFormat format, | |
| 422 StorageType storage_type, | |
| 423 const gfx::Size& coded_size, | |
| 424 const gfx::Rect& visible_rect, | |
| 425 const gfx::Size& natural_size, | |
| 426 base::TimeDelta timestamp); | |
| 427 | |
| 428 void set_data(size_t plane, uint8_t* ptr); | |
| 
magjed_chromium
2016/03/03 14:20:58
I don't like these changes to VideoFrame. Adding s
 
mcasas
2016/03/03 18:41:15
Actually this is happening in //, see the descript
 | |
| 429 void set_stride(size_t plane, int stride); | |
| 430 | |
| 416 private: | 431 private: | 
| 417 friend class base::RefCountedThreadSafe<VideoFrame>; | |
| 418 | |
| 419 static scoped_refptr<VideoFrame> WrapExternalStorage( | 432 static scoped_refptr<VideoFrame> WrapExternalStorage( | 
| 420 VideoPixelFormat format, | 433 VideoPixelFormat format, | 
| 421 StorageType storage_type, | 434 StorageType storage_type, | 
| 422 const gfx::Size& coded_size, | 435 const gfx::Size& coded_size, | 
| 423 const gfx::Rect& visible_rect, | 436 const gfx::Rect& visible_rect, | 
| 424 const gfx::Size& natural_size, | 437 const gfx::Size& natural_size, | 
| 425 uint8_t* data, | 438 uint8_t* data, | 
| 426 size_t data_size, | 439 size_t data_size, | 
| 427 base::TimeDelta timestamp, | 440 base::TimeDelta timestamp, | 
| 428 base::SharedMemoryHandle handle, | 441 base::SharedMemoryHandle handle, | 
| 429 size_t data_offset); | 442 size_t data_offset); | 
| 430 | 443 | 
| 431 // Clients must use the static factory/wrapping methods to create a new frame. | |
| 432 VideoFrame(VideoPixelFormat format, | 444 VideoFrame(VideoPixelFormat format, | 
| 433 StorageType storage_type, | 445 StorageType storage_type, | 
| 434 const gfx::Size& coded_size, | 446 const gfx::Size& coded_size, | 
| 435 const gfx::Rect& visible_rect, | |
| 436 const gfx::Size& natural_size, | |
| 437 base::TimeDelta timestamp); | |
| 438 VideoFrame(VideoPixelFormat format, | |
| 439 StorageType storage_type, | |
| 440 const gfx::Size& coded_size, | |
| 441 const gfx::Rect& visible_rect, | 447 const gfx::Rect& visible_rect, | 
| 442 const gfx::Size& natural_size, | 448 const gfx::Size& natural_size, | 
| 443 base::TimeDelta timestamp, | 449 base::TimeDelta timestamp, | 
| 444 base::SharedMemoryHandle handle, | 450 base::SharedMemoryHandle handle, | 
| 445 size_t shared_memory_offset); | 451 size_t shared_memory_offset); | 
| 446 VideoFrame(VideoPixelFormat format, | 452 VideoFrame(VideoPixelFormat format, | 
| 447 StorageType storage_type, | 453 StorageType storage_type, | 
| 448 const gfx::Size& coded_size, | 454 const gfx::Size& coded_size, | 
| 449 const gfx::Rect& visible_rect, | 455 const gfx::Rect& visible_rect, | 
| 450 const gfx::Size& natural_size, | 456 const gfx::Size& natural_size, | 
| 451 const gpu::MailboxHolder(&mailbox_holders)[kMaxPlanes], | 457 const gpu::MailboxHolder(&mailbox_holders)[kMaxPlanes], | 
| 452 const ReleaseMailboxCB& mailbox_holder_release_cb, | 458 const ReleaseMailboxCB& mailbox_holder_release_cb, | 
| 453 base::TimeDelta timestamp); | 459 base::TimeDelta timestamp); | 
| 454 virtual ~VideoFrame(); | |
| 455 | 460 | 
| 456 static scoped_refptr<VideoFrame> CreateFrameInternal( | 461 static scoped_refptr<VideoFrame> CreateFrameInternal( | 
| 457 VideoPixelFormat format, | 462 VideoPixelFormat format, | 
| 458 const gfx::Size& coded_size, | 463 const gfx::Size& coded_size, | 
| 459 const gfx::Rect& visible_rect, | 464 const gfx::Rect& visible_rect, | 
| 460 const gfx::Size& natural_size, | 465 const gfx::Size& natural_size, | 
| 461 base::TimeDelta timestamp, | 466 base::TimeDelta timestamp, | 
| 462 bool zero_initialize_memory); | 467 bool zero_initialize_memory); | 
| 463 | 468 | 
| 464 void AllocateYUV(bool zero_initialize_memory); | 469 void AllocateYUV(bool zero_initialize_memory); | 
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 525 gpu::SyncToken release_sync_token_; | 530 gpu::SyncToken release_sync_token_; | 
| 526 | 531 | 
| 527 VideoFrameMetadata metadata_; | 532 VideoFrameMetadata metadata_; | 
| 528 | 533 | 
| 529 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 534 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 
| 530 }; | 535 }; | 
| 531 | 536 | 
| 532 } // namespace media | 537 } // namespace media | 
| 533 | 538 | 
| 534 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 539 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 
| OLD | NEW |