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. |
| 369 // This is the media timestamp, and not the reference time. |
| 370 // See VideoFrameMetadata::REFERENCE_TIME for details. |
368 base::TimeDelta timestamp() const { return timestamp_; } | 371 base::TimeDelta timestamp() const { return timestamp_; } |
369 void set_timestamp(base::TimeDelta timestamp) { | 372 void set_timestamp(base::TimeDelta timestamp) { |
370 timestamp_ = timestamp; | 373 timestamp_ = timestamp; |
371 } | 374 } |
372 | 375 |
373 // It uses |client| to insert a new sync point and potentially waits on a | 376 // 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 | 377 // older sync point. The final sync point will be used to release this |
375 // VideoFrame. | 378 // VideoFrame. |
376 // This method is thread safe. Both blink and compositor threads can call it. | 379 // This method is thread safe. Both blink and compositor threads can call it. |
377 void UpdateReleaseSyncPoint(SyncPointClient* client); | 380 void UpdateReleaseSyncPoint(SyncPointClient* client); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 uint32 release_sync_point_; | 480 uint32 release_sync_point_; |
478 | 481 |
479 VideoFrameMetadata metadata_; | 482 VideoFrameMetadata metadata_; |
480 | 483 |
481 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 484 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
482 }; | 485 }; |
483 | 486 |
484 } // namespace media | 487 } // namespace media |
485 | 488 |
486 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 489 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |