diff options
Diffstat (limited to 'cast/streaming/receiver_message.h')
-rw-r--r-- | cast/streaming/receiver_message.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/cast/streaming/receiver_message.h b/cast/streaming/receiver_message.h index 59aa9750..f4adbfb3 100644 --- a/cast/streaming/receiver_message.h +++ b/cast/streaming/receiver_message.h @@ -17,16 +17,17 @@ namespace openscreen { namespace cast { -struct ReceiverWifiStatus { - Json::Value ToJson() const; - static ErrorOr<ReceiverWifiStatus> Parse(const Json::Value& value); - - // Current WiFi signal to noise ratio in decibels. - double wifi_snr = 0.0; - - // Min, max, average, and current bandwidth in bps in order of the WiFi link. - // Example: [1200, 1300, 1250, 1230]. - std::vector<int32_t> wifi_speed; +enum class MediaCapability { + kAudio, + kAac, + kOpus, + kVideo, + k4k, + kH264, + kVp8, + kVp9, + kHevc, + kAv1 }; struct ReceiverCapability { @@ -39,7 +40,7 @@ struct ReceiverCapability { int remoting_version = kRemotingVersionUnknown; // Set of capabilities (e.g., ac3, 4k, hevc, vp9, dolby_vision, etc.). - std::vector<std::string> media_capabilities; + std::vector<MediaCapability> media_capabilities; }; struct ReceiverError { @@ -47,6 +48,8 @@ struct ReceiverError { static ErrorOr<ReceiverError> Parse(const Json::Value& value); // Error code. + // TODO(issuetracker.google.com/184766188): Error codes should be well + // defined. int32_t code = -1; // Error description. @@ -63,9 +66,6 @@ struct ReceiverMessage { // Response to OFFER message. kAnswer, - // Response to GET_STATUS message. - kStatusResponse, - // Response to GET_CAPABILITIES message. kCapabilitiesResponse, @@ -84,8 +84,7 @@ struct ReceiverMessage { absl::variant<absl::monostate, Answer, - std::string, - ReceiverWifiStatus, + std::vector<uint8_t>, // Binary-encoded RPC message. ReceiverCapability, ReceiverError> body; |