| OLD | NEW |
| 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 UI_GFX_VIDEO_DECODE_ACCELERATION_SUPPORT_MAC_H_ | 5 #ifndef UI_GFX_VIDEO_DECODE_ACCELERATION_SUPPORT_MAC_H_ |
| 6 #define UI_GFX_VIDEO_DECODE_ACCELERATION_SUPPORT_MAC_H_ | 6 #define UI_GFX_VIDEO_DECODE_ACCELERATION_SUPPORT_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <CoreFoundation/CoreFoundation.h> | 9 #include <CoreFoundation/CoreFoundation.h> |
| 10 #include <CoreVideo/CoreVideo.h> | 10 #include <CoreVideo/CoreVideo.h> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 namespace gfx { | 33 namespace gfx { |
| 34 | 34 |
| 35 // This Mac OS X-specific class provides dynamically linked access to | 35 // This Mac OS X-specific class provides dynamically linked access to |
| 36 // VideoDecodeAcceleration.framework, which is only available on 10.6 and later. | 36 // VideoDecodeAcceleration.framework, which is only available on 10.6 and later. |
| 37 class UI_EXPORT VideoDecodeAccelerationSupport : | 37 class UI_EXPORT VideoDecodeAccelerationSupport : |
| 38 public base::RefCountedThreadSafe<VideoDecodeAccelerationSupport> { | 38 public base::RefCountedThreadSafe<VideoDecodeAccelerationSupport> { |
| 39 public: | 39 public: |
| 40 enum Status { | 40 enum Status { |
| 41 VDA_SUCCESS = 0, | 41 SUCCESS = 0, |
| 42 VDA_LOAD_FRAMEWORK_ERROR, | 42 LOAD_FRAMEWORK_ERROR, |
| 43 VDA_HARDWARE_NOT_SUPPORTED_ERROR, | 43 HARDWARE_NOT_SUPPORTED_ERROR, |
| 44 VDA_OTHER_ERROR, | 44 OTHER_ERROR, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 typedef base::Callback<void(CVImageBufferRef, int status)> FrameReadyCallback; | 47 typedef base::Callback<void(CVImageBufferRef, int status)> FrameReadyCallback; |
| 48 | 48 |
| 49 VideoDecodeAccelerationSupport(); | 49 VideoDecodeAccelerationSupport(); |
| 50 | 50 |
| 51 // Calls the create function. | 51 // Calls the create function. |
| 52 Status Create(int width, int height, | 52 Status Create(int width, int height, |
| 53 int pixel_format, | 53 int pixel_format, |
| 54 const void* avc_bytes, size_t avc_size); | 54 const void* avc_bytes, size_t avc_size); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // A reference to the message loop that this object was created on. This is | 92 // A reference to the message loop that this object was created on. This is |
| 93 // used to invoke the frame ready callback on the correct thread. | 93 // used to invoke the frame ready callback on the correct thread. |
| 94 scoped_refptr<base::MessageLoopProxy> loop_; | 94 scoped_refptr<base::MessageLoopProxy> loop_; |
| 95 | 95 |
| 96 DISALLOW_COPY_AND_ASSIGN(VideoDecodeAccelerationSupport); | 96 DISALLOW_COPY_AND_ASSIGN(VideoDecodeAccelerationSupport); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace gfx | 99 } // namespace gfx |
| 100 | 100 |
| 101 #endif // UI_GFX_VIDEO_DECODE_ACCELERATION_SUPPORT_MAC_H_ | 101 #endif // UI_GFX_VIDEO_DECODE_ACCELERATION_SUPPORT_MAC_H_ |
| OLD | NEW |