Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: media/mojo/clients/mojo_video_decoder.cc

Issue 2526953003: Add MediaGpuChannelManager::LookupChannel(). (Closed)
Patch Set: Implement MockGpuVideoAcceleratorFactories::GetCommandBufferRouteId(). Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/mojo/clients/mojo_video_decoder.h ('k') | media/mojo/interfaces/video_decoder.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_video_decoder.cc
diff --git a/media/mojo/clients/mojo_video_decoder.cc b/media/mojo/clients/mojo_video_decoder.cc
index efa695d0747adfd87ca07e239ef650f312c1e826..c608bdcd2966e5e3529c689388f23e99f0f071bc 100644
--- a/media/mojo/clients/mojo_video_decoder.cc
+++ b/media/mojo/clients/mojo_video_decoder.cc
@@ -10,11 +10,14 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/single_thread_task_runner.h"
+#include "base/unguessable_token.h"
#include "media/base/decoder_buffer.h"
#include "media/base/demuxer_stream.h"
#include "media/base/video_frame.h"
#include "media/mojo/common/media_type_converters.h"
#include "media/mojo/common/mojo_decoder_buffer_converter.h"
+#include "media/mojo/interfaces/media_types.mojom.h"
+#include "media/renderers/gpu_video_accelerator_factories.h"
namespace media {
@@ -23,10 +26,9 @@ MojoVideoDecoder::MojoVideoDecoder(
GpuVideoAcceleratorFactories* gpu_factories,
mojom::VideoDecoderPtr remote_decoder)
: task_runner_(task_runner),
- gpu_factories_(gpu_factories),
remote_decoder_info_(remote_decoder.PassInterface()),
+ gpu_factories_(gpu_factories),
client_binding_(this) {
- (void)gpu_factories_;
DVLOG(1) << __func__;
}
@@ -180,8 +182,19 @@ void MojoVideoDecoder::BindRemoteDecoder() {
mojo_decoder_buffer_writer_ = MojoDecoderBufferWriter::Create(
DemuxerStream::VIDEO, &remote_consumer_handle);
+ media::mojom::CommandBufferIdPtr command_buffer_id;
+ if (gpu_factories_) {
+ base::UnguessableToken channel_token = gpu_factories_->GetChannelToken();
+ if (channel_token) {
+ command_buffer_id = media::mojom::CommandBufferId::New();
+ command_buffer_id->channel_token = std::move(channel_token);
+ command_buffer_id->route_id = gpu_factories_->GetCommandBufferRouteId();
+ }
+ }
+
remote_decoder_->Construct(std::move(client_ptr_info),
- std::move(remote_consumer_handle));
+ std::move(remote_consumer_handle),
+ std::move(command_buffer_id));
}
void MojoVideoDecoder::Stop() {
« no previous file with comments | « media/mojo/clients/mojo_video_decoder.h ('k') | media/mojo/interfaces/video_decoder.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698