| 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" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "media/base/decode_status.h" | 12 #include "media/base/decode_status.h" |
| 13 #include "media/mojo/interfaces/video_decoder.mojom.h" | 13 #include "media/mojo/interfaces/video_decoder.mojom.h" |
| 14 #include "media/mojo/services/media_mojo_export.h" |
| 14 | 15 |
| 15 namespace media { | 16 namespace media { |
| 16 | 17 |
| 17 class MojoDecoderBufferReader; | 18 class MojoDecoderBufferReader; |
| 18 class MojoMediaClient; | 19 class MojoMediaClient; |
| 19 class VideoDecoder; | 20 class VideoDecoder; |
| 20 class VideoFrame; | 21 class VideoFrame; |
| 21 | 22 |
| 22 // Implementation of a mojom::VideoDecoder which runs in the GPU process, | 23 // Implementation of a mojom::VideoDecoder which runs in the GPU process, |
| 23 // and wraps a media::VideoDecoder. | 24 // and wraps a media::VideoDecoder. |
| 24 class MojoVideoDecoderService : public mojom::VideoDecoder { | 25 class MEDIA_MOJO_EXPORT MojoVideoDecoderService : public mojom::VideoDecoder { |
| 25 public: | 26 public: |
| 26 explicit MojoVideoDecoderService(MojoMediaClient* mojo_media_client); | 27 explicit MojoVideoDecoderService(MojoMediaClient* mojo_media_client); |
| 27 ~MojoVideoDecoderService() final; | 28 ~MojoVideoDecoderService() final; |
| 28 | 29 |
| 29 // mojom::VideoDecoder implementation | 30 // mojom::VideoDecoder implementation |
| 30 void Construct(mojom::VideoDecoderClientAssociatedPtrInfo client, | 31 void Construct(mojom::VideoDecoderClientAssociatedPtrInfo client, |
| 31 mojo::ScopedDataPipeConsumerHandle decoder_buffer_pipe) final; | 32 mojo::ScopedDataPipeConsumerHandle decoder_buffer_pipe) 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; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 50 | 51 |
| 51 base::WeakPtr<MojoVideoDecoderService> weak_this_; | 52 base::WeakPtr<MojoVideoDecoderService> weak_this_; |
| 52 base::WeakPtrFactory<MojoVideoDecoderService> weak_factory_; | 53 base::WeakPtrFactory<MojoVideoDecoderService> weak_factory_; |
| 53 | 54 |
| 54 DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoderService); | 55 DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoderService); |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace media | 58 } // namespace media |
| 58 | 59 |
| 59 #endif // MEDIA_MOJO_SERVICES_MOJO_VIDEO_DECODER_SERVICE_H_ | 60 #endif // MEDIA_MOJO_SERVICES_MOJO_VIDEO_DECODER_SERVICE_H_ |
| OLD | NEW |