summaryrefslogtreecommitdiff
path: root/chromium/components/mirroring/mojom/resource_provider.mojom
blob: 7605585ac705a0fd7a1894d3d86adc92093a036f (plain)
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 2018 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.

module mirroring.mojom;

import "media/capture/mojom/video_capture.mojom";
import "services/network/public/mojom/network_context.mojom";
import "media/mojo/interfaces/remoting.mojom";
import "media/mojo/interfaces/audio_data_pipe.mojom";
import "media/mojo/interfaces/audio_input_stream.mojom";
import "media/mojo/interfaces/audio_parameters.mojom";

// This interface is used by ResourceProvider to notify that an audio input
// stream is created as requested. The lifetime of the stream is limited by the
// lifetime of this client.
interface AudioStreamCreatorClient {
  StreamCreated(
      media.mojom.AudioInputStream stream,
      media.mojom.AudioInputStreamClient& client_request,
      media.mojom.ReadOnlyAudioDataPipe data_pipe,
      bool initially_muted);
};

// This interface is used by the Mirroring Service to ask the browser to provide
// resources.
interface ResourceProvider {
  GetVideoCaptureHost(media.mojom.VideoCaptureHost& request);
  GetNetworkContext(network.mojom.NetworkContext& request);
  CreateAudioStream(AudioStreamCreatorClient client,
                    media.mojom.AudioParameters param,
                    uint32 shared_memory_count);
  ConnectToRemotingSource(media.mojom.Remoter remoter,
                          media.mojom.RemotingSource& request);
};