OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // The <code>chrome.webrtc.castSendTransport</code> API takes a track as | 5 // The <code>chrome.webrtc.castSendTransport</code> API takes a track as |
6 // a source of media, and sends that media on the inner transport according to | 6 // a source of media, and sends that media on the inner transport according to |
7 // the given RtpParams. | 7 // the given RtpParams. |
8 namespace webrtc.castSendTransport { | 8 namespace webrtc.castSendTransport { |
9 // Params for audio and video codec. | 9 // Params for audio and video codec. |
10 dictionary CodecSpecificParams { | 10 dictionary CodecSpecificParams { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 RtpPayloadParams[] payloads; | 54 RtpPayloadParams[] payloads; |
55 | 55 |
56 DOMString[] rtcpFeatures; | 56 DOMString[] rtcpFeatures; |
57 }; | 57 }; |
58 | 58 |
59 // Callback from the <code>create</code> method. | 59 // Callback from the <code>create</code> method. |
60 // |id| : The transport id. | 60 // |id| : The transport id. |
61 callback CreateCallback = void (long transportId); | 61 callback CreateCallback = void (long transportId); |
62 | 62 |
63 interface Functions { | 63 interface Functions { |
64 // Creates a cast send transport. | |
65 // |innerTransportId| : the ID of the inner transport. The transport to be | |
66 // created will send data on the inner transport. | |
67 // |track| : the media track encoded by this transport. | |
68 // |callback| : Called when the transport has been created. | |
69 [nocompile] static void create( | |
70 long innerTransportId, | |
71 [instanceOf=MediaStreamTrack] object track, | |
72 CreateCallback callback); | |
73 | |
74 // Destroys a cast send transport. | 64 // Destroys a cast send transport. |
75 // |transportId| : The transport ID. | 65 // |transportId| : The transport ID. |
76 [nocompile] static void destroy(long transportId); | 66 [nocompile] static void destroy(long transportId); |
77 | 67 |
78 // Returns capabilities of the transport. | 68 // Returns capabilities of the transport. |
79 // |transportId| : The transport ID. | 69 // |transportId| : The transport ID. |
80 [nocompile] static RtpCaps getCaps(long transportId); | 70 [nocompile] static RtpCaps getCaps(long transportId); |
81 | 71 |
82 // Starts to use the transport by providing remote params info. | 72 // Starts to use the transport by providing remote params info. |
83 // |transportId| : The transport ID. | 73 // |transportId| : The transport ID. |
(...skipping 24 matching lines...) Expand all Loading... |
108 // left. | 98 // left. |
109 // |transportId| : The ID of the transport. | 99 // |transportId| : The ID of the transport. |
110 static void onTimeout(long transportId); | 100 static void onTimeout(long transportId); |
111 | 101 |
112 // Event fired when a cast send transport has error. | 102 // Event fired when a cast send transport has error. |
113 // |transportId| : The ID of the transport. | 103 // |transportId| : The ID of the transport. |
114 // |errorString| : The error info. | 104 // |errorString| : The error info. |
115 static void onError(long transportId, DOMString errorString); | 105 static void onError(long transportId, DOMString errorString); |
116 }; | 106 }; |
117 }; | 107 }; |
OLD | NEW |