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 #include "media/mojo/services/mojo_video_decoder_service.h" | 5 #include "media/mojo/services/mojo_video_decoder_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/optional.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
11 #include "media/base/decoder_buffer.h" | 12 #include "media/base/decoder_buffer.h" |
12 #include "media/base/video_decoder.h" | 13 #include "media/base/video_decoder.h" |
13 #include "media/base/video_decoder_config.h" | 14 #include "media/base/video_decoder_config.h" |
14 #include "media/base/video_frame.h" | 15 #include "media/base/video_frame.h" |
15 #include "media/mojo/common/media_type_converters.h" | 16 #include "media/mojo/common/media_type_converters.h" |
16 #include "media/mojo/common/mojo_decoder_buffer_converter.h" | 17 #include "media/mojo/common/mojo_decoder_buffer_converter.h" |
17 #include "media/mojo/services/mojo_media_client.h" | 18 #include "media/mojo/services/mojo_media_client.h" |
18 #include "mojo/public/c/system/types.h" | 19 #include "mojo/public/c/system/types.h" |
19 #include "mojo/public/cpp/system/buffer.h" | 20 #include "mojo/public/cpp/system/buffer.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 127 |
127 void MojoVideoDecoderService::OnDecoderReset(const ResetCallback& callback) { | 128 void MojoVideoDecoderService::OnDecoderReset(const ResetCallback& callback) { |
128 DVLOG(1) << __func__; | 129 DVLOG(1) << __func__; |
129 callback.Run(); | 130 callback.Run(); |
130 } | 131 } |
131 | 132 |
132 void MojoVideoDecoderService::OnDecoderOutput( | 133 void MojoVideoDecoderService::OnDecoderOutput( |
133 const scoped_refptr<VideoFrame>& frame) { | 134 const scoped_refptr<VideoFrame>& frame) { |
134 DVLOG(2) << __func__; | 135 DVLOG(2) << __func__; |
135 DCHECK(client_); | 136 DCHECK(client_); |
136 client_->OnVideoFrameDecoded(mojom::VideoFrame::From(frame)); | 137 client_->OnVideoFrameDecoded(mojom::VideoFrame::From(frame), base::nullopt); |
| 138 } |
| 139 |
| 140 void MojoVideoDecoderService::OnReleaseMailbox( |
| 141 const base::UnguessableToken& release_token, |
| 142 const gpu::SyncToken& release_sync_token) { |
| 143 DVLOG(2) << __func__; |
137 } | 144 } |
138 | 145 |
139 } // namespace media | 146 } // namespace media |
OLD | NEW |