Index: chrome/common/extensions/api/cast_streaming_receiver_session.idl |
diff --git a/chrome/common/extensions/api/cast_streaming_receiver_session.idl b/chrome/common/extensions/api/cast_streaming_receiver_session.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..041277741aa0eef91972effd6e7b686b17161ec7 |
--- /dev/null |
+++ b/chrome/common/extensions/api/cast_streaming_receiver_session.idl |
@@ -0,0 +1,74 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// The <code>chrome.cast.streaming.receiverSession</code> API creates a Cast |
+// receiver session and adds the resulting audio and video tracks to a |
+// MediaStream. |
+namespace cast.streaming.receiverSession { |
+ // The UDP socket address and port. |
+ dictionary IPEndPoint { |
+ DOMString address; |
+ long port; |
+ }; |
+ |
+ // Params for audio and video codec. |
+ dictionary CodecSpecificParams { |
Yoyo Zhou
2015/03/04 03:12:15
Is this actually used?
hubbe
2015/03/04 23:12:33
Not anymore -- deleted.
|
+ DOMString key; |
+ DOMString value; |
+ }; |
+ |
+ // RTP receiver parameters. |
+ dictionary RtpReceiverParams { |
+ // Maximum latency in milliseconds. This parameter controls the logic |
+ // of flow control. Implementation can adjust latency adaptively and |
+ // tries to keep it under this threshold. A larger value allows smoother |
+ // playback at the cost of higher latency. |
+ long maxLatency; |
+ |
+ DOMString codecName; |
+ |
+ // Synchronization source identifier. |
+ long ssrc; |
+ |
+ long feedbackSsrc; |
Yoyo Zhou
2015/03/04 03:12:15
Document this
hubbe
2015/03/04 23:12:33
Done.
|
+ |
+ // Defaults to 48000 for audio and 90000 for video. |
Yoyo Zhou
2015/03/04 03:12:15
This should say something like the comment I found
hubbe
2015/03/04 23:12:33
Done.
|
+ long? rtpTimebase; |
+ |
+ // 32 bytes hex-encoded AES key. |
+ DOMString? aesKey; |
+ |
+ // 32 bytes hex-encoded AES IV (Initialization vector) mask. |
+ DOMString? aesIvMask; |
+ }; |
+ |
+ callback ErrorCallback = void (DOMString error); |
+ |
+ interface Functions { |
+ // Creates a Cast receiver session which receives data from a UDP |
+ // socket. The receiver will decode the incoming data into an audio |
+ // and a video track which will be added to the provided media stream. |
+ // The |audioParams| and |videoParams| is generally provided by the |
Yoyo Zhou
2015/03/04 03:12:15
nit: 'is' -> 'are'
hubbe
2015/03/04 23:12:33
Done.
|
+ // sender through some other messaging channel. |
+ // |
+ // |audioParams| : the video stream parameters |
Yoyo Zhou
2015/03/04 03:12:15
The audio stream parameters.
hubbe
2015/03/04 23:12:33
Done.
|
+ // |videoParams| : the video stream parameters |
Yoyo Zhou
2015/03/04 03:12:15
nit: Be consistent capitalizing and punctuating.
hubbe
2015/03/04 23:12:33
Done.
|
+ // |localEndpoint| : Set this to bind() to a local UDP port. |
+ // |height| : Video height |
+ // |width| : Video width |
+ // |maxFrameRate| : Max video frame rate. |
+ // |mediaStreamURL| : URL of MediaStream to add the audio & video to. |
Yoyo Zhou
2015/03/04 03:12:15
nit: 'and' rather than '&'
hubbe
2015/03/04 23:12:33
Done.
|
+ // |transport_options| : Optional transport settings. |
+ [nocompile] static void createAndBind( |
+ RtpReceiverParams audioParams, |
+ RtpReceiverParams videoParams, |
+ IPEndPoint localEndpoint, |
+ long maxWidth, |
+ long maxHeight, |
+ double maxFrameRate, |
+ DOMString mediaStreamURL, |
+ ErrorCallback error_callback, |
+ optional object transport_options); |
+ }; |
+}; |