forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcast_streaming_receiver_session.idl
70 lines (60 loc) · 2.42 KB
/
cast_streaming_receiver_session.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// 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;
};
// 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 for incoming data.
long senderSsrc;
// The SSRC used to send RTCP reports back to the sender.
long receiverSsrc;
// RTP time units per second, defaults to 48000 for audio
// and 90000 for video.
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| are generally provided by the
// sender through some other messaging channel.
//
// |audioParams| : Audio stream parameters.
// |videoParams| : Video stream parameters.
// |localEndpoint| : Local IP and port to bind to.
// |height| : Video height.
// |width| : Video width.
// |maxFrameRate| : Max video frame rate.
// |mediaStreamURL| : URL of MediaStream to add the audio and video to.
// |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);
};
};