Chromium Code Reviews| 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..12aad2115da7438cad24032bc53d1f5550b7f5ff |
| --- /dev/null |
| +++ b/chrome/common/extensions/api/cast_streaming_receiver_session.idl |
| @@ -0,0 +1,73 @@ |
| +// 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 { |
| + 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; |
| + |
| + // 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 |
| + // sender through some other messaging channel. |
| + // |
| + // |audioParams| : the video stream parameters |
| + // |videoParams| : the video stream parameters |
| + // |localEndpoint| : Set this to bind() to a local UDP port. |
| + // |remoteEndpoint| : Set this to connect() to a remote UDP port. |
| + // |height| : Video height |
| + // |width| : Video width |
| + // |maxFrameRate| : Max video frame rate. |
| + // |mediaStreamURL| : URL of MediaStream to add the audio & video to. |
| + // |transport_options| : Optional transport settings. |
| + [nocompile] static void create( |
| + RtpReceiverParams audioParams, |
| + RtpReceiverParams videoParams, |
| + IPEndPoint localEndpoint, |
| + IPEndPoint remoteEndpoint, |
| + long height, |
|
miu
2015/02/28 04:32:58
Rename to maxWidth/maxHeight, if these are needed
hubbe
2015/03/03 01:23:03
Done.
|
| + long width, |
| + double maxFrameRate, |
| + DOMString mediaStreamURL, |
| + ErrorCallback error_callback, |
| + optional object transport_options); |
| + }; |
| +}; |