| 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 |
| 11 #include <string> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/callback.h" | 14 #include "base/callback.h" |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/md5.h" | 16 #include "base/md5.h" |
| 16 #include "base/memory/shared_memory.h" | 17 #include "base/memory/shared_memory.h" |
| 17 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
| 18 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| 19 #include "gpu/command_buffer/common/mailbox_holder.h" | 20 #include "gpu/command_buffer/common/mailbox_holder.h" |
| 20 #include "media/base/video_frame_metadata.h" | 21 #include "media/base/video_frame_metadata.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 void set_timestamp(base::TimeDelta timestamp) { | 403 void set_timestamp(base::TimeDelta timestamp) { |
| 403 timestamp_ = timestamp; | 404 timestamp_ = timestamp; |
| 404 } | 405 } |
| 405 | 406 |
| 406 // 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 |
| 407 // 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 |
| 408 // VideoFrame. | 409 // VideoFrame. |
| 409 // 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. |
| 410 void UpdateReleaseSyncToken(SyncTokenClient* client); | 411 void UpdateReleaseSyncToken(SyncTokenClient* client); |
| 411 | 412 |
| 413 // Returns a human-readable string describing |*this|. |
| 414 std::string AsHumanReadableString(); |
| 415 |
| 412 private: | 416 private: |
| 413 friend class base::RefCountedThreadSafe<VideoFrame>; | 417 friend class base::RefCountedThreadSafe<VideoFrame>; |
| 414 | 418 |
| 415 static scoped_refptr<VideoFrame> WrapExternalStorage( | 419 static scoped_refptr<VideoFrame> WrapExternalStorage( |
| 416 VideoPixelFormat format, | 420 VideoPixelFormat format, |
| 417 StorageType storage_type, | 421 StorageType storage_type, |
| 418 const gfx::Size& coded_size, | 422 const gfx::Size& coded_size, |
| 419 const gfx::Rect& visible_rect, | 423 const gfx::Rect& visible_rect, |
| 420 const gfx::Size& natural_size, | 424 const gfx::Size& natural_size, |
| 421 uint8_t* data, | 425 uint8_t* data, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 gpu::SyncToken release_sync_token_; | 525 gpu::SyncToken release_sync_token_; |
| 522 | 526 |
| 523 VideoFrameMetadata metadata_; | 527 VideoFrameMetadata metadata_; |
| 524 | 528 |
| 525 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 529 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
| 526 }; | 530 }; |
| 527 | 531 |
| 528 } // namespace media | 532 } // namespace media |
| 529 | 533 |
| 530 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 534 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
| OLD | NEW |