// Copyright 2022 LTN Global Communications, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package tv.make.api; import "type/geolocation.proto"; import "google/api/field_behavior.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; option go_package = "git.ltnglobal.com/make.tv/genproto/api;api"; message Input { message Streamtag { // The terms and conditions that apply to this streamtag. string terms_and_conditions = 1; // Whether or not WebRTC contributions are enabled. bool webrtc_enabled = 2; // URL at which WebRTC contribution is possible. string webrtc_contribution_url = 3 [(google.api.field_behavior) = OPTIONAL, deprecated=true]; // Whether or not a return channel has been enabled. bool return_channel_enabled = 4; // The return channel of this streamtag. string return_channel_output_id = 5 [(google.api.field_behavior) = OPTIONAL]; oneof return_channel_type { // The Janus server at which the return channel may be obtained. string return_channel_janus_url = 6; } } message DeprecatedUserDevice { // On a list call the destination will not pre resolved and an empty streamtag_id will be // returned. oneof destination { string production_id = 1; string streamtag_id = 2; } // The label of the destination (output only). string destination_label = 3; } // Status defines the current status of an input enum Status { // The status of the input is not specified. STATUS_UNSPECIFIED = 0; // The input is in an erroneous state. ERROR = 1; // The input is online and can receive streams. ONLINE = 2; // The input is offline. OFFLINE = 3; // The input is currently going online and will soon enter the online state. GOING_ONLINE = 4; // The input is currently going offline and will soon enter the offline state. GOING_OFFLINE = 5; // One of the configured sources isn't in RECEIVING state. ATTENTION = 6; // The input is functioning properly but all of the configured sources are in ERROR state. TRANSIENT_ERROR = 7; } message RtmpPull { // The url where a stream is requested from. string url = 1 [(google.api.field_behavior) = REQUIRED]; // If authentication is enabled for an input. bool authentication_enabled = 2; // The username for authentication. string username = 3; // The password for authentication. string password = 4; // The duration of the buffer. // // The minimum buffer duration is 0s and results in a direct pass through of packets. // The maximum buffer duration is 10s. google.protobuf.Duration buffer_duration = 5; } message RtmpPush { // The url where a stream has to be send to. string url = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // If authentication is enabled for an input. bool authentication_enabled = 2; // The username for authentication. string username = 3; // The password for authentication. string password = 4; // The duration of the buffer. // // The minimum buffer duration is 0s and results in a direct pass through of packets. // The maximum buffer duration is 10s. google.protobuf.Duration buffer_duration = 5; } // Encryption algorithm for SRT communication enum SrtEncryption { ENCRYPTION_UNSPECIFIED = 0; AES_128 = 1; AES_192 = 2; AES_256 = 3; } message SrtPull { // The url where a stream is requested from. string url = 1 [(google.api.field_behavior) = REQUIRED]; // If encryption is enabled for an input. bool encryption_enabled = 2; // The passphrase for a secure connection. // // MUST be set if encryption is enabled. string encryption_passphrase = 3; // The encryption algorithm to use for a secure connection. SrtEncryption encryption = 4; // The SRT latency in ms. int32 latency_millis = 5; // The duration of the buffer. // // The minimum buffer duration is 0s and results in a direct pass through of packets. // The maximum buffer duration is 10s. google.protobuf.Duration buffer_duration = 6; } message SrtPush { // The url where a stream has to be send to. string url = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // If encryption is enabled for an input. bool encryption_enabled = 2; // The passphrase for a secure connection. // // MUST be set if encryption is enabled. string encryption_passphrase = 3; // The encryption algorithm to use for a secure connection. SrtEncryption encryption = 4; // The SRT latency in ms. int32 latency_millis = 5; // The duration of the buffer. // // The minimum buffer duration is 0s and results in a direct pass through of packets. // The maximum buffer duration is 10s. google.protobuf.Duration buffer_duration = 6; } message RtspPull { // The url where a stream is requested from. string url = 1 [(google.api.field_behavior) = REQUIRED]; // If authentication is enabled for an input. bool authentication_enabled = 2; // The username for authentication. string username = 3; // The password for authentication. string password = 4; // The size of the RTP jitter buffer. // // The minimum size is 0s and results in a direct pass through of packets. // The maximum size is 30s. // The default value is 2s. google.protobuf.Duration jitter_buffer_duration = 5; // The duration of the buffer. // // The minimum buffer duration is 0s and results in a direct pass through of packets. // The maximum buffer duration is 10s. google.protobuf.Duration buffer_duration = 6; } // The configuration for an HLS pull input. message HlsPull { // The url where the manifest can be retrieved from. string url = 1 [(google.api.field_behavior) = REQUIRED]; // Whether authentication is enabled for this input. bool authentication_enabled = 2; // The username used for authentication. string username = 3; // The password used for authentication. string password = 4; // The duration of the buffer. google.protobuf.Duration buffer_duration = 5; } // The configuration for a push input. message Push { // The region in which this input is operating. // // If no value is given, the production defines the region of the input. // Can't be modified while the input is active. string region_id = 1 [(google.api.field_behavior) = OPTIONAL]; oneof config { SrtPush srt_push = 2; RtmpPush rtmp_push = 3; } } // The configuration for a pull input. message Pull { // The region in which this input is operating. // // If no value is given, the production defines the region of the input. // Can't be modified while the input is active. string region_id = 1 [(google.api.field_behavior) = OPTIONAL]; oneof config { SrtPull srt_pull = 2; RtmpPull rtmp_pull = 3; RtspPull rtsp_pull = 4; HlsPull hls_pull = 5; } } // The unique identifier of the input string id = 1; // The name of the parent. // // This is usually 'teams/{uuid}' or 'users/{uuid}'. string parent = 2 [(google.api.field_behavior) = REQUIRED]; // The display name of the input. string display_name = 3 [(google.api.field_behavior) = REQUIRED]; // The description of the input. string description = 4 [(google.api.field_behavior) = OPTIONAL]; // Whether or not the input is enabled and can receive signals. bool enabled = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // When has this input been created. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // When has this input been modified. google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // The user who created this input. string creator_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // The location of this input to be displayed on a map and configured by the user. tv.make.api.type.GeoLocation display_location = 9 [(google.api.field_behavior) = OPTIONAL]; oneof input_type { Streamtag streamtag = 10; // DeprecatedUserDevice will be removed in the future. This is for bridging the gap // between external devices and the new Push-API. Those device will be moved to push devices // (on a team level) and an intermediate solution DeprecatedUserDevice deprecated_user_device = 11; Push push = 12; Pull pull = 15; } // The status of the input. Status status = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of productions this input has been assigned to. repeated string production_ids = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // Id of the currently active source. string active_source_id = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; // Id of the currently forced source. string forced_source_id = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; // The region in which this input is operating. string region_id = 22 [(google.api.field_behavior) = OPTIONAL]; // Hostname of the running instance. string hostname = 30 [(google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = OPTIONAL]; // IPv4 of the running instance. string ipv4 = 31 [(google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = OPTIONAL]; // IPv4 of the running instance. string ipv6 = 32 [(google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = OPTIONAL]; }