syntax = "proto3"; package tv.make.api; option go_package = "git.ltnglobal.com/make.tv/genproto/api;api"; import "google/protobuf/timestamp.proto"; message StreamMapping { enum FallbackRule { UNKNOWN = 0; DROP_ALL = 1; KEEP_ALL = 2; } // Whether or not the defined rules are applied. bool enabled = 1; // List of the applied rules. repeated StreamMappingRule rules = 2; // List of applied connections. // // [Read-Only] repeated StreamConnection connections = 6; // The rule which is applies for the streams that are not touched by any other rule. FallbackRule fallback_rule = 3; // When has this mapping been modified. // // Output only. google.protobuf.Timestamp update_time = 4; // When has this mapping been created. // // Output only. google.protobuf.Timestamp create_time = 5; } message StreamMappingRule { // Type of the incoming stream selector. oneof source_config { // PID for the MPEG-TS Stream, used in combination with PID `in_type` int32 source_pid = 1; // Order of the video stream in PMT (program map table). // Starts from zero, can be negative . // Negative values means counting from the end of the table. Last video is encoded as -1` int32 source_video_index = 2; // Order of the audio stream in PMT. // Starts from zero, can be negative. // Negative values means counting from the end of the table. Last audio is encoded as -1. int32 source_audio_index = 3; // Order of the metadata stream in PMT. // Starts from zero, can be negative. // Negative values means counting from the end of the table. Last metadata is encoded as -1. int32 source_metadata_index = 4; } // Type of the target stream mapper. oneof target_config { // PID of the outgoing stream. int32 target_pid = 5; // Keep stream. bool target_keep = 6; // Drop stream. bool target_drop = 7; } } message StreamConnection { // Source of a stream. // // [Read-Only] int32 source_pid = 1; // Target of a stream. // // [Read-Only] oneof target_config { // PID of the outgoing stream. int32 target_pid = 2; // Keep stream. bool target_keep = 3; // Drop stream. bool target_drop = 4; } // Rule which led to a connection. oneof reference { // Index of the StreamMappingRule. // // [Read-Only] int32 rule_index = 5; // If set, the fallback rule was the reason for this connection. // // [Read-Only] bool fallback = 6; } // Stream type of the connection. // // [Read-Only] // // See: https://en.wikipedia.org/wiki/Program-specific_information#Elementary_stream_types // // Examples: // 1: "ISO/IEC 11172-2 (MPEG-1 video) in a packetized stream" (Video) // 2: "ITU-T Rec. H.262 and ISO/IEC 13818-2 (MPEG-2 higher rate interlaced video) in a packetized stream" (Audio) // 3: "ISO/IEC 11172-3 (MPEG-1 audio) in a packetized stream" (Audio) // 4: "ISO/IEC 13818-3 (MPEG-2 halved sample rate audio) in a packetized stream" (Audio) // 14: "ISO/IEC 13818-1 auxiliary data in a packetized stream" (Metadata) // 15: "ISO/IEC 13818-7 ADTS AAC (MPEG-2 lower bit-rate audio) in a packetized stream" (Audio) // 16: "ISO/IEC 14496-2 (MPEG-4 H.263 based video) in a packetized stream" (Video) // 17: "ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio) in a packetized stream" (Audio) // 21: "Packetized metadata" (Metadata) // 22: "Sectioned metadata" (Metadata) // 27: "ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video) in a packetized stream" (Video) // 28: "ISO/IEC 14496-3 (MPEG-4 raw audio) in a packetized stream" (Audio) // 33: "ITU-T Rec. T.800 and ISO/IEC 15444 (JPEG 2000 video) in a packetized stream" (Video) // 36: "ITU-T Rec. H.265 and ISO/IEC 23008-2 (Ultra HD video) in a packetized stream" (Video) // 66: "Chinese Video Standard in a packetized stream" (Video) // 129: "Dolby Digital (AC-3) up to six channel audio for ATSC and Blu-ray in a packetized stream" (Audio) // 130: "SCTE subtitle or DTS 6 channel audio for Blu-ray in a packetized stream" (Metadata) // 131: "Dolby TrueHD lossless audio for Blu-ray in a packetized stream" (Audio) // 132: "Dolby Digital Plus (enhanced AC-3) up to 16 channel audio for Blu-ray in a packetized stream" (Audio) // 133: "DTS 8 channel audio for Blu-ray in a packetized stream" (Audio) // 134: "SCTE-35 digital program insertion cue message or DTS 8 channel lossless audio for Blu-ray in a packetized stream" (Metadata) // 135: "Dolby Digital Plus (enhanced AC-3) up to 16 channel audio for ATSC in a packetized stream" (Audio) // 144: "Blu-ray Presentation Graphic Stream (subtitling) in a packetized stream" (Metadata) // 193: "Dolby Digital (AC-3) up to six channel audio with AES-128-CBC data encryption in a packetized stream" (Audio) // 194: "ATSC DSM CC synchronous data or Dolby Digital Plus up to 16 channel audio with AES-128-CBC data encryption in a packetized stream" (Audio) // 207: "ISO/IEC 13818-7 ADTS AAC with AES-128-CBC frame encryption in a packetized stream", (Audio) // 209: "BBC Dirac (Ultra HD video) in a packetized stream" (Video) // 219: "ITU-T Rec. H.264 and ISO/IEC 14496-10 with AES-128-CBC slice encryption in a packetized stream" (Video), // 234: "Microsoft Windows Media Video 9 (lower bit-rate video) in a packetized stream" (Video) int32 pes_type = 7; // If a mapping could not be applied, then this will provide a short description. // // [Read-Only] string error = 8; }