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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
358 | 358 |
359 // Returns a dictionary of optional metadata. This contains information | 359 // Returns a dictionary of optional metadata. This contains information |
360 // associated with the frame that downstream clients might use for frame-level | 360 // associated with the frame that downstream clients might use for frame-level |
361 // logging, quality/performance optimizations, signaling, etc. | 361 // logging, quality/performance optimizations, signaling, etc. |
362 // | 362 // |
363 // TODO(miu): Move some of the "extra" members of VideoFrame (below) into | 363 // TODO(miu): Move some of the "extra" members of VideoFrame (below) into |
364 // here as a later clean-up step. | 364 // here as a later clean-up step. |
365 const VideoFrameMetadata* metadata() const { return &metadata_; } | 365 const VideoFrameMetadata* metadata() const { return &metadata_; } |
366 VideoFrameMetadata* metadata() { return &metadata_; } | 366 VideoFrameMetadata* metadata() { return &metadata_; } |
367 | 367 |
368 // The time span between the current frame and the first frame of the stream. | |
miu
2015/08/04 04:35:07
Nice. Please also add something to the effect of:
qiangchen
2015/08/04 16:35:25
Done.
| |
369 // TODO(qiangchen): See above, move this into metadata. | |
miu
2015/08/04 04:35:08
Let's not add this TODO yet. We should discuss wi
qiangchen
2015/08/04 16:35:25
Done.
| |
368 base::TimeDelta timestamp() const { return timestamp_; } | 370 base::TimeDelta timestamp() const { return timestamp_; } |
369 void set_timestamp(base::TimeDelta timestamp) { | 371 void set_timestamp(base::TimeDelta timestamp) { |
370 timestamp_ = timestamp; | 372 timestamp_ = timestamp; |
371 } | 373 } |
372 | 374 |
373 // It uses |client| to insert a new sync point and potentially waits on a | 375 // It uses |client| to insert a new sync point and potentially waits on a |
374 // older sync point. The final sync point will be used to release this | 376 // older sync point. The final sync point will be used to release this |
375 // VideoFrame. | 377 // VideoFrame. |
376 // This method is thread safe. Both blink and compositor threads can call it. | 378 // This method is thread safe. Both blink and compositor threads can call it. |
377 void UpdateReleaseSyncPoint(SyncPointClient* client); | 379 void UpdateReleaseSyncPoint(SyncPointClient* client); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
477 uint32 release_sync_point_; | 479 uint32 release_sync_point_; |
478 | 480 |
479 VideoFrameMetadata metadata_; | 481 VideoFrameMetadata metadata_; |
480 | 482 |
481 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 483 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
482 }; | 484 }; |
483 | 485 |
484 } // namespace media | 486 } // namespace media |
485 | 487 |
486 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 488 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |