| // Copyright 2021 The Fuchsia 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: [ | |
| "inspect/client.shard.cml", | |
| "syslog/client.shard.cml", | |
| "trace/client.shard.cml", | |
| ], | |
| program: { | |
| runner: "elf", | |
| binary: "bin/codec_factory", | |
| }, | |
| collections: [ | |
| { | |
| name: "sw-codecs", | |
| // every component started in this collection will self-destruct when | |
| // it exits | |
| durability: "single_run", | |
| }, | |
| { | |
| name: "magma-codecs", | |
| // every component started in this collection will self-destruct when | |
| // it exits | |
| durability: "single_run", | |
| }, | |
| ], | |
| capabilities: [ | |
| { protocol: "fuchsia.mediacodec.CodecFactory" }, | |
| ], | |
| use: [ | |
| { | |
| // TODO(https://fxbug.dev/324273348): Remove this capability once the clients have | |
| // been migrated to services. The service capability has been added below. | |
| directory: "dev-mediacodec", | |
| rights: [ "r*" ], | |
| path: "/dev/class/media-codec", | |
| }, | |
| { | |
| // This service replaces the directory capability above. | |
| service: "fuchsia.hardware.mediacodec.Service", | |
| }, | |
| { | |
| // TODO(https://fxbug.dev/324273348): Remove this capability once the clients have | |
| // been migrated to services. The service capability has been added below. | |
| directory: "dev-gpu", | |
| rights: [ "r*" ], | |
| path: "/dev/class/gpu", | |
| }, | |
| { | |
| // This service replaces the directory capability above. | |
| service: "fuchsia.gpu.magma.Service", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.metrics.MetricEventLoggerFactory", | |
| "fuchsia.sysinfo.SysInfo", | |
| ], | |
| }, | |
| { | |
| protocol: "fuchsia.component.Realm", | |
| from: "framework", | |
| }, | |
| ], | |
| offer: [ | |
| { | |
| protocol: [ | |
| "fuchsia.sysmem.Allocator", | |
| "fuchsia.sysmem2.Allocator", | |
| ], | |
| from: "parent", | |
| to: [ | |
| "#magma-codecs", | |
| "#sw-codecs", | |
| ], | |
| }, | |
| { | |
| // TODO(https://fxbug.dev/324273348): Remove this capability once the clients have | |
| // been migrated to services. The service capability has been added below. | |
| directory: "dev-gpu", | |
| from: "parent", | |
| to: "#magma-codecs", | |
| }, | |
| { | |
| // This service replaces the directory capability above. | |
| service: "fuchsia.gpu.magma.Service", | |
| from: "parent", | |
| to: "#magma-codecs", | |
| }, | |
| { | |
| dictionary: "diagnostics", | |
| from: "parent", | |
| to: "all", | |
| }, | |
| ], | |
| expose: [ | |
| { | |
| protocol: "fuchsia.mediacodec.CodecFactory", | |
| from: "self", | |
| }, | |
| ], | |
| } |