OLD | NEW |
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_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" |
11 #include "base/callback_old.h" | 11 #include "base/callback_old.h" |
12 #include "media/base/bitstream_buffer.h" | 12 #include "media/base/bitstream_buffer.h" |
13 #include "media/base/video_decoder_config.h" | |
14 #include "media/video/picture.h" | 13 #include "media/video/picture.h" |
15 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
16 | 15 |
17 namespace media { | 16 namespace media { |
18 | 17 |
19 // Video decoder interface. | 18 // Video decoder interface. |
20 // This interface is extended by the various components that ultimately | 19 // This interface is extended by the various components that ultimately |
21 // implement the backend of PPB_VideoDecode_Dev. | 20 // implement the backend of PPB_VideoDecode_Dev. |
22 // | 21 // |
23 // No thread-safety guarantees are implied by the use of RefCountedThreadSafe | 22 // No thread-safety guarantees are implied by the use of RefCountedThreadSafe |
24 // below. | 23 // below. |
25 class MEDIA_EXPORT VideoDecodeAccelerator | 24 class MEDIA_EXPORT VideoDecodeAccelerator |
26 : public base::RefCountedThreadSafe<VideoDecodeAccelerator> { | 25 : public base::RefCountedThreadSafe<VideoDecodeAccelerator> { |
27 public: | 26 public: |
28 // TODO(fischman): fix foreign references to this and get rid of this typedef. | 27 // Video stream profile. This *must* match PP_VideoDecoder_Profile. |
29 typedef VideoCodecProfile Profile; | 28 enum Profile { |
| 29 // Keep the values in this enum unique, as they imply format (h.264 vs. VP8, |
| 30 // for example), and keep the values for a particular format grouped |
| 31 // together for clarity. |
| 32 H264PROFILE_MIN = 0, |
| 33 H264PROFILE_BASELINE = H264PROFILE_MIN, |
| 34 H264PROFILE_MAIN, |
| 35 H264PROFILE_EXTENDED, |
| 36 H264PROFILE_HIGH, |
| 37 H264PROFILE_HIGH10PROFILE, |
| 38 H264PROFILE_HIGH422PROFILE, |
| 39 H264PROFILE_HIGH444PREDICTIVEPROFILE, |
| 40 H264PROFILE_SCALABLEBASELINE, |
| 41 H264PROFILE_SCALABLEHIGH, |
| 42 H264PROFILE_STEREOHIGH, |
| 43 H264PROFILE_MULTIVIEWHIGH, |
| 44 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH, |
| 45 }; |
30 | 46 |
31 // Enumeration of potential errors generated by the API. | 47 // Enumeration of potential errors generated by the API. |
32 // Note: Keep these in sync with PP_VideoDecodeError_Dev. | 48 // Note: Keep these in sync with PP_VideoDecodeError_Dev. |
33 enum Error { | 49 enum Error { |
34 // An operation was attempted during an incompatible decoder state. | 50 // An operation was attempted during an incompatible decoder state. |
35 ILLEGAL_STATE = 1, | 51 ILLEGAL_STATE = 1, |
36 // Invalid argument was passed to an API method. | 52 // Invalid argument was passed to an API method. |
37 INVALID_ARGUMENT, | 53 INVALID_ARGUMENT, |
38 // Encoded input is unreadable. | 54 // Encoded input is unreadable. |
39 UNREADABLE_INPUT, | 55 UNREADABLE_INPUT, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 virtual void Destroy() = 0; | 152 virtual void Destroy() = 0; |
137 | 153 |
138 protected: | 154 protected: |
139 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>; | 155 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>; |
140 virtual ~VideoDecodeAccelerator(); | 156 virtual ~VideoDecodeAccelerator(); |
141 }; | 157 }; |
142 | 158 |
143 } // namespace media | 159 } // namespace media |
144 | 160 |
145 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 161 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |