aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKennan Gumbs <kennangumbs@google.com>2021-07-07 14:56:59 -0400
committerJordan Bayles <jophba@chromium.org>2021-07-08 16:34:42 +0000
commit6c8b744d97aa6c8c7de0f9a3e3098d09e833c2e2 (patch)
tree0e6a662331f770bfc6d6fddaa3882d13db691255
parent9d6aade8df4477ef616f81b29cf91eb157c3686c (diff)
downloadopenscreen-6c8b744d97aa6c8c7de0f9a3e3098d09e833c2e2.tar.gz
Improve codec filtering in streaming_schema.json
Currently the codecName property in streaming_schema.json accepts any string. This patch modifies it to only accept supported codecs. Change-Id: If0e02e88feba7d03219a9e1808fc95c5290f26b2 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/3010321 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
-rw-r--r--cast/protocol/castv2/streaming_examples/offer.json38
-rw-r--r--cast/protocol/castv2/streaming_schema.json4
2 files changed, 39 insertions, 3 deletions
diff --git a/cast/protocol/castv2/streaming_examples/offer.json b/cast/protocol/castv2/streaming_examples/offer.json
index d1eba3a7..928c7344 100644
--- a/cast/protocol/castv2/streaming_examples/offer.json
+++ b/cast/protocol/castv2/streaming_examples/offer.json
@@ -36,9 +36,45 @@
"targetDelay": 400,
"timeBase": "1/90000",
"type": "video_source"
+ },
+ {
+ "aesIvMask": "64A6AAC2821880145271BB15B0188821",
+ "aesKey": "65386FD9BCC30BC7FB6A4DD1D3B0FA5E",
+ "codecName": "vp9",
+ "index": 2,
+ "maxBitRate": 5000000,
+ "maxFrameRate": "30000/1000",
+ "receiverRtcpEventLog": true,
+ "renderMode": "video",
+ "resolutions": [{"height": 1080, "width": 1920}],
+ "rtpExtensions": ["adaptive_playout_delay"],
+ "rtpPayloadType": 96,
+ "rtpProfile": "cast",
+ "ssrc": 748230,
+ "targetDelay": 400,
+ "timeBase": "1/90000",
+ "type": "video_source"
+ },
+ {
+ "aesIvMask": "64A6AAC2821880145271BB15B0188821",
+ "aesKey": "65386FD9BCC30BC7FB6A4DD1D3B0FA5E",
+ "codecName": "av1",
+ "index": 3,
+ "maxBitRate": 5000000,
+ "maxFrameRate": "30000/1000",
+ "receiverRtcpEventLog": true,
+ "renderMode": "video",
+ "resolutions": [{"height": 1080, "width": 1920}],
+ "rtpExtensions": ["adaptive_playout_delay"],
+ "rtpPayloadType": 96,
+ "rtpProfile": "cast",
+ "ssrc": 748231,
+ "targetDelay": 400,
+ "timeBase": "1/90000",
+ "type": "video_source"
}
]
},
"seqNum": 0,
"type": "OFFER"
-} \ No newline at end of file
+}
diff --git a/cast/protocol/castv2/streaming_schema.json b/cast/protocol/castv2/streaming_schema.json
index 7044c8ea..6a1a0db5 100644
--- a/cast/protocol/castv2/streaming_schema.json
+++ b/cast/protocol/castv2/streaming_schema.json
@@ -27,7 +27,7 @@
"properties": {
"index": {"type": "integer", "minimum": 0},
"type": {"type": "string", "enum": ["audio_source", "video_source"]},
- "codecName": {"type": "string"},
+ "codecName": {"type": "string", "enum": ["aac", "opus", "h264", "vp8", "hevc", "vp9", "av1"]},
"rtpProfile": {"type": "string", "enum": ["cast"]},
"rtpPayloadType": {"type": "integer", "minimum": 96, "maximum": 127},
"ssrc": {"$ref": "#/definitions/ssrc"},
@@ -272,4 +272,4 @@
"then": {"required": ["rpc"]}
}
]
-} \ No newline at end of file
+}