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

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

Issue 10392141: Plumb texture target to VideoDecodeAccelerator::Client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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) 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_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 21 matching lines...) Expand all
32 // Invalid argument was passed to an API method. 32 // Invalid argument was passed to an API method.
33 INVALID_ARGUMENT, 33 INVALID_ARGUMENT,
34 // Encoded input is unreadable. 34 // Encoded input is unreadable.
35 UNREADABLE_INPUT, 35 UNREADABLE_INPUT,
36 // A failure occurred at the browser layer or one of its dependencies. 36 // A failure occurred at the browser layer or one of its dependencies.
37 // Examples of such failures include GPU hardware failures, GPU driver 37 // Examples of such failures include GPU hardware failures, GPU driver
38 // failures, GPU library failures, browser programming errors, and so on. 38 // failures, GPU library failures, browser programming errors, and so on.
39 PLATFORM_FAILURE, 39 PLATFORM_FAILURE,
40 }; 40 };
41 41
42 // Enumeration of texture targets that the decoder might request.
43 // Note: Keep these in sync with PP_VideoDecoder_TextureTarget_Dev.
44 enum TextureTarget {
Ami GONE FROM CHROMIUM 2012/05/23 23:42:33 I don't think this (and its PP_VD_TT_D equivalent)
sail 2012/05/29 18:58:09 Done.
45 TEXTURE_TARGET_2D = 0,
46 TEXTURE_TARGET_ARB
47 };
48
42 // Interface for collaborating with picture interface to provide memory for 49 // Interface for collaborating with picture interface to provide memory for
43 // output picture and blitting them. 50 // output picture and blitting them.
44 // This interface is extended by the various layers that relay messages back 51 // This interface is extended by the various layers that relay messages back
45 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin 52 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin
46 // implements. 53 // implements.
47 class MEDIA_EXPORT Client { 54 class MEDIA_EXPORT Client {
48 public: 55 public:
49 virtual ~Client() {} 56 virtual ~Client() {}
50 57
51 // Callback to notify client that decoder has been initialized. 58 // Callback to notify client that decoder has been initialized.
52 virtual void NotifyInitializeDone() = 0; 59 virtual void NotifyInitializeDone() = 0;
53 60
54 // Callback to tell client how many and what size of buffers to provide. 61 // Callback to tell client how many and what size of buffers to provide.
55 virtual void ProvidePictureBuffers( 62 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers,
56 uint32 requested_num_of_buffers, const gfx::Size& dimensions) = 0; 63 const gfx::Size& dimensions,
64 TextureTarget texture_target) = 0;
57 65
58 // Callback to dismiss picture buffer that was assigned earlier. 66 // Callback to dismiss picture buffer that was assigned earlier.
59 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0; 67 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0;
60 68
61 // Callback to deliver decoded pictures ready to be displayed. 69 // Callback to deliver decoded pictures ready to be displayed.
62 virtual void PictureReady(const Picture& picture) = 0; 70 virtual void PictureReady(const Picture& picture) = 0;
63 71
64 // Callback to notify that decoded has decoded the end of the current 72 // Callback to notify that decoded has decoded the end of the current
65 // bitstream buffer. 73 // bitstream buffer.
66 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0; 74 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual void Destroy() = 0; 142 virtual void Destroy() = 0;
135 143
136 protected: 144 protected:
137 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>; 145 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>;
138 virtual ~VideoDecodeAccelerator(); 146 virtual ~VideoDecodeAccelerator();
139 }; 147 };
140 148
141 } // namespace media 149 } // namespace media
142 150
143 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 151 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698