aboutsummaryrefslogtreecommitdiff
path: root/cast/streaming/offer_messages.h
diff options
context:
space:
mode:
Diffstat (limited to 'cast/streaming/offer_messages.h')
-rw-r--r--cast/streaming/offer_messages.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/cast/streaming/offer_messages.h b/cast/streaming/offer_messages.h
index efb3a1f6..80458954 100644
--- a/cast/streaming/offer_messages.h
+++ b/cast/streaming/offer_messages.h
@@ -46,6 +46,9 @@ constexpr int kDefaultNumAudioChannels = 2;
struct Stream {
enum class Type : uint8_t { kAudioSource, kVideoSource };
+ static Error TryParse(const Json::Value& root,
+ Stream::Type type,
+ Stream* out);
Json::Value ToJson() const;
bool IsValid() const;
@@ -68,6 +71,7 @@ struct Stream {
};
struct AudioStream {
+ static Error TryParse(const Json::Value& root, AudioStream* out);
Json::Value ToJson() const;
bool IsValid() const;
@@ -78,6 +82,7 @@ struct AudioStream {
struct VideoStream {
+ static Error TryParse(const Json::Value& root, VideoStream* out);
Json::Value ToJson() const;
bool IsValid() const;
@@ -95,7 +100,7 @@ struct VideoStream {
enum class CastMode : uint8_t { kMirroring, kRemoting };
struct Offer {
- static ErrorOr<Offer> Parse(const Json::Value& root);
+ static Error TryParse(const Json::Value& root, Offer* out);
Json::Value ToJson() const;
bool IsValid() const;