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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 STORAGE_LAST = STORAGE_HOLE, | 70 STORAGE_LAST = STORAGE_HOLE, |
71 #elif defined(OS_LINUX) | 71 #elif defined(OS_LINUX) |
72 STORAGE_LAST = STORAGE_DMABUFS, | 72 STORAGE_LAST = STORAGE_DMABUFS, |
73 #else | 73 #else |
74 STORAGE_LAST = STORAGE_SHMEM | 74 STORAGE_LAST = STORAGE_SHMEM |
75 #endif | 75 #endif |
76 }; | 76 }; |
77 | 77 |
78 // CB to be called on the mailbox backing this frame when the frame is | 78 // CB to be called on the mailbox backing this frame when the frame is |
79 // destroyed. | 79 // destroyed. |
80 typedef base::Callback<void(uint32)> ReleaseMailboxCB; | 80 typedef base::Callback<void(uint32, const gpu::SyncToken&)> ReleaseMailboxCB; |
81 | 81 |
82 // Interface representing client operations on a SyncPoint, i.e. insert one in | 82 // Interface representing client operations on a SyncPoint, i.e. insert one in |
83 // the GPU Command Buffer and wait for it. | 83 // the GPU Command Buffer and wait for it. |
84 class SyncPointClient { | 84 class SyncPointClient { |
85 public: | 85 public: |
86 SyncPointClient() {} | 86 SyncPointClient() {} |
87 virtual uint32 InsertSyncPoint() = 0; | 87 virtual uint32 InsertSyncPoint() = 0; |
88 virtual void WaitSyncPoint(uint32 sync_point) = 0; | 88 virtual void WaitSyncPoint(uint32 sync_point, |
| 89 const gpu::SyncToken& sync_token) = 0; |
89 | 90 |
90 protected: | 91 protected: |
91 virtual ~SyncPointClient() {} | 92 virtual ~SyncPointClient() {} |
92 | 93 |
93 DISALLOW_COPY_AND_ASSIGN(SyncPointClient); | 94 DISALLOW_COPY_AND_ASSIGN(SyncPointClient); |
94 }; | 95 }; |
95 | 96 |
96 // Call prior to CreateFrame to ensure validity of frame configuration. Called | 97 // Call prior to CreateFrame to ensure validity of frame configuration. Called |
97 // automatically by VideoDecoderConfig::IsValidConfig(). | 98 // automatically by VideoDecoderConfig::IsValidConfig(). |
98 static bool IsValidConfig(VideoPixelFormat format, | 99 static bool IsValidConfig(VideoPixelFormat format, |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 // CVPixelBuffer, if this frame is wrapping one. | 487 // CVPixelBuffer, if this frame is wrapping one. |
487 base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer_; | 488 base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer_; |
488 #endif | 489 #endif |
489 | 490 |
490 std::vector<base::Closure> done_callbacks_; | 491 std::vector<base::Closure> done_callbacks_; |
491 | 492 |
492 base::TimeDelta timestamp_; | 493 base::TimeDelta timestamp_; |
493 | 494 |
494 base::Lock release_sync_point_lock_; | 495 base::Lock release_sync_point_lock_; |
495 uint32 release_sync_point_; | 496 uint32 release_sync_point_; |
| 497 gpu::SyncToken release_sync_token_; |
496 | 498 |
497 VideoFrameMetadata metadata_; | 499 VideoFrameMetadata metadata_; |
498 | 500 |
499 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 501 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
500 }; | 502 }; |
501 | 503 |
502 } // namespace media | 504 } // namespace media |
503 | 505 |
504 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 506 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |