| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 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 | |
| 7 // the given RtpParams. | |
| 8 namespace webrtc.castSendTransport { | |
| 9 // Params for audio and video codec. | |
| 10 dictionary CodecSpecificParams { | |
| 11 DOMString key; | |
| 12 DOMString value; | |
| 13 }; | |
| 14 | |
| 15 // RTP payload param. | |
| 16 dictionary RtpPayloadParams { | |
| 17 long payloadType; | |
| 18 | |
| 19 DOMString codecName; | |
| 20 | |
| 21 // Synchronization source identifier. | |
| 22 long? ssrc; | |
| 23 | |
| 24 long? clockRate; | |
| 25 | |
| 26 long? minBitrate; | |
| 27 | |
| 28 long? maxBitrate; | |
| 29 | |
| 30 // The number of channels. | |
| 31 long? channels; | |
| 32 | |
| 33 // Video width in pixels. | |
| 34 long? width; | |
| 35 | |
| 36 // Video height in pixels. | |
| 37 long? height; | |
| 38 | |
| 39 // A list of codec specific params. | |
| 40 CodecSpecificParams[] codecSpecificParams; | |
| 41 }; | |
| 42 | |
| 43 // Cast transport capabilities | |
| 44 dictionary RtpCaps { | |
| 45 // RTP payload params. | |
| 46 RtpPayloadParams[] payloads; | |
| 47 | |
| 48 DOMString[] rtcpFeatures; | |
| 49 }; | |
| 50 | |
| 51 // Cast transport params. | |
| 52 dictionary RtpParams { | |
| 53 // RTP payload params. | |
| 54 RtpPayloadParams[] payloads; | |
| 55 | |
| 56 DOMString[] rtcpFeatures; | |
| 57 }; | |
| 58 | |
| 59 // Callback from the <code>create</code> method. | |
| 60 // |id| : The transport id. | |
| 61 callback CreateCallback = void (long transportId); | |
| 62 | |
| 63 interface Functions { | |
| 64 // Destroys a cast send transport. | |
| 65 // |transportId| : The transport ID. | |
| 66 [nocompile] static void destroy(long transportId); | |
| 67 | |
| 68 // Returns capabilities of the transport. | |
| 69 // |transportId| : The transport ID. | |
| 70 [nocompile] static RtpCaps getCaps(long transportId); | |
| 71 | |
| 72 // Starts to use the transport by providing remote params info. | |
| 73 // |transportId| : The transport ID. | |
| 74 // |params| : Parameters set for this transport. | |
| 75 [nocompile] static void start(long transportId, RtpParams params); | |
| 76 | |
| 77 // Stops using the transport. | |
| 78 // |transportId| : The transport ID. | |
| 79 [nocompile] static void stop(long transportId); | |
| 80 }; | |
| 81 | |
| 82 interface Events { | |
| 83 // Event fired when a cast send transport has started. | |
| 84 // |transportId| : The ID of the transport. | |
| 85 static void onStarted(long transportId); | |
| 86 | |
| 87 // Event fired when a cast send transport has connected. | |
| 88 // After this event, the transport is ready to send the track. | |
| 89 // |transportId| : The ID of the transport. | |
| 90 static void onConnected(long transportId); | |
| 91 | |
| 92 // Event fired when a cast send transport has stopped. | |
| 93 // |transportId| : The ID of the transport. | |
| 94 static void onStopped(long transportId); | |
| 95 | |
| 96 // Event fired when a cast send transport has timeout. | |
| 97 // This happens when network has been congested for a while, or one side | |
| 98 // left. | |
| 99 // |transportId| : The ID of the transport. | |
| 100 static void onTimeout(long transportId); | |
| 101 | |
| 102 // Event fired when a cast send transport has error. | |
| 103 // |transportId| : The ID of the transport. | |
| 104 // |errorString| : The error info. | |
| 105 static void onError(long transportId, DOMString errorString); | |
| 106 }; | |
| 107 }; | |
| OLD | NEW |