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

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

Issue 184853003: Cast: Add GetStats() extensions API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing include 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 63 // Callback from the <code>getRawEvents</code> method.
64 // |rawEvents|: serialized raw bytes containing raw events recorded for 64 // |rawEvents|: serialized raw bytes containing raw events recorded for
65 // a stream. 65 // a stream.
not at google - send to devlin 2014/03/05 20:27:10 this comment needs updating
imcheng 2014/03/05 20:36:00 I changed the return type back to DOMString. But I
66 // The serialization format can be found at 66 // The serialization format can be found at
67 // media/cast/logging/log_serializer.cc. 67 // media/cast/logging/log_serializer.cc.
68 callback GetRawEventsCallback = void (DOMString rawEvents); 68 callback GetRawEventsCallback = void (object rawEvents);
69 69
70 // Callback from the <code>getStats</code> method. 70 // Callback from the <code>getStats</code> method.
71 // |rawEvents|: serialized raw bytes containing stats recorded for a stream. 71 // |rawEvents|: dictionary object containing stats recorded for a stream.
72 // The serialization format can be found at 72 // The format can be found at
73 // media/cast/logging/log_serializer.cc. 73 // media/cast/logging/stats_converter.cc.
74 callback GetStatsCallback = void (DOMString stats); 74 callback GetStatsCallback = void (object stats);
75 75
76 interface Functions { 76 interface Functions {
77 // Destroys a Cast RTP stream. 77 // Destroys a Cast RTP stream.
78 // |streamId| : The RTP stream ID. 78 // |streamId| : The RTP stream ID.
79 [nocompile] static void destroy(long streamId); 79 [nocompile] static void destroy(long streamId);
80 80
81 // Returns an array of supported parameters with default values. 81 // Returns an array of supported parameters with default values.
82 // This includes a list of supported codecs on this platform and 82 // This includes a list of supported codecs on this platform and
83 // corresponding encoding and RTP parameters. 83 // corresponding encoding and RTP parameters.
84 // |streamId| : The RTP stream ID. 84 // |streamId| : The RTP stream ID.
85 [nocompile] static RtpParams[] getSupportedParams(long streamId); 85 [nocompile] static RtpParams[] getSupportedParams(long streamId);
86 86
87 // Activates the RTP stream by providing the parameters. 87 // Activates the RTP stream by providing the parameters.
88 // |streamId| : The RTP stream ID. 88 // |streamId| : The RTP stream ID.
89 // |params| : Parameters set for this stream. 89 // |params| : Parameters set for this stream.
90 [nocompile] static void start(long streamId, RtpParams params); 90 [nocompile] static void start(long streamId, RtpParams params);
91 91
92 // Stops activity on the specified stream. 92 // Stops activity on the specified stream.
93 // |streamId| : The RTP stream ID. 93 // |streamId| : The RTP stream ID.
94 [nocompile] static void stop(long streamId); 94 [nocompile] static void stop(long streamId);
95 95
96 // Enables / disables logging for a stream. 96 // Enables / disables logging for a stream.
97 // |enable|: If true, enables logging. Otherwise disables logging. 97 // |enable|: If true, enables logging. Otherwise disables logging.
98 [nocompile] static void toggleLogging(long streamId, boolean enable); 98 [nocompile] static void toggleLogging(long streamId, boolean enable);
99 99
100 // Get raw events for a stream in the current session. 100 // Get raw events for a stream in the current session.
101 // |streamId|: Stream to get events for. 101 // |streamId|: Stream to get events for.
102 // |callback|: Called with the raw events Blob. 102 // |callback|: Called with the raw events.
103 [nocompile] static void getRawEvents( 103 [nocompile] static void getRawEvents(
104 long streamId, GetRawEventsCallback callback); 104 long streamId, GetRawEventsCallback callback);
105 105
106 // Get stats for a stream in the current session. 106 // Get stats for a stream in the current session.
107 // |streamId|: Stream to get stats for. 107 // |streamId|: Stream to get stats for.
108 // |callback|: Called with the stats Blob. 108 // |callback|: Called with the stats.
109 [nocompile] static void getStats( 109 [nocompile] static void getStats(
110 long streamId, GetStatsCallback callback); 110 long streamId, GetStatsCallback callback);
111 }; 111 };
112 112
113 interface Events { 113 interface Events {
114 // Event fired when a Cast RTP stream has started. 114 // Event fired when a Cast RTP stream has started.
115 // |streamId| : The ID of the RTP stream. 115 // |streamId| : The ID of the RTP stream.
116 static void onStarted(long streamId); 116 static void onStarted(long streamId);
117 117
118 // Event fired when a Cast RTP stream has stopped. 118 // Event fired when a Cast RTP stream has stopped.
119 // |streamId| : The ID of the RTP stream. 119 // |streamId| : The ID of the RTP stream.
120 static void onStopped(long streamId); 120 static void onStopped(long streamId);
121 121
122 // Event fired when a Cast RTP stream has error. 122 // Event fired when a Cast RTP stream has error.
123 // |streamId| : The ID of the RTP stream. 123 // |streamId| : The ID of the RTP stream.
124 // |errorString| : The error info. 124 // |errorString| : The error info.
125 static void onError(long streamId, DOMString errorString); 125 static void onError(long streamId, DOMString errorString);
126 }; 126 };
127 }; 127 };
OLDNEW
« no previous file with comments | « chrome/browser/extensions/cast_streaming_apitest.cc ('k') | chrome/renderer/extensions/cast_streaming_native_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698