1// Copyright 2021 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.video.livestream.logging.v1; 18 19import "google/cloud/video/livestream/v1/resources.proto"; 20import "google/rpc/status.proto"; 21 22option go_package = "cloud.google.com/go/video/livestream/logging/apiv1/loggingpb;loggingpb"; 23option java_multiple_files = true; 24option java_outer_classname = "LogsProto"; 25option java_package = "com.google.cloud.video.livestream.logging.v1"; 26 27// Logs of activities related to the Channels. 28message ChannelActivity { 29 // Message is for more details of the log and instructions to users. 30 string message = 1; 31 32 // Different types of the logs. 33 oneof activity_type { 34 // The channel streaming state changes. 35 StreamingStateChange streaming_state_change = 2; 36 37 // An error happens with the video pipeline. 38 StreamingError streaming_error = 3; 39 40 // The channel has accepted an input stream. 41 InputAccept input_accept = 4; 42 43 // An error happens with the input stream. 44 InputError input_error = 5; 45 46 // An input stream disconnects. 47 InputDisconnect input_disconnect = 6; 48 } 49} 50 51// StreamingStateChange records when the channel streaming state changes. 52message StreamingStateChange { 53 // New streaming state of the channel. 54 google.cloud.video.livestream.v1.Channel.StreamingState new_state = 1; 55 56 // Previous streaming state of the channel. 57 google.cloud.video.livestream.v1.Channel.StreamingState previous_state = 2; 58} 59 60// StreamingError records when an error happens with the video pipeline. 61message StreamingError { 62 // A description of the reason for the streaming error. 63 google.rpc.Status error = 1; 64} 65 66// InputAccept records when the channel has accepted an input stream. 67message InputAccept { 68 // ID of the input stream. 69 string stream_id = 1; 70 71 // The user-defined key for the input attachment. 72 string input_attachment = 2; 73 74 // Properties of the input stream. 75 InputStreamProperty input_stream_property = 3; 76} 77 78// InputError records when an error happens with the input stream. 79message InputError { 80 // ID of the input stream. 81 string stream_id = 1; 82 83 // The user-defined key for the input attachment. If the stream doesn’t belong 84 // to any input attachment, this field is empty. 85 string input_attachment = 2; 86 87 // Properties of the input stream. 88 InputStreamProperty input_stream_property = 3; 89 90 // A description of the reason for the error with the input stream. 91 google.rpc.Status error = 4; 92} 93 94// Properties of the input stream. 95message InputStreamProperty { 96 // Properties of the video streams. 97 repeated VideoStream video_streams = 1; 98 99 // Properties of the audio streams. 100 repeated AudioStream audio_streams = 2; 101} 102 103// Properties of the video stream. 104message VideoStream { 105 // Index of this video stream. 106 int32 index = 1; 107 108 // Properties of the video format. 109 VideoFormat video_format = 2; 110} 111 112// Properties of the video format. 113message VideoFormat { 114 // Video codec used in this video stream. 115 string codec = 1; 116 117 // The width of the video stream in pixels. 118 int32 width_pixels = 2; 119 120 // The height of the video stream in pixels. 121 int32 height_pixels = 3; 122 123 // The frame rate of the input video stream. 124 double frame_rate = 4; 125} 126 127// Properties of the audio stream. 128message AudioStream { 129 // Index of this audio stream. 130 int32 index = 1; 131 132 // Properties of the audio format. 133 AudioFormat audio_format = 2; 134} 135 136// Properties of the audio format. 137message AudioFormat { 138 // Audio codec used in this audio stream. 139 string codec = 1; 140 141 // The number of audio channels. 142 int32 channel_count = 2; 143 144 // A list of channel names specifying the layout of the audio channels. 145 repeated string channel_layout = 3; 146} 147 148// InputDisconnect records when an input stream disconnects. 149message InputDisconnect { 150 // ID of the input stream. 151 string stream_id = 1; 152 153 // The user-defined key for the input attachment. 154 string input_attachment = 2; 155} 156