OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 #ifndef MEDIA_REMOTING_TRIGGERS_H_ | |
6 #define MEDIA_REMOTING_TRIGGERS_H_ | |
7 | |
8 namespace media { | |
9 namespace remoting { | |
10 | |
11 // Events and conditions that can trigger remoting to start. | |
12 // | |
13 // NOTE: Never re-number or re-use numbers for different triggers. These are | |
14 // used in UMA histograms, and must remain backwards-compatible for all time. | |
15 // However, *do* change START_TRIGGER_MAX to one after the greatest value when | |
16 // adding new ones. Also, don't forget to update histograms.xml! | |
17 enum StartTrigger { | |
18 UNKNOWN_START_TRIGGER = 0, | |
19 | |
20 // Local presentation changes. | |
21 ENTERED_FULLSCREEN = 1, // The media element became the fullscreen element. | |
22 BECAME_DOMINANT_CONTENT = 2, // Element now occupies most of the viewport. | |
23 ENABLED_BY_PAGE = 3, // The page re-allowed remote playback. | |
24 | |
25 // User actions, such as connecting to a receiver or pressing play. | |
26 SINK_AVAILABLE = 4, // A receiver (sink) became available. | |
27 PLAY_COMMAND = 5, // The media element was issued a play command. | |
28 | |
29 // Met requirements for playback of the media. | |
30 SUPPORTED_AUDIO_CODEC = 6, // Stream began using a supported audio codec. | |
31 SUPPORTED_VIDEO_CODEC = 7, // Stream began using a supported video codec. | |
32 CDM_READY = 8, // The CDM required for decrypting the content became ready. | |
33 | |
34 // Change this to the highest value. | |
35 START_TRIGGER_MAX = 8, | |
36 }; | |
37 | |
38 // Events and conditions that can result in a start failure, or trigger remoting | |
39 // to stop. | |
40 // | |
41 // NOTE: Never re-number or re-use numbers for different triggers. These are | |
42 // used in UMA histograms, and must remain backwards-compatible for all time. | |
43 // However, *do* change STOP_TRIGGER_MAX to one after the greatest value when | |
44 // adding new ones. Also, don't forget to update histograms.xml! | |
45 enum StopTrigger { | |
46 UNKNOWN_STOP_TRIGGER = 0, | |
47 | |
48 // Normal shutdown triggers. | |
49 ROUTE_TERMINATED = 1, // The route to the sink was terminated (user action?). | |
xjz
2017/01/17 05:36:25
remove ?
miu
2017/01/17 21:09:18
I left it in there because commonly it's the user
| |
50 MEDIA_ELEMENT_DESTROYED = 2, // The media element on the page was destroyed. | |
51 EXITED_FULLSCREEN = 3, // The media element is no longer fullscreened. | |
52 BECAME_AUXILIARY_CONTENT = 4, // Element no longer occupies the viewport. | |
53 DISABLED_BY_PAGE = 5, // The web page blocked remoting during a session. | |
54 | |
55 // Content playback related errors forcing shutdown (or failing start). | |
56 START_RACE = 6, // Multiple remoting sessions attempted to start. | |
57 UNSUPPORTED_AUDIO_CODEC = 7, // Stream began using an unsupported codec. | |
xjz
2017/01/17 05:36:25
nit: s/codec/audio codec
miu
2017/01/17 21:09:18
Done (80 chars is hard).
| |
58 UNSUPPORTED_VIDEO_CODEC = 8, // Stream began using an unsupported codec. | |
xjz
2017/01/17 05:36:25
nit: s/code/video codec
miu
2017/01/17 21:09:20
Done.
| |
59 DECRYPTION_ERROR = 9, // Could not decrypt content or CDM was destroyed. | |
60 RECEIVER_INITIALIZE_FAILED = 10, // The receiver reported a failed init. | |
61 RECEIVER_PIPELINE_ERROR = 11, // The media pipeline on the receiver error'ed. | |
62 | |
63 // Environmental errors forcing shutdown. | |
64 FRAME_DROP_RATE_HIGH = 12, // The receiver was dropping too many frames. | |
65 PACING_TOO_SLOWLY = 13, // Play-out was too slow, indicating bottlenecks. | |
66 | |
67 // Communications errors forcing shutdown. | |
68 PEERS_OUT_OF_SYNC = 14, // The local state disagrees with the remote. | |
69 RPC_INVALID = 15, // An RPC field value is missing or has bad data. | |
70 DATA_PIPE_CREATE_ERROR = 16, // Mojo data pipe creation failed (OOM?). | |
xjz
2017/01/17 05:36:25
ooc: Is OOM the only reason for this error?
miu
2017/01/17 21:09:18
No. It could be due to any weird OS issue (or impl
| |
71 MOJO_PIPE_ERROR = 17, // Mojo message/data pipe operation failed. | |
72 | |
73 // Change this to the highest value. | |
74 STOP_TRIGGER_MAX = 17, | |
75 }; | |
76 | |
77 } // namespace remoting | |
78 } // namespace media | |
79 | |
80 #endif // MEDIA_REMOTING_TRIGGERS_H_ | |
OLD | NEW |