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_SERVICES_MOJO_VIDEO_DECODER_SERVICE_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_VIDEO_DECODER_SERVICE_H_ |
6 #define MEDIA_MOJO_SERVICES_MOJO_VIDEO_DECODER_SERVICE_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_VIDEO_DECODER_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 // Implementation of a mojom::VideoDecoder which runs in the GPU process, | 22 // Implementation of a mojom::VideoDecoder which runs in the GPU process, |
23 // and wraps a media::VideoDecoder. | 23 // and wraps a media::VideoDecoder. |
24 class MojoVideoDecoderService : public mojom::VideoDecoder { | 24 class MojoVideoDecoderService : public mojom::VideoDecoder { |
25 public: | 25 public: |
26 explicit MojoVideoDecoderService(MojoMediaClient* mojo_media_client); | 26 explicit MojoVideoDecoderService(MojoMediaClient* mojo_media_client); |
27 ~MojoVideoDecoderService() final; | 27 ~MojoVideoDecoderService() final; |
28 | 28 |
29 // mojom::VideoDecoder implementation | 29 // mojom::VideoDecoder implementation |
30 void Construct(mojom::VideoDecoderClientAssociatedPtrInfo client, | 30 void Construct(mojom::VideoDecoderClientAssociatedPtrInfo client, |
31 mojo::ScopedDataPipeConsumerHandle decoder_buffer_pipe) final; | 31 mojo::ScopedDataPipeConsumerHandle decoder_buffer_pipe, |
| 32 mojom::CommandBufferIdPtr command_buffer_id) final; |
32 void Initialize(mojom::VideoDecoderConfigPtr config, | 33 void Initialize(mojom::VideoDecoderConfigPtr config, |
33 bool low_delay, | 34 bool low_delay, |
34 const InitializeCallback& callback) final; | 35 const InitializeCallback& callback) final; |
35 void Decode(mojom::DecoderBufferPtr buffer, | 36 void Decode(mojom::DecoderBufferPtr buffer, |
36 const DecodeCallback& callback) final; | 37 const DecodeCallback& callback) final; |
37 void Reset(const ResetCallback& callback) final; | 38 void Reset(const ResetCallback& callback) final; |
38 | 39 |
39 private: | 40 private: |
40 // Helper methods so that we can bind them with a weak pointer to avoid | 41 // Helper methods so that we can bind them with a weak pointer to avoid |
41 // running mojom::VideoDecoder callbacks after connection error happens and | 42 // running mojom::VideoDecoder callbacks after connection error happens and |
(...skipping 15 matching lines...) Expand all Loading... |
57 | 58 |
58 base::WeakPtr<MojoVideoDecoderService> weak_this_; | 59 base::WeakPtr<MojoVideoDecoderService> weak_this_; |
59 base::WeakPtrFactory<MojoVideoDecoderService> weak_factory_; | 60 base::WeakPtrFactory<MojoVideoDecoderService> weak_factory_; |
60 | 61 |
61 DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoderService); | 62 DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoderService); |
62 }; | 63 }; |
63 | 64 |
64 } // namespace media | 65 } // namespace media |
65 | 66 |
66 #endif // MEDIA_MOJO_SERVICES_MOJO_VIDEO_DECODER_SERVICE_H_ | 67 #endif // MEDIA_MOJO_SERVICES_MOJO_VIDEO_DECODER_SERVICE_H_ |
OLD | NEW |