Index: media/base/video_frame.h |
diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
index 0696a554c8f8fc1ca38f237f4738e1d5014fd384..26d8ade33166efb64d0e205bec2708434009f201 100644 |
--- a/media/base/video_frame.h |
+++ b/media/base/video_frame.h |
@@ -5,7 +5,7 @@ |
#ifndef MEDIA_BASE_VIDEO_FRAME_H_ |
#define MEDIA_BASE_VIDEO_FRAME_H_ |
-#include <vector> |
+#include <map> |
#include "base/callback.h" |
#include "base/md5.h" |
@@ -86,7 +86,8 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
// CB to be called on the mailbox backing this frame when the frame is |
// destroyed. |
- typedef base::Callback<void(const std::vector<uint32>&)> ReleaseMailboxCB; |
+ typedef base::Callback<void(const std::map<uintptr_t, uint32>&)> |
+ ReleaseMailboxCB; |
// Wraps a native texture of the given parameters with a VideoFrame. The |
// backing of the VideoFrame is held in the mailbox held by |mailbox_holder|, |
@@ -254,12 +255,14 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
timestamp_ = timestamp; |
} |
- // Append |sync_point| into |release_sync_points_| which will be passed to |
+ // Append |sync_point| into |release_sync_point_map_| which will be passed to |
// the video decoder when |mailbox_holder_release_cb_| is called so that |
// the video decoder waits for the sync points before reusing the mailbox. |
- // Multiple clients can append multiple sync points on one frame. |
+ // This keeps only the latest sync point for each client. If a client appends |
+ // two sync points, the previous sync point is overridden. |
+ // e.g. WebGL can insert multiple sync points on one frame. |
// This method is thread safe. Both blink and compositor threads can call it. |
- void AppendReleaseSyncPoint(uint32 sync_point); |
+ void AppendReleaseSyncPoint(uintptr_t client, uint32 sync_point); |
dshwang
2014/06/05 14:38:30
As explained video_resource_updater.cc, clients pa
|
// 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. |
@@ -328,7 +331,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
base::TimeDelta timestamp_; |
base::Lock release_sync_point_lock_; |
- std::vector<uint32> release_sync_points_; |
+ std::map<uintptr_t, uint32> release_sync_point_map_; |
const bool end_of_stream_; |