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

Side by Side Diff: media/video/picture.h

Issue 6901036: Update VideoDecode PPAPI structs to be consistent with media structures, part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_VIDEO_PICTURE_H_ 5 #ifndef MEDIA_VIDEO_PICTURE_H_
6 #define MEDIA_VIDEO_PICTURE_H_ 6 #define MEDIA_VIDEO_PICTURE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "media/video/video_decode_accelerator.h" 11 #include "media/video/video_decode_accelerator.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 // TODO(vmr): Evaluate the generalization potential of these interfaces & 15 // TODO(vmr): Evaluate the generalization potential of these interfaces &
16 // classes and refactor as needed with the rest of media stack. 16 // classes and refactor as needed with the rest of media stack.
17 class PictureBuffer : public VideoDecodeAccelerator::PictureBuffer { 17 class PictureBuffer : public VideoDecodeAccelerator::PictureBuffer {
18 public: 18 public:
19 PictureBuffer(int32 id, gfx::Size pixel_size, 19 PictureBuffer(int32 id, gfx::Size pixel_size, MemoryType memory_type,
20 std::vector<uint32> color_format, MemoryType memory_type,
21 std::vector<DataPlaneHandle> data_plane_handles); 20 std::vector<DataPlaneHandle> data_plane_handles);
22 virtual ~PictureBuffer(); 21 virtual ~PictureBuffer();
23 22
24 // VideoDecodeAccelerator::PictureBuffer implementation. 23 // VideoDecodeAccelerator::PictureBuffer implementation.
25 virtual int32 GetId() OVERRIDE; 24 virtual int32 GetId() OVERRIDE;
26 virtual gfx::Size GetSize() OVERRIDE; 25 virtual gfx::Size GetSize() OVERRIDE;
27 virtual const std::vector<uint32>& GetColorFormat() OVERRIDE;
28 virtual MemoryType GetMemoryType() OVERRIDE; 26 virtual MemoryType GetMemoryType() OVERRIDE;
29 virtual std::vector<DataPlaneHandle>& GetPlaneHandles() OVERRIDE; 27 virtual std::vector<DataPlaneHandle>& GetPlaneHandles() OVERRIDE;
30 28
31 private: 29 private:
32 int32 id_; 30 int32 id_;
33 gfx::Size pixel_size_; 31 gfx::Size pixel_size_;
34 std::vector<uint32> color_format_;
35 MemoryType memory_type_; 32 MemoryType memory_type_;
36 std::vector<DataPlaneHandle>& data_plane_handles_; 33 std::vector<DataPlaneHandle>& data_plane_handles_;
37 34
38 DISALLOW_IMPLICIT_CONSTRUCTORS(PictureBuffer); 35 DISALLOW_IMPLICIT_CONSTRUCTORS(PictureBuffer);
39 }; 36 };
40 37
41 class Picture : public VideoDecodeAccelerator::Picture { 38 class Picture : public VideoDecodeAccelerator::Picture {
42 public: 39 public:
43 Picture(PictureBuffer* picture_buffer, gfx::Size decoded_pixel_size, 40 Picture(int32 picture_buffer_id, gfx::Size decoded_pixel_size,
44 gfx::Size visible_pixel_size, void* user_handle); 41 gfx::Size visible_pixel_size, void* user_handle);
45 virtual ~Picture(); 42 virtual ~Picture();
46 43
47 // VideoDecodeAccelerator::Picture implementation. 44 // VideoDecodeAccelerator::Picture implementation.
48 virtual PictureBuffer* picture_buffer() OVERRIDE; 45 virtual int32 GetId() OVERRIDE;
49 virtual gfx::Size GetDecodedSize() const OVERRIDE; 46 virtual gfx::Size GetDecodedSize() const OVERRIDE;
50 virtual gfx::Size GetVisibleSize() const OVERRIDE; 47 virtual gfx::Size GetVisibleSize() const OVERRIDE;
51 virtual void* GetUserHandle() OVERRIDE; 48 virtual void* GetUserHandle() OVERRIDE;
52 49
53 private: 50 private:
54 // Pointer to the picture buffer which contains this picture. 51 // ID of the picture buffer which contains this picture.
55 PictureBuffer* picture_buffer_; 52 int32 picture_buffer_id_;
56 gfx::Size decoded_pixel_size_; 53 gfx::Size decoded_pixel_size_;
57 gfx::Size visible_pixel_size_; 54 gfx::Size visible_pixel_size_;
58 void* user_handle_; 55 void* user_handle_;
59 56
60 DISALLOW_IMPLICIT_CONSTRUCTORS(Picture); 57 DISALLOW_IMPLICIT_CONSTRUCTORS(Picture);
61 }; 58 };
62 59
63 } // namespace media 60 } // namespace media
64 61
65 #endif // MEDIA_VIDEO_PICTURE_H_ 62 #endif // MEDIA_VIDEO_PICTURE_H_
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | media/video/picture.cc » ('j') | media/video/video_decode_accelerator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698