Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / api / cast_streaming_receiver_session.idl
blob15a7f0a7f493b23fb3a3ad6036e54620d9f8a600
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // The <code>chrome.cast.streaming.receiverSession</code> API creates a Cast
6 // receiver session and adds the resulting audio and video tracks to a
7 // MediaStream.
8 namespace cast.streaming.receiverSession {
9 // The UDP socket address and port.
10 dictionary IPEndPoint {
11 DOMString address;
12 long port;
15 // RTP receiver parameters.
16 dictionary RtpReceiverParams {
17 // Maximum latency in milliseconds. This parameter controls the logic
18 // of flow control. Implementation can adjust latency adaptively and
19 // tries to keep it under this threshold. A larger value allows smoother
20 // playback at the cost of higher latency.
21 long maxLatency;
23 DOMString codecName;
25 // Synchronization source identifier for incoming data.
26 long senderSsrc;
28 // The SSRC used to send RTCP reports back to the sender.
29 long receiverSsrc;
31 // RTP time units per second, defaults to 48000 for audio
32 // and 90000 for video.
33 long? rtpTimebase;
35 // 32 bytes hex-encoded AES key.
36 DOMString? aesKey;
38 // 32 bytes hex-encoded AES IV (Initialization vector) mask.
39 DOMString? aesIvMask;
42 callback ErrorCallback = void (DOMString error);
44 interface Functions {
45 // Creates a Cast receiver session which receives data from a UDP
46 // socket. The receiver will decode the incoming data into an audio
47 // and a video track which will be added to the provided media stream.
48 // The |audioParams| and |videoParams| are generally provided by the
49 // sender through some other messaging channel.
51 // |audioParams| : Audio stream parameters.
52 // |videoParams| : Video stream parameters.
53 // |localEndpoint| : Local IP and port to bind to.
54 // |height| : Video height.
55 // |width| : Video width.
56 // |maxFrameRate| : Max video frame rate.
57 // |mediaStreamURL| : URL of MediaStream to add the audio and video to.
58 // |transport_options| : Optional transport settings.
59 [nocompile] static void createAndBind(
60 RtpReceiverParams audioParams,
61 RtpReceiverParams videoParams,
62 IPEndPoint localEndpoint,
63 long maxWidth,
64 long maxHeight,
65 double maxFrameRate,
66 DOMString mediaStreamURL,
67 ErrorCallback error_callback,
68 optional object transport_options);