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