| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ |
| 6 #define MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ | 6 #define MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 const OutputCB& output_cb) final; | 42 const OutputCB& output_cb) final; |
| 43 void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 43 void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
| 44 const DecodeCB& decode_cb) final; | 44 const DecodeCB& decode_cb) final; |
| 45 void Reset(const base::Closure& closure) final; | 45 void Reset(const base::Closure& closure) final; |
| 46 bool NeedsBitstreamConversion() const final; | 46 bool NeedsBitstreamConversion() const final; |
| 47 bool CanReadWithoutStalling() const final; | 47 bool CanReadWithoutStalling() const final; |
| 48 int GetMaxDecodeRequests() const final; | 48 int GetMaxDecodeRequests() const final; |
| 49 | 49 |
| 50 // mojom::VideoDecoderClient implementation. | 50 // mojom::VideoDecoderClient implementation. |
| 51 void OnVideoFrameDecoded( | 51 void OnVideoFrameDecoded( |
| 52 mojom::VideoFramePtr frame, | 52 const scoped_refptr<VideoFrame>& frame, |
| 53 const base::Optional<base::UnguessableToken>& release_token) final; | 53 const base::Optional<base::UnguessableToken>& release_token) final; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 void OnInitializeDone(bool status, | 56 void OnInitializeDone(bool status, |
| 57 bool needs_bitstream_conversion, | 57 bool needs_bitstream_conversion, |
| 58 int32_t max_decode_requests); | 58 int32_t max_decode_requests); |
| 59 void OnDecodeDone(uint64_t decode_id, DecodeStatus status); | 59 void OnDecodeDone(uint64_t decode_id, DecodeStatus status); |
| 60 void OnResetDone(); | 60 void OnResetDone(); |
| 61 | 61 |
| 62 void BindRemoteDecoder(); | 62 void BindRemoteDecoder(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 base::WeakPtr<MojoVideoDecoder> weak_this_; | 95 base::WeakPtr<MojoVideoDecoder> weak_this_; |
| 96 base::WeakPtrFactory<MojoVideoDecoder> weak_factory_; | 96 base::WeakPtrFactory<MojoVideoDecoder> weak_factory_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoder); | 98 DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoder); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace media | 101 } // namespace media |
| 102 | 102 |
| 103 #endif // MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ | 103 #endif // MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ |
| OLD | NEW |