OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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.displaySource</code> API creates a Display | 5 // The <code>chrome.displaySource</code> API creates a Display |
6 // session using WebMediaStreamTrack as sources. | 6 // session using WebMediaStreamTrack as sources. |
7 namespace displaySource { | 7 namespace displaySource { |
8 enum ErrorType { | 8 enum ErrorType { |
9 // Cannot create media pipeline from the given media stream which could be | |
10 // appropriate for a Display session (e.g., necessary codecs are missing | |
11 // on the platform). | |
12 create_media_pipeline_error, | |
13 | |
14 // A new Display session cannot be started before the existing one is | 9 // A new Display session cannot be started before the existing one is |
15 // terminated. | 10 // terminated. |
16 exceeded_session_limit_error, | 11 session_limit_error, |
17 | 12 |
18 // Could not establish connection to the sink. | 13 // The connection with sink cannot be established or has dropped |
19 establish_connection_error, | 14 // unexpectedly. |
| 15 connection_error, |
20 | 16 |
21 // The capabilities of this Display Source and the connected | 17 // The capabilities of this Display Source and the connected |
22 // sink do not fit (e.g. the sink cannot play the media content of | 18 // sink do not fit (e.g. the sink cannot play the media content of |
23 // the formats given by the source). | 19 // the formats given by the source). |
24 capabilities_negotiation_error, | 20 capabilities_negotiation_error, |
25 | 21 |
26 // There was an error while packetizing and sending the media content. | 22 // There was an error in media pipeline: while encoding, packetizing or |
27 media_send_error, | 23 // sending the media content. |
28 | 24 media_pipeline_error, |
29 // The TCP connection with sink has dropped unexpectedly. | |
30 connection_error, | |
31 | |
32 // An unexpected message has arrived from the sink. | |
33 unexpected_message_error, | |
34 | 25 |
35 // The sink became unresponsive. | 26 // The sink became unresponsive. |
36 timeout_error, | 27 timeout_error, |
37 | 28 |
38 // Unspecified error. | 29 // Unspecified error. |
39 unknown_error | 30 unknown_error |
40 }; | 31 }; |
41 | 32 |
42 dictionary ErrorInfo { | 33 dictionary ErrorInfo { |
43 ErrorType type; | 34 ErrorType type; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Event fired when the Display session is terminated. | 138 // Event fired when the Display session is terminated. |
148 // |sinkId| Id of the peer sink | 139 // |sinkId| Id of the peer sink |
149 [nocompile] static void onSessionTerminated(long sinkId); | 140 [nocompile] static void onSessionTerminated(long sinkId); |
150 // Event fired when an error occurs. | 141 // Event fired when an error occurs. |
151 // |sinkId| Id of the peer sink | 142 // |sinkId| Id of the peer sink |
152 // |errorInfo| error description | 143 // |errorInfo| error description |
153 [nocompile] static void onSessionErrorOccured(long sinkId, | 144 [nocompile] static void onSessionErrorOccured(long sinkId, |
154 ErrorInfo errorInfo); | 145 ErrorInfo errorInfo); |
155 }; | 146 }; |
156 }; | 147 }; |
OLD | NEW |