chromium/third_party/blink/renderer/modules/media_capabilities/fuzzer_media_configuration.proto

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

syntax = "proto2";

package mc_fuzzer;

message MediaConfigProto {
  message VideoConfigProto {
    // String describing mime-type and codecs (e.g. 'video/webm; codecs="vp8"').
    optional string content_type = 1;

    // Width of the video in pixels.
    optional uint32 width = 2;

    // Height of the video in pixels.
    optional uint32 height = 3;

    // Bitrate for 1 second of video in bits-per-second.
    optional uint32 bitrate = 4;

    // String representing the videos frames-per-second (e.g. "60").
    optional double framerate = 5;

    // Boolean representing if the spatial scalabilty is required.
    optional bool spatial_scalability = 6;

    // String representing the scalability mode (e.g. "L3T3_KEY").
    optional string scalability_mode = 7;
  }
  optional VideoConfigProto video = 1;

  message AudioConfigProto {
    // String describing mime-type and codecs (e.g. 'audio/webm;
    // codecs="vorbis"').
    optional string content_type = 1;

    // String representing number of audio channels (e.g. '5.1').
    optional string channels = 2;

    // Bitrate for 1 second of audio in bits-per-second.
    optional uint32 bitrate = 3;

    // Number of audio samples-per-second.
    optional uint32 samplerate = 4;
  }
  optional AudioConfigProto audio = 2;

  // What type of decoding is it?
  enum MediaType {
    DECODING_FILE = 0;
    DECODING_MEDIA_SOURCE = 1;
    DECODING_WEBRTC = 2;
    ENCODING_WEBRTC = 3;
  }
  optional MediaType type = 3;

  // For detailed descriptions see
  // https://wicg.github.io/media-capabilities/#dictdef-mediacapabilitieskeysystemconfiguration
  message KeySystemConfig {
    // Levels of requirement for various MediaKeys features.
    enum MediaKeysRequirement {
      REQUIRED = 0;
      // NOTE, NOT_REQUIRED maps to "OPTIONAL" in the spec, but OPTIONAL causes
      // conflict with macros in Windows.h
      NOT_REQUIRED = 1;
      NOT_ALLOWED = 2;
    }

    // Types of media keys sessions.
    enum MediaKeySessionType {
      TEMPORARY = 0;
      PERSISTENT_LICENSE = 1;
    }

    // Name of the key system to use in decoding.
    optional string key_system = 1;

    // Indicates the format of accompanying Initialization Data.
    optional string init_data_type = 2;

    // The robustness level associated with the audio content type.
    // DEPRECATED: use audio.robustness.
    optional string audio_robustness = 3 [deprecated = true];

    // The robustness level associated with the video content type.
    // DEPRECATED: use video.robustness.
    optional string video_robustness = 4 [deprecated = true];

    // Whether use of a Distinctive Identifier(s) is required.
    optional MediaKeysRequirement distinctive_identifier = 5
        [default = NOT_REQUIRED];

    // Whether the ability to persist state is required.
    optional MediaKeysRequirement persistent_state = 6 [default = NOT_REQUIRED];

    // A list of MediaKeySessionTypes that must be supported.
    repeated MediaKeySessionType session_types = 7;

    message KeySystemTrackConfig {
      // The robustness level associated with a given track.
      optional string robustness = 1;
    }
    // Track-specific key system details.
    optional KeySystemTrackConfig key_system_audio_config = 8;
    optional KeySystemTrackConfig key_system_video_config = 9;
  }
  optional KeySystemConfig key_system_config = 4;
}