| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ENCODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ |
| 6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ | 6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // Video encoder interface. | 22 // Video encoder interface. |
| 23 class MEDIA_EXPORT VideoEncodeAccelerator { | 23 class MEDIA_EXPORT VideoEncodeAccelerator { |
| 24 public: | 24 public: |
| 25 // Specification of an encoding profile supported by an encoder. | 25 // Specification of an encoding profile supported by an encoder. |
| 26 struct SupportedProfile { | 26 struct SupportedProfile { |
| 27 VideoCodecProfile profile; | 27 VideoCodecProfile profile; |
| 28 gfx::Size max_resolution; | 28 gfx::Size max_resolution; |
| 29 uint32 max_framerate_numerator; | 29 uint32 max_framerate_numerator; |
| 30 uint32 max_framerate_denominator; | 30 uint32 max_framerate_denominator; |
| 31 bool operator< (const SupportedProfile& other) const { |
| 32 return memcmp(this, &other, sizeof(SupportedProfile)) < 0; |
| 33 } |
| 31 }; | 34 }; |
| 32 | 35 |
| 33 // Enumeration of potential errors generated by the API. | 36 // Enumeration of potential errors generated by the API. |
| 34 enum Error { | 37 enum Error { |
| 35 // An operation was attempted during an incompatible encoder state. | 38 // An operation was attempted during an incompatible encoder state. |
| 36 kIllegalStateError, | 39 kIllegalStateError, |
| 37 // Invalid argument was passed to an API method. | 40 // Invalid argument was passed to an API method. |
| 38 kInvalidArgumentError, | 41 kInvalidArgumentError, |
| 39 // A failure occurred at the GPU process or one of its dependencies. | 42 // A failure occurred at the GPU process or one of its dependencies. |
| 40 // Examples of such failures include GPU hardware failures, GPU driver | 43 // Examples of such failures include GPU hardware failures, GPU driver |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // uses "Destroy()" instead of trying to use the destructor. | 164 // uses "Destroy()" instead of trying to use the destructor. |
| 162 template <> | 165 template <> |
| 163 struct MEDIA_EXPORT DefaultDeleter<media::VideoEncodeAccelerator> { | 166 struct MEDIA_EXPORT DefaultDeleter<media::VideoEncodeAccelerator> { |
| 164 public: | 167 public: |
| 165 void operator()(void* video_encode_accelerator) const; | 168 void operator()(void* video_encode_accelerator) const; |
| 166 }; | 169 }; |
| 167 | 170 |
| 168 } // namespace base | 171 } // namespace base |
| 169 | 172 |
| 170 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ | 173 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ |
| OLD | NEW |