Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/common/extensions/api/cast_streaming_rtp_stream.idl

Issue 170063006: Cast: Add JS API to get raw events logs from cast extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed alpha's comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.cast.streaming.rtpStream</code> API allows configuration 5 // The <code>chrome.cast.streaming.rtpStream</code> API allows configuration
6 // of encoding parameters and RTP parameters used in a Cast streaming 6 // of encoding parameters and RTP parameters used in a Cast streaming
7 // session. 7 // session.
8 namespace cast.streaming.rtpStream { 8 namespace cast.streaming.rtpStream {
9 // Params for audio and video codec. 9 // Params for audio and video codec.
10 dictionary CodecSpecificParams { 10 dictionary CodecSpecificParams {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // RTP payload params. 53 // RTP payload params.
54 RtpPayloadParams payload; 54 RtpPayloadParams payload;
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 ID for the RTP stream. 60 // |id| : The ID for the RTP stream.
61 callback CreateCallback = void (long streamId); 61 callback CreateCallback = void (long streamId);
62 62
63 // Callback from the <code>getRawEvents</code> method.
64 // |rawEvents|: events encoded in protocol buffer format along with other
65 // data serialized as a string.
66 // The serialization format can be found at
67 // media/cast/logging/log_serializer.cc.
68 callback GetRawEventsCallback = void (DOMString rawEvents);
69
70 // Callback from the <code>getStats</code> method.
71 // |rawEvents|: stats encoded in protocol buffer format along with other
72 // data serialized as a string.
73 // The serialization format can be found at
74 // media/cast/logging/log_serializer.cc.
75 callback GetStatsCallback = void (DOMString stats);
76
63 interface Functions { 77 interface Functions {
64 // Destroys a Cast RTP stream. 78 // Destroys a Cast RTP stream.
65 // |streamId| : The RTP stream ID. 79 // |streamId| : The RTP stream ID.
66 [nocompile] static void destroy(long streamId); 80 [nocompile] static void destroy(long streamId);
67 81
68 // Returns an array of supported parameters with default values. 82 // Returns an array of supported parameters with default values.
69 // This includes a list of supported codecs on this platform and 83 // This includes a list of supported codecs on this platform and
70 // corresponding encoding and RTP parameters. 84 // corresponding encoding and RTP parameters.
71 // |streamId| : The RTP stream ID. 85 // |streamId| : The RTP stream ID.
72 [nocompile] static RtpParams[] getSupportedParams(long streamId); 86 [nocompile] static RtpParams[] getSupportedParams(long streamId);
73 87
74 // Activates the RTP stream by providing the parameters. 88 // Activates the RTP stream by providing the parameters.
75 // |streamId| : The RTP stream ID. 89 // |streamId| : The RTP stream ID.
76 // |params| : Parameters set for this stream. 90 // |params| : Parameters set for this stream.
77 [nocompile] static void start(long streamId, RtpParams params); 91 [nocompile] static void start(long streamId, RtpParams params);
78 92
79 // Stops activity on the specified stream. 93 // Stops activity on the specified stream.
80 // |streamId| : The RTP stream ID. 94 // |streamId| : The RTP stream ID.
81 [nocompile] static void stop(long streamId); 95 [nocompile] static void stop(long streamId);
96
97 // Enables / disables logging for a stream.
98 // |enable|: If true, enables logging. Otherwise disables logging.
99 [nocompile] static void toggleLogging(long streamId, boolean enable);
100
101 // Get raw events for a stream in the current session.
102 // |startLogging()| must have been called before.
103 // |streamId|: Stream to get events for.
104 // |callback|: Called with the raw events Blob.
105 [nocompile] static void getRawEvents(
106 long streamId, GetRawEventsCallback callback);
107
108 // Get stats for a stream in the current session.
109 // |startLogging()| must have been called before.
110 // |streamId|: Stream to get stats for.
111 // |callback|: Called with the stats Blob.
112 [nocompile] static void getStats(
113 long streamId, GetStatsCallback callback);
82 }; 114 };
83 115
84 interface Events { 116 interface Events {
85 // Event fired when a Cast RTP stream has started. 117 // Event fired when a Cast RTP stream has started.
86 // |streamId| : The ID of the RTP stream. 118 // |streamId| : The ID of the RTP stream.
87 static void onStarted(long streamId); 119 static void onStarted(long streamId);
88 120
89 // Event fired when a Cast RTP stream has stopped. 121 // Event fired when a Cast RTP stream has stopped.
90 // |streamId| : The ID of the RTP stream. 122 // |streamId| : The ID of the RTP stream.
91 static void onStopped(long streamId); 123 static void onStopped(long streamId);
92 124
93 // Event fired when a Cast RTP stream has error. 125 // Event fired when a Cast RTP stream has error.
94 // |streamId| : The ID of the RTP stream. 126 // |streamId| : The ID of the RTP stream.
95 // |errorString| : The error info. 127 // |errorString| : The error info.
96 static void onError(long streamId, DOMString errorString); 128 static void onError(long streamId, DOMString errorString);
97 }; 129 };
98 }; 130 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698