OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_COMMON_GPU_MEDIA_ACCELERATED_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_GPU_ACCELERATED_VIDEO_DECODER_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_ACCELERATED_VIDEO_DECODER_H_ | 6 #define MEDIA_GPU_ACCELERATED_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "content/common/content_export.h" | 12 #include "media/gpu/media_gpu_export.h" |
13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
14 | 14 |
15 namespace content { | 15 namespace media { |
16 | 16 |
17 // An AcceleratedVideoDecoder is a video decoder that requires support from an | 17 // An AcceleratedVideoDecoder is a video decoder that requires support from an |
18 // external accelerator (typically a hardware accelerator) to partially offload | 18 // external accelerator (typically a hardware accelerator) to partially offload |
19 // the decode process after parsing stream headers, and performing reference | 19 // the decode process after parsing stream headers, and performing reference |
20 // frame and state management. | 20 // frame and state management. |
21 class CONTENT_EXPORT AcceleratedVideoDecoder { | 21 class MEDIA_GPU_EXPORT AcceleratedVideoDecoder { |
22 public: | 22 public: |
23 AcceleratedVideoDecoder() {} | 23 AcceleratedVideoDecoder() {} |
24 virtual ~AcceleratedVideoDecoder() {} | 24 virtual ~AcceleratedVideoDecoder() {} |
25 | 25 |
26 virtual void SetStream(const uint8_t* ptr, size_t size) = 0; | 26 virtual void SetStream(const uint8_t* ptr, size_t size) = 0; |
27 | 27 |
28 // Have the decoder flush its state and trigger output of all previously | 28 // Have the decoder flush its state and trigger output of all previously |
29 // decoded surfaces. Return false on failure. | 29 // decoded surfaces. Return false on failure. |
30 virtual bool Flush() WARN_UNUSED_RESULT = 0; | 30 virtual bool Flush() WARN_UNUSED_RESULT = 0; |
31 | 31 |
(...skipping 22 matching lines...) Expand all Loading... |
54 // Return dimensions/required number of output surfaces that client should | 54 // Return dimensions/required number of output surfaces that client should |
55 // be ready to provide for the decoder to function properly. | 55 // be ready to provide for the decoder to function properly. |
56 // To be used after Decode() returns kAllocateNewSurfaces. | 56 // To be used after Decode() returns kAllocateNewSurfaces. |
57 virtual gfx::Size GetPicSize() const = 0; | 57 virtual gfx::Size GetPicSize() const = 0; |
58 virtual size_t GetRequiredNumOfPictures() const = 0; | 58 virtual size_t GetRequiredNumOfPictures() const = 0; |
59 | 59 |
60 private: | 60 private: |
61 DISALLOW_COPY_AND_ASSIGN(AcceleratedVideoDecoder); | 61 DISALLOW_COPY_AND_ASSIGN(AcceleratedVideoDecoder); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace content | 64 } // namespace media |
65 | 65 |
66 #endif // CONTENT_COMMON_GPU_MEDIA_ACCELERATED_VIDEO_DECODER_H_ | 66 #endif // MEDIA_GPU_ACCELERATED_VIDEO_DECODER_H_ |
OLD | NEW |