forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
decrypting_renderer_factory.cc
35 lines (27 loc) · 1.39 KB
/
decrypting_renderer_factory.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/renderers/decrypting_renderer_factory.h"
#include "media/base/media_log.h"
#include "media/renderers/decrypting_renderer.h"
namespace media {
DecryptingRendererFactory::DecryptingRendererFactory(
media::MediaLog* media_log,
std::unique_ptr<media::RendererFactory> renderer_factory)
: media_log_(media_log), renderer_factory_(std::move(renderer_factory)) {}
DecryptingRendererFactory::~DecryptingRendererFactory() = default;
std::unique_ptr<Renderer> DecryptingRendererFactory::CreateRenderer(
const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
const scoped_refptr<base::TaskRunner>& worker_task_runner,
AudioRendererSink* audio_renderer_sink,
VideoRendererSink* video_renderer_sink,
RequestOverlayInfoCB request_overlay_info_cb,
const gfx::ColorSpace& target_color_space) {
std::unique_ptr<media::Renderer> renderer = renderer_factory_->CreateRenderer(
media_task_runner, worker_task_runner, audio_renderer_sink,
video_renderer_sink, std::move(request_overlay_info_cb),
target_color_space);
return std::make_unique<DecryptingRenderer>(std::move(renderer), media_log_,
media_task_runner);
}
} // namespace media