| 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. |
| 367 base::TimeDelta timestamp() const { return timestamp_; } | 370 base::TimeDelta timestamp() const { return timestamp_; } |
| 368 void set_timestamp(base::TimeDelta timestamp) { | 371 void set_timestamp(base::TimeDelta timestamp) { |
| 369 timestamp_ = timestamp; | 372 timestamp_ = timestamp; |
| 370 } | 373 } |
| 371 | 374 |
| 372 // 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 |
| 373 // 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 |
| 374 // VideoFrame. | 377 // VideoFrame. |
| 375 // 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. |
| 376 void UpdateReleaseSyncPoint(SyncPointClient* client); | 379 void UpdateReleaseSyncPoint(SyncPointClient* client); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 uint32 release_sync_point_; | 479 uint32 release_sync_point_; |
| 477 | 480 |
| 478 VideoFrameMetadata metadata_; | 481 VideoFrameMetadata metadata_; |
| 479 | 482 |
| 480 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 483 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
| 481 }; | 484 }; |
| 482 | 485 |
| 483 } // namespace media | 486 } // namespace media |
| 484 | 487 |
| 485 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 488 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
| OLD | NEW |