mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-29 00:36:10 +03:00
63 lines
2.4 KiB
Plaintext
63 lines
2.4 KiB
Plaintext
|
// Copyright 2017 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.
|
||
|
|
||
|
// Next min version: 3
|
||
|
|
||
|
module cros.mojom;
|
||
|
|
||
|
import "media/capture/video/chromeos/mojo/camera_common.mojom";
|
||
|
import "media/mojo/interfaces/jpeg_decode_accelerator.mojom";
|
||
|
import "media/mojo/interfaces/jpeg_encode_accelerator.mojom";
|
||
|
|
||
|
// The CrOS camera HAL v3 Mojo dispatcher. The dispatcher acts as a proxy and
|
||
|
// waits for the server and the clients to register. There can only be one
|
||
|
// server registered, with multiple clients requesting connections to the
|
||
|
// server. For each client, the dispatcher is responsible for creating a Mojo
|
||
|
// channel to the server and pass the established Mojo channel to the client in
|
||
|
// order to set up a Mojo channel between the client and the server.
|
||
|
//
|
||
|
// Next method ID: 4
|
||
|
interface CameraHalDispatcher {
|
||
|
// A CameraHalServer calls RegisterServer to register itself with the
|
||
|
// dispatcher.
|
||
|
RegisterServer@0(CameraHalServer server);
|
||
|
|
||
|
// A CameraHalClient calls RegisterClient to register itself with the
|
||
|
// dispatcher.
|
||
|
RegisterClient@1(CameraHalClient client);
|
||
|
|
||
|
// Get JpegDecodeAccelerator from dispatcher.
|
||
|
[MinVersion=1] GetJpegDecodeAccelerator@2(
|
||
|
media.mojom.JpegDecodeAccelerator& jda_request);
|
||
|
|
||
|
// Get JpegEncodeAccelerator from dispatcher.
|
||
|
[MinVersion=2] GetJpegEncodeAccelerator@3(
|
||
|
media.mojom.JpegEncodeAccelerator& jea_request);
|
||
|
};
|
||
|
|
||
|
// The CrOS camera HAL v3 Mojo server.
|
||
|
//
|
||
|
// Next method ID: 1
|
||
|
interface CameraHalServer {
|
||
|
// A caller calls CreateChannel to create a new Mojo channel to the camera
|
||
|
// HAL v3 adapter. Upon successfully binding of |camera_module_request|, the
|
||
|
// caller will have a established Mojo channel to the camera HAL v3 adapter
|
||
|
// process.
|
||
|
CreateChannel@0(CameraModule& camera_module_request);
|
||
|
};
|
||
|
|
||
|
// The CrOS camera HAL v3 Mojo client.
|
||
|
//
|
||
|
// Next method ID: 1
|
||
|
interface CameraHalClient {
|
||
|
// A caller calls SetUpChannel to dispatch the established Mojo channel
|
||
|
// |camera_module_ptr| to the client. The CameraHalClient can create a
|
||
|
// Mojo channel to the camera HAL v3 adapter process with |camera_module_ptr|.
|
||
|
// SetUpChannel may be called multiple times. In cases such as the
|
||
|
// CameraHalServer which holds the original Mojo channel crashes,
|
||
|
// CameraHalDispatcher will call SetUpChannel again once a new CameraHalServer
|
||
|
// reconnects.
|
||
|
SetUpChannel@0(CameraModule camera_module_ptr);
|
||
|
};
|