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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // space. If false, clients should refrain from accessing data(), | 318 // space. If false, clients should refrain from accessing data(), |
319 // visible_data() etc. | 319 // visible_data() etc. |
320 bool IsMappable() const; | 320 bool IsMappable() const; |
321 | 321 |
322 // Returns true if |frame| has textures with any StorageType and should not be | 322 // Returns true if |frame| has textures with any StorageType and should not be |
323 // accessed via data(), visible_data() etc. | 323 // accessed via data(), visible_data() etc. |
324 bool HasTextures() const; | 324 bool HasTextures() const; |
325 | 325 |
326 // Returns the color space of this frame's content. | 326 // Returns the color space of this frame's content. |
327 gfx::ColorSpace ColorSpace() const; | 327 gfx::ColorSpace ColorSpace() const; |
| 328 void set_color_space(const gfx::ColorSpace& color_space); |
328 | 329 |
329 VideoPixelFormat format() const { return format_; } | 330 VideoPixelFormat format() const { return format_; } |
330 StorageType storage_type() const { return storage_type_; } | 331 StorageType storage_type() const { return storage_type_; } |
331 | 332 |
332 const gfx::Size& coded_size() const { return coded_size_; } | 333 const gfx::Size& coded_size() const { return coded_size_; } |
333 const gfx::Rect& visible_rect() const { return visible_rect_; } | 334 const gfx::Rect& visible_rect() const { return visible_rect_; } |
334 const gfx::Size& natural_size() const { return natural_size_; } | 335 const gfx::Size& natural_size() const { return natural_size_; } |
335 | 336 |
336 int stride(size_t plane) const; | 337 int stride(size_t plane) const; |
337 | 338 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 base::TimeDelta timestamp_; | 572 base::TimeDelta timestamp_; |
572 | 573 |
573 base::Lock release_sync_token_lock_; | 574 base::Lock release_sync_token_lock_; |
574 gpu::SyncToken release_sync_token_; | 575 gpu::SyncToken release_sync_token_; |
575 | 576 |
576 VideoFrameMetadata metadata_; | 577 VideoFrameMetadata metadata_; |
577 | 578 |
578 // Generated at construction time. | 579 // Generated at construction time. |
579 const int unique_id_; | 580 const int unique_id_; |
580 | 581 |
| 582 gfx::ColorSpace color_space_; |
| 583 |
581 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 584 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
582 }; | 585 }; |
583 | 586 |
584 } // namespace media | 587 } // namespace media |
585 | 588 |
586 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 589 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |