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 MEDIA_BASE_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_BASE_VIDEO_DECODER_H_ |
6 #define MEDIA_BASE_VIDEO_DECODER_H_ | 6 #define MEDIA_BASE_VIDEO_DECODER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 // Status codes for decode operations on VideoDecoder. | 22 // Status codes for decode operations on VideoDecoder. |
23 // TODO(rileya): Now that both AudioDecoder and VideoDecoder Status enums | 23 // TODO(rileya): Now that both AudioDecoder and VideoDecoder Status enums |
24 // match, break them into a decoder_status.h. | 24 // match, break them into a decoder_status.h. |
25 enum Status { | 25 enum Status { |
26 kOk, // Everything went as planned. | 26 kOk, // Everything went as planned. |
27 kAborted, // Decode was aborted as a result of Reset() being called. | 27 kAborted, // Decode was aborted as a result of Reset() being called. |
28 kDecodeError, // Decoding error happened. | 28 kDecodeError, // Decoding error happened. |
29 kDecryptError // Decrypting error happened. | 29 kDecryptError // Decrypting error happened. |
30 }; | 30 }; |
31 | 31 |
32 // Callback to return decode frames. | 32 // Callback for VideoDecoder to return a decoded frame whenever it becomes |
| 33 // available. Only non-EOS frames should be returned via this callback. |
33 typedef base::Callback<void(const scoped_refptr<VideoFrame>&)> OutputCB; | 34 typedef base::Callback<void(const scoped_refptr<VideoFrame>&)> OutputCB; |
34 | 35 |
35 // Callback type for Decode(). Called after the decoder has completed decoding | 36 // Callback type for Decode(). Called after the decoder has completed decoding |
36 // corresponding DecoderBuffer, indicating that it's ready to accept another | 37 // corresponding DecoderBuffer, indicating that it's ready to accept another |
37 // buffer to decode. | 38 // buffer to decode. |
38 typedef base::Callback<void(Status status)> DecodeCB; | 39 typedef base::Callback<void(Status status)> DecodeCB; |
39 | 40 |
40 VideoDecoder(); | 41 VideoDecoder(); |
41 virtual ~VideoDecoder(); | 42 virtual ~VideoDecoder(); |
42 | 43 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Returns maximum number of parallel decode requests. | 102 // Returns maximum number of parallel decode requests. |
102 virtual int GetMaxDecodeRequests() const; | 103 virtual int GetMaxDecodeRequests() const; |
103 | 104 |
104 private: | 105 private: |
105 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); | 106 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); |
106 }; | 107 }; |
107 | 108 |
108 } // namespace media | 109 } // namespace media |
109 | 110 |
110 #endif // MEDIA_BASE_VIDEO_DECODER_H_ | 111 #endif // MEDIA_BASE_VIDEO_DECODER_H_ |
OLD | NEW |