Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / common / extensions / api / cast_streaming_rtp_stream.idl
blob310db2f49fdd3e283c13d6f78e417242ba69f7c8
1 // Copyright 2013 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.rtpStream</code> API allows configuration
6 // of encoding parameters and RTP parameters used in a Cast streaming
7 // session.
8 namespace cast.streaming.rtpStream {
9 // Params for audio and video codec.
10 dictionary CodecSpecificParams {
11 DOMString key;
12 DOMString value;
15 // RTP payload param.
16 dictionary RtpPayloadParams {
17 long payloadType;
19 DOMString codecName;
21 // Synchronization source identifier.
22 long? ssrc;
24 long? feedbackSsrc;
26 long? clockRate;
28 long? minBitrate;
30 long? maxBitrate;
32 // The number of channels.
33 long? channels;
35 // Video width in pixels.
36 long? width;
38 // Video height in pixels.
39 long? height;
41 // 16 bytes AES key encoded in Base64.
42 DOMString? aesKey;
44 // 16 bytes AES IV (Initialization vector) mask encoded in Base64.
45 DOMString? aesIvMask;
47 // A list of codec specific params.
48 CodecSpecificParams[] codecSpecificParams;
51 // Cast RTP parameters.
52 dictionary RtpParams {
53 // RTP payload params.
54 RtpPayloadParams payload;
56 DOMString[] rtcpFeatures;
59 // Callback from the <code>create</code> method.
60 // |id| : The ID for the RTP stream.
61 callback CreateCallback = void (long streamId);
63 interface Functions {
64 // Destroys a Cast RTP stream.
65 // |streamId| : The RTP stream ID.
66 [nocompile] static void destroy(long streamId);
68 // Returns an array of supported parameters with default values.
69 // This includes a list of supported codecs on this platform and
70 // corresponding encoding and RTP parameters.
71 // |streamId| : The RTP stream ID.
72 [nocompile] static RtpParams[] getSupportedParams(long streamId);
74 // Activates the RTP stream by providing the parameters.
75 // |streamId| : The RTP stream ID.
76 // |params| : Parameters set for this stream.
77 [nocompile] static void start(long streamId, RtpParams params);
79 // Stops activity on the specified stream.
80 // |streamId| : The RTP stream ID.
81 [nocompile] static void stop(long streamId);
84 interface Events {
85 // Event fired when a Cast RTP stream has started.
86 // |streamId| : The ID of the RTP stream.
87 static void onStarted(long streamId);
89 // Event fired when a Cast RTP stream has stopped.
90 // |streamId| : The ID of the RTP stream.
91 static void onStopped(long streamId);
93 // Event fired when a Cast RTP stream has error.
94 // |streamId| : The ID of the RTP stream.
95 // |errorString| : The error info.
96 static void onError(long streamId, DOMString errorString);