// 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 "output/streammapping.proto"; import "google/api/field_behavior.proto"; option go_package = "git.ltnglobal.com/make.tv/genproto/api;api"; // OutputTarget represents a target resource of an output. message OutputTarget { // Type specifies the type of the target destination. enum Type { // The type is unspecified. TYPE_UNSPECIFIED = 0; // The target is a custom RTMP destination. CUSTOM_RTMP = 1; // The target is a custom FTL destination. CUSTOM_FTL = 2; // The target is using a Facebook account resource. FACEBOOK = 3; // The target is using a Twitch account resource. TWITCH = 4; // The target is using a Google account resource and pushing to YouTube. YOUTUBE = 5; // The target is using a Mixer account resource. MIXER = 6; // The target is a custom SRT destination. CUSTOM_SRT = 7; // The target is a custom HLS destination. CUSTOM_HLS = 8; } // Status specifies the current status of the target. enum Status { // The target status is unspecified. STATUS_UNSPECIFIED = 0; // The target encountered an error. ERROR = 1; // The target is currently pending. // // Targets may be pending because they are fulfilling a state transition or // connect to the desired destination. PENDING = 2; // The target is online and a connection has been established. ONLINE = 3; // The target is online and actively transmitting video material. // // Targets are not immediately considered transmitting since push // destinations are sometimes dropping clients even though some video // material has been (falsely) accepted. // // Pull targets are potentially online but only transmit streams when // they are actively being pulled. ONLINE_TRANSMITTING = 4; // The target is offline and enabled. OFFLINE_ENABLED = 5; // The target is offline and disabled. // // This target will stay offline until it has been explicitly enabled // by setting the enabled property. OFFLINE_DISABLED = 6; } // Property of a target. message Property { // Type specifies the value's type. enum Type { // The type is unspecified. TYPE_UNSPECIFIED = 0; // The value is a string. STRING = 1; // The value is a secret string. // // Secrets shouldn't be visible to users without manual interaction. // One might use an to display a secret for // instance in a user interface. SECRET = 2; } // Option to choose from for this property. message Option { // The value for this option. string value = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // The display name or label of this option. string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The type of this option. Can be used to group different kinds of values together. // Usually type describes what kind of entity a value refers to. E.g. the type distinguishes // between a Facebook user, group or page destination. string type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Key of the property. // // Name | Output Type | Description // ------------------------------| ----------- | ----------------------------------------------------------------------------------- // username | CUSTOM_RTMP | RTMP authentication, optional // password | CUSTOM_RTMP | RTMP authentication, optional // authentication_enabled | CUSTOM_RTMP | RTMP authentication flag, optional // rtmp_url | CUSTOM_RTMP | RTMP destination, required // ftl_url | CUSTOM_FTL | FTL destination, required // srt_url | CUSTOM_SRT | SRT destination, required // latency_ms | CUSTOM_SRT | SRT latency in milliseconds, optional // encryption_enabled | CUSTOM_SRT | whether the SRT encryption is enabled or not, required // key_length | CUSTOM_SRT | SRT authentication AES keylength (128, 192, 256), required if encryption is enabled // passphrase | CUSTOM_SRT | SRT encryption passphrase, required if encryption is enabled // hls_manifest_url | CUSTOM_HLS | HLS manifest push destination URL, required // hls_segment_duration_secs | CUSTOM_HLS | HLS segment duration in seconds, required // hls_segment_count | CUSTOM_HLS | HLS segment count per playlist // hls_authentication_enabled | CUSTOM_HLS | HLS authentication enabled or not, optional // hls_username | CUSTOM_HLS | HLS authentication, required if hls_authentication_enabled is true // hls_password | CUSTOM_HLS | HLS authentication, required if hls_authentication_enabled is true // target_id | FACEBOOK | Identifier of the Facebook destination, required // target_name | FACEBOOK | Name of the Facebook channel or page, required // stream_type | FACEBOOK | The type of the Facebook stream (AMBIENT, REGULAR) // ingest_server_url | TWITCH | URL of the Twitch ingest server to use, required // ingest_server_name | TWITCH | Name of the Twitch ingest server, required // stream_id | YOUTUBE | Identifier of the YouTube destination, required // string key = 1; // Value of the property. // // When options are given this MUST be one of the provided values. string value = 2; // Type of the property. Type type = 3; // Whether or not this property is required. bool required = 4; // The default value for the property. string default_value = 5; // The display name of the property. string display_name = 6; // List of options to choose from for the property. // // This list may be empty if no predefined options are present. // Options are, for instance, the Facebook repeated Option options = 7; } // The unique identifier of the target. string id = 1; // The unique identifier of the owning output. string output_id = 2; // The unique identifier of the owning team. string team_id = 3; // The type of this target. // // The type depends on the account provider of the given account_id. // If no account_id is given, the type is CUSTOM. Type type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // The display name of the target. string display_name = 5; // The index of the output's transcoding to use. // Cannot be changed while the target is active. // MUST be a valid index even for passthrough outputs. // The value SHOULD be zero for passthrough. // // Deprecated: Will be dropped in future in favor of the transcodings field. int32 transcoding_index = 6 [deprecated=true]; // The individual delay of this target in seconds. // // Cannot be changed while the target is active. double delay_seconds = 7; // Whether or not this target is enabled. // // Enabling a target of an active output will immediately cause the output signal to be // transmitted to the configured destination. bool enabled = 8; // The status of this target. Status status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // A message providing more information about the current status // // Examples: // - transfer error: transfer failed // - authentication error: authenticate with the destination failed string status_message = 14 [(google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = OPTIONAL]; // The id of an account that must belong to the same team. string account_id = 10; // List of properties for this target. // // It is sufficient to supply only key and value when // creating or updating a target. repeated Property properties = 11; // Stream mapping for this target. StreamMapping stream_mapping = 12 [(google.api.field_behavior) = OPTIONAL]; // The transcoding indices of the output to use. // // Indices are zero based and refer to the array of enabled qualities on the output. // For example, if MAIN and SUB1 are enabled on the output, one can select both by using [0, 1]. // It must be [] for passthrough outputs, since there won't be any transcoding in this case. repeated int32 transcodings = 13; }