Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: media/base/video_frame.h

Issue 2169913003: Video: Plumb media::VideoFrame color space to cc and GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/md5.h" 17 #include "base/md5.h"
18 #include "base/memory/shared_memory.h" 18 #include "base/memory/shared_memory.h"
19 #include "base/synchronization/lock.h" 19 #include "base/synchronization/lock.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "gpu/command_buffer/common/mailbox_holder.h" 21 #include "gpu/command_buffer/common/mailbox_holder.h"
22 #include "media/base/video_frame_metadata.h" 22 #include "media/base/video_frame_metadata.h"
23 #include "media/base/video_types.h" 23 #include "media/base/video_types.h"
24 #include "ui/gfx/color_space.h"
24 #include "ui/gfx/geometry/rect.h" 25 #include "ui/gfx/geometry/rect.h"
25 #include "ui/gfx/geometry/size.h" 26 #include "ui/gfx/geometry/size.h"
26 #include "ui/gfx/gpu_memory_buffer.h" 27 #include "ui/gfx/gpu_memory_buffer.h"
27 28
28 #if defined(OS_MACOSX) 29 #if defined(OS_MACOSX)
29 #include <CoreVideo/CVPixelBuffer.h> 30 #include <CoreVideo/CVPixelBuffer.h>
30 #include "base/mac/scoped_cftyperef.h" 31 #include "base/mac/scoped_cftyperef.h"
31 #endif 32 #endif
32 33
33 namespace media { 34 namespace media {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 316
316 // Returns true if |frame| is accessible and mapped in the VideoFrame memory 317 // Returns true if |frame| is accessible and mapped in the VideoFrame memory
317 // space. If false, clients should refrain from accessing data(), 318 // space. If false, clients should refrain from accessing data(),
318 // visible_data() etc. 319 // visible_data() etc.
319 bool IsMappable() const; 320 bool IsMappable() const;
320 321
321 // 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
322 // accessed via data(), visible_data() etc. 323 // accessed via data(), visible_data() etc.
323 bool HasTextures() const; 324 bool HasTextures() const;
324 325
326 // Returns the color space of this frame's content.
327 gfx::ColorSpace ColorSpace() const;
328
325 VideoPixelFormat format() const { return format_; } 329 VideoPixelFormat format() const { return format_; }
326 StorageType storage_type() const { return storage_type_; } 330 StorageType storage_type() const { return storage_type_; }
327 331
328 const gfx::Size& coded_size() const { return coded_size_; } 332 const gfx::Size& coded_size() const { return coded_size_; }
329 const gfx::Rect& visible_rect() const { return visible_rect_; } 333 const gfx::Rect& visible_rect() const { return visible_rect_; }
330 const gfx::Size& natural_size() const { return natural_size_; } 334 const gfx::Size& natural_size() const { return natural_size_; }
331 335
332 int stride(size_t plane) const; 336 int stride(size_t plane) const;
333 337
334 // Returns the number of bytes per row and number of rows for a given plane. 338 // Returns the number of bytes per row and number of rows for a given plane.
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 577
574 // Generated at construction time. 578 // Generated at construction time.
575 const int unique_id_; 579 const int unique_id_;
576 580
577 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 581 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
578 }; 582 };
579 583
580 } // namespace media 584 } // namespace media
581 585
582 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 586 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698