| 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 // This file contains an implementation of a class that provides H264 decode | 5 // This file contains an implementation of a class that provides H264 decode |
| 6 // support for use with VAAPI hardware video decode acceleration on Intel | 6 // support for use with VAAPI hardware video decode acceleration on Intel |
| 7 // systems. | 7 // systems. |
| 8 | 8 |
| 9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ | 9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ |
| 10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ | 10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // To be called during decoding. | 85 // To be called during decoding. |
| 86 // Stop (pause) decoding, discarding all remaining inputs and outputs, | 86 // Stop (pause) decoding, discarding all remaining inputs and outputs, |
| 87 // but do not flush decoder state, so that the playback can be resumed later, | 87 // but do not flush decoder state, so that the playback can be resumed later, |
| 88 // possibly from a different location. | 88 // possibly from a different location. |
| 89 void Reset(); | 89 void Reset(); |
| 90 | 90 |
| 91 // Set current stream data pointer to |ptr| and |size|. Output surfaces | 91 // Set current stream data pointer to |ptr| and |size|. Output surfaces |
| 92 // that are decoded from data in this stream chunk are to be returned along | 92 // that are decoded from data in this stream chunk are to be returned along |
| 93 // with the given |input_id|. | 93 // with the given |input_id|. |
| 94 void SetStream(uint8* ptr, size_t size, int32 input_id); | 94 void SetStream(const uint8* ptr, size_t size, int32 input_id); |
| 95 | 95 |
| 96 // Try to decode more of the stream, returning decoded frames asynchronously | 96 // Try to decode more of the stream, returning decoded frames asynchronously |
| 97 // via output_pic_cb_. Return when more stream is needed, when we run out | 97 // via output_pic_cb_. Return when more stream is needed, when we run out |
| 98 // of free surfaces, when we need a new set of them, or when an error occurs. | 98 // of free surfaces, when we need a new set of them, or when an error occurs. |
| 99 DecResult Decode() WARN_UNUSED_RESULT; | 99 DecResult Decode() WARN_UNUSED_RESULT; |
| 100 | 100 |
| 101 // Return dimensions/required number of output surfaces that client should | 101 // Return dimensions/required number of output surfaces that client should |
| 102 // be ready to provide for the decoder to function properly. | 102 // be ready to provide for the decoder to function properly. |
| 103 // To be used after Decode() returns kNeedNewSurfaces. | 103 // To be used after Decode() returns kNeedNewSurfaces. |
| 104 gfx::Size GetPicSize() { return pic_size_; } | 104 gfx::Size GetPicSize() { return pic_size_; } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 // Maximum size of DPB required by codec level. | 284 // Maximum size of DPB required by codec level. |
| 285 int max_dpb_size_; | 285 int max_dpb_size_; |
| 286 | 286 |
| 287 DISALLOW_COPY_AND_ASSIGN(VaapiH264Decoder); | 287 DISALLOW_COPY_AND_ASSIGN(VaapiH264Decoder); |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 } // namespace content | 290 } // namespace content |
| 291 | 291 |
| 292 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ | 292 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ |
| OLD | NEW |