| Index: media/base/video_frame.h
|
| diff --git a/media/base/video_frame.h b/media/base/video_frame.h
|
| index a3f296dd548fb489e97f299355adda2c8107bfae..3e709fcb73ed2ac682d5fc6cbca5c24deadd54ce 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"
|
| @@ -85,7 +85,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<std::string, 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|,
|
| @@ -253,12 +254,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(std::string client, 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.
|
| @@ -327,7 +330,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<std::string, uint32> release_sync_point_map_;
|
|
|
| const bool end_of_stream_;
|
|
|
|
|