// 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; option go_package = "git.ltnglobal.com/make.tv/genproto/api;api"; import "google/api/field_behavior.proto"; import "google/protobuf/duration.proto"; message InputSource { // Id of the source. string id = 1 [(google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = NON_EMPTY_DEFAULT, (google.api.field_behavior) = IMMUTABLE]; // Id of the input. string input_id = 2 [(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE]; enum Status { // The status of the source is unspecified. STATUS_UNSPECIFIED = 0; // The source is waiting for a signal (typically for push inputs) IDLE = 1; // The source is actively receiving a signal. RECEIVING = 2; // The source encountered an error. ERROR = 3; // PUSH // ==== // // _______________________ // v | // IDLE -> RECEIVING -> ERROR // \______________________^ // // // PULL // ==== // // _________ // v | // IDLE -> RECEIVING -> ERROR // \______________________^ } // Whether or not the source is enabled. bool enabled = 3 [(google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = NON_EMPTY_DEFAULT]; // Status of the source. Status status = 4 [(google.api.field_behavior) = OPTIONAL]; // Config of the source. oneof config { RTMPPull rtmp_pull = 5; RTMPPush rtmp_push = 6; SRTPull srt_pull = 7; SRTPush srt_push = 8; RTSPPull rtsp_pull = 9; HLSPull hls_pull = 10; } // The configuration of an RTMP Pull source. message RTMPPull { // The URL for a SRT signal to be pulled from. string url = 1 [(google.api.field_behavior) = REQUIRED]; // Whether or not authentication is enabled. // // Default - false bool authentication_enabled = 2 [(google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = NON_EMPTY_DEFAULT]; // The username for authentication. string username = 3 [(google.api.field_behavior) = OPTIONAL]; // The password for authentication. string password = 4 [(google.api.field_behavior) = OPTIONAL]; // The buffer duration. google.protobuf.Duration buffer_duration = 5 [(google.api.field_behavior) = OPTIONAL]; } // The configuration of an RTMP Push source. message RTMPPush { // The URL for a SRT signal to be pushed to. // // This is automatically generated. string url = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Whether or not authentication is enabled. // // Default - false bool authentication_enabled = 2 [(google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = NON_EMPTY_DEFAULT]; // The username for authentication. string username = 3 [(google.api.field_behavior) = OPTIONAL]; // The password for authentication. string password = 4 [(google.api.field_behavior) = OPTIONAL]; // The buffer duration. google.protobuf.Duration buffer_duration = 5 [(google.api.field_behavior) = OPTIONAL]; } enum Encryption { ENCRYPTION_UNSPECIFIED = 0; AES_128 = 1; AES_192 = 2; AES_256 = 3; } // The configuration of an SRT Pull source. message SRTPull { // The URL for a SRT signal to be pulled from. string url = 1 [(google.api.field_behavior) = REQUIRED]; // The latency of the SRT input in milliseconds. double latency_millis = 2 [(google.api.field_behavior) = OPTIONAL]; // Whether or not authentication is enabled. // // Default - false bool encryption_enabled = 3 [(google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = NON_EMPTY_DEFAULT]; // The passphrase. // // Minimum length - 10 // Maximum length - 79 string passphrase = 4 [(google.api.field_behavior) = OPTIONAL]; // The encryption to use. Encryption encryption = 5 [(google.api.field_behavior) = OPTIONAL]; // The buffer duration. google.protobuf.Duration buffer_duration = 6 [(google.api.field_behavior) = OPTIONAL]; } // The configuration of an SRT Push source. message SRTPush { // The URL for a SRT signal to be pushed to. // // This is automatically generated. string url = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // The latency of the SRT input in milliseconds. double latency_millis = 2 [(google.api.field_behavior) = OPTIONAL]; // Whether or not encryption is enabled. // // Default - false bool encryption_enabled = 3 [(google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = NON_EMPTY_DEFAULT]; // The passphrase. // // Minimum length - 10 // Maximum length - 79 string passphrase = 4 [(google.api.field_behavior) = OPTIONAL]; // The encryption to use. Encryption encryption = 5 [(google.api.field_behavior) = OPTIONAL]; // The buffer duration. google.protobuf.Duration buffer_duration = 6 [(google.api.field_behavior) = OPTIONAL]; } // The configuration of an RTSP Pull source. message RTSPPull { // The URL for a RTSP signal to be pulled from. string url = 1 [(google.api.field_behavior) = REQUIRED]; // Whether or not authentication is enabled. // // Default - false bool authentication_enabled = 2 [(google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = NON_EMPTY_DEFAULT]; // The username for authentication. string username = 3 [(google.api.field_behavior) = OPTIONAL]; // The password for authentication. string password = 4 [(google.api.field_behavior) = OPTIONAL]; // The duration of the RTP jitter buffer. google.protobuf.Duration jitter_buffer_duration = 5 [(google.api.field_behavior) = OPTIONAL]; // The duration of the buffer. google.protobuf.Duration buffer_duration = 6 [(google.api.field_behavior) = OPTIONAL]; } // The configuration of an HLS Pull source. message HLSPull { // The URL for a HLS signal to be pulled from. string url = 1 [(google.api.field_behavior) = REQUIRED]; // Whether or not authentication is enabled. // // Default - false bool authentication_enabled = 2 [(google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = NON_EMPTY_DEFAULT]; // The username for authentication. string username = 3 [(google.api.field_behavior) = OPTIONAL]; // The password for authentication. string password = 4 [(google.api.field_behavior) = OPTIONAL]; // The buffer duration. google.protobuf.Duration buffer_duration = 5 [(google.api.field_behavior) = OPTIONAL]; } // Audio format of the source. // // Example: aac:2:440000 (codec:number of channels:sample rate) string audio_format = 11 [(google.api.field_behavior) = OPTIONAL]; // Video format of the source. // // Example: mpeg4:24.0:800x600 (codec:fps:resolution) string video_format = 12 [(google.api.field_behavior) = OPTIONAL]; // The resource labels. map labels = 13 [(google.api.field_behavior) = OPTIONAL]; }