OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CONTEXT_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_CONTEXT_H_ |
6 #define MEDIA_VIDEO_VIDEO_DECODE_CONTEXT_H_ | 6 #define MEDIA_VIDEO_VIDEO_DECODE_CONTEXT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/task.h" | 10 #include "base/task.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // keep VideoDecodeEngine a reusable component and also adapt to different | 60 // keep VideoDecodeEngine a reusable component and also adapt to different |
61 // system by having a different VideoDecodeContext. | 61 // system by having a different VideoDecodeContext. |
62 // | 62 // |
63 // |frame| is a VideoFrame allocated via AllocateVideoFrames(). | 63 // |frame| is a VideoFrame allocated via AllocateVideoFrames(). |
64 // | 64 // |
65 // |buffer| is of type void*, it is of an internal type in VideoDecodeEngine | 65 // |buffer| is of type void*, it is of an internal type in VideoDecodeEngine |
66 // that points to the buffer that contains the video frame. | 66 // that points to the buffer that contains the video frame. |
67 // Implementor should know how to handle it. | 67 // Implementor should know how to handle it. |
68 // | 68 // |
69 // |task| is executed if the operation was completed successfully. | 69 // |task| is executed if the operation was completed successfully. |
70 // TODO(hclam): Rename this to ConvertToVideoFrame(). | 70 virtual void ConvertToVideoFrame(void* buffer, |
71 virtual void UploadToVideoFrame(void* buffer, scoped_refptr<VideoFrame> frame, | 71 scoped_refptr<VideoFrame> frame, |
72 Task* task) = 0; | 72 Task* task) = 0; |
73 | 73 |
74 // Destroy this context asynchronously. When the operation is done |task| | 74 // Destroy this context asynchronously. When the operation is done |task| |
75 // is called. It is safe to delete this object only after |task| is called. | 75 // is called. It is safe to delete this object only after |task| is called. |
76 // | 76 // |
77 // ReleaseVideoFrames() need to be called with all the video frames allocated | 77 // ReleaseVideoFrames() need to be called with all the video frames allocated |
78 // before making this call. | 78 // before making this call. |
79 virtual void Destroy(Task* task) = 0; | 79 virtual void Destroy(Task* task) = 0; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace media | 82 } // namespace media |
83 | 83 |
84 #endif // MEDIA_VIDEO_VIDEO_DECODE_CONTEXT_H_ | 84 #endif // MEDIA_VIDEO_VIDEO_DECODE_CONTEXT_H_ |
OLD | NEW |