| Index: media/base/video_frame.h
|
| diff --git a/media/base/video_frame.h b/media/base/video_frame.h
|
| index 7ac868e094991d8e81cb3e5d7362461567825608..061ba8b50627418d4cad41c76e06e8fa220b9ee5 100644
|
| --- a/media/base/video_frame.h
|
| +++ b/media/base/video_frame.h
|
| @@ -8,6 +8,7 @@
|
| #include "base/callback.h"
|
| #include "base/md5.h"
|
| #include "base/memory/shared_memory.h"
|
| +#include "base/synchronization/lock.h"
|
| #include "media/base/buffers.h"
|
| #include "ui/gfx/rect.h"
|
| #include "ui/gfx/size.h"
|
| @@ -222,6 +223,15 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
|
| timestamp_ = timestamp;
|
| }
|
|
|
| + // Set |release_sync_point_| which will be set to the mailbox holder
|
| + // when |mailbox_holder_release_cb_| is called so that the gpu video decoder
|
| + // waits for the sync point before reusing the mailbox.
|
| + // This method is thread safe. Both blink and compositor threads can call it.
|
| + // Multiple clients can set multiple sync points in one frame. It returns
|
| + // the previous sync point that other client set. The caller has
|
| + // responsibility for wait for the previous sync point of another client.
|
| + uint32 SwapReleaseSyncPoint(uint32 sync_point);
|
| +
|
| // Used to keep a running hash of seen frames. Expects an initialized MD5
|
| // context. Calls MD5Update with the context and the contents of the frame.
|
| void HashFrameForTesting(base::MD5Context* context);
|
| @@ -275,6 +285,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
|
|
|
| base::TimeDelta timestamp_;
|
|
|
| + base::Lock release_sync_point_lock_;
|
| + uint32 release_sync_point_;
|
| +
|
| const bool end_of_stream_;
|
|
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
|
|
|