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
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52

media / mojo / mojom / remoting_common.mojom [blame]

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module media.mojom;

enum RemotingStopReason {
  ROUTE_TERMINATED,  // User-initiated disconnect, etc.
  LOCAL_PLAYBACK,  // Media switched back to local playback.
  SOURCE_GONE,  // RemotingSource has been destroyed.
  MESSAGE_SEND_FAILED,  // Failed to send a message to the sink.
  DATA_SEND_FAILED,  // Failed to consume from a data pipe or send to the sink.
  UNEXPECTED_FAILURE,  // Unexpected failure or inconsistent state encountered.
  SERVICE_GONE,  // Mirror service disconnected.
  USER_DISABLED,  // Media Remoting was disabled by user.
};

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum RemotingStartFailReason {
  CANNOT_START_MULTIPLE = 0,  // Remoting was already active.
  ROUTE_TERMINATED = 1,  // User-initated disconnect while starting remoting.
  INVALID_ANSWER_MESSAGE = 2,  // Invalid ANSWER message.
  REMOTING_NOT_PERMITTED = 3,  // Remoter does not have dialog permission.
};

enum RemotingSinkFeature {
  RENDERING,
  CONTENT_DECRYPTION,
};

enum RemotingSinkAudioCapability {
  CODEC_BASELINE_SET,
  CODEC_AAC,
  CODEC_OPUS,
};

enum RemotingSinkVideoCapability {
  SUPPORT_4K,
  CODEC_BASELINE_SET,
  CODEC_H264,
  CODEC_VP8,
  CODEC_VP9,
  CODEC_HEVC,
};

struct RemotingSinkMetadata {
  array<RemotingSinkFeature> features;
  array<RemotingSinkAudioCapability> audio_capabilities;
  array<RemotingSinkVideoCapability> video_capabilities;
  string friendly_name;
};