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

Issue 170063006: Cast: Add JS API to get raw events logs from cast extension. (Closed)

Created:
6 years, 10 months ago by imcheng
Modified:
6 years, 10 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Cast: Add JS API to get raw events logs from cast extension. - 3 new APIs will be added to cast.streaming.rtpStream: startLogging, getRawEvents and getStats. -- startLogging will install a event subscriber and start listening to events for a stream. -- getRawEvents will return a string of serialized raw events logs for that stream. -- getStats will return a Blob of stats for that stream in serialized format. - Currently, only getRawEvents is implemented. This will finish the plumbing of raw event logs from cast library to extension to Js. - CastSessionDelegate keeps a map from stream id to EncodingEventSubscribers instead of just having one subscriber for audio and one for video. Subscribers for a stream are only created when startLogging() for that stream is called. - CastRtpStream keeps track of stream id so it can be passed to CastSessionDelegate. The ID will be set when it is assigned by CastStreamingNativeHandler. BUG=301920, 338574 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=253686

Patch Set 1 : #

Total comments: 4

Patch Set 2 : Addressed alpha's comments #

Total comments: 10

Patch Set 3 : Addressed Alpha's comments #

Total comments: 5

Patch Set 4 : Addressed kalman's comments #

Total comments: 9

Patch Set 5 : Addressed alpha's comments #

Total comments: 2

Patch Set 6 : #

Total comments: 4

Patch Set 7 : addressed alpha's comments #

Patch Set 8 : pass presubmit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -108 lines) Patch
M chrome/browser/extensions/cast_streaming_apitest.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/cast_streaming_rtp_stream.idl View 1 2 3 2 chunks +29 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/cast_streaming_native_handler.h View 1 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/cast_streaming_native_handler.cc View 1 2 2 chunks +74 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.h View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.cc View 1 2 3 4 2 chunks +12 lines, -1 line 0 comments Download
M chrome/renderer/media/cast_session.h View 1 2 3 4 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/renderer/media/cast_session.cc View 1 2 3 4 2 chunks +14 lines, -2 lines 0 comments Download
M chrome/renderer/media/cast_session_delegate.h View 1 2 3 4 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/renderer/media/cast_session_delegate.cc View 1 2 3 4 5 6 5 chunks +73 lines, -21 lines 0 comments Download
M chrome/renderer/resources/extensions/cast_streaming_rtp_stream_custom_bindings.js View 1 1 chunk +12 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/cast_streaming/bad_logging.html View 1 2 3 4 5 1 chunk +2 lines, -7 lines 0 comments Download
A + chrome/test/data/extensions/api_test/cast_streaming/bad_logging.js View 1 2 3 4 5 6 7 3 chunks +12 lines, -31 lines 0 comments Download
M chrome/test/data/extensions/api_test/cast_streaming/basics.html View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/cast_streaming/basics.js View 1 2 3 4 5 3 chunks +13 lines, -29 lines 0 comments Download
A chrome/test/data/extensions/api_test/cast_streaming/common.js View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
M media/cast/logging/log_serializer.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M media/cast/logging/log_serializer.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M media/cast/test/sender.cc View 1 2 2 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
imcheng
6 years, 10 months ago (2014-02-24 07:44:26 UTC) #1
Alpha Left Google
https://codereview.chromium.org/170063006/diff/160001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl File chrome/common/extensions/api/cast_streaming_rtp_stream.idl (right): https://codereview.chromium.org/170063006/diff/160001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl#newcode98 chrome/common/extensions/api/cast_streaming_rtp_stream.idl:98: [nocompile] static void startLogging(long streamId); This should be enableRawEventsLogging(long ...
6 years, 10 months ago (2014-02-24 20:18:56 UTC) #2
imcheng
https://codereview.chromium.org/170063006/diff/160001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl File chrome/common/extensions/api/cast_streaming_rtp_stream.idl (right): https://codereview.chromium.org/170063006/diff/160001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl#newcode98 chrome/common/extensions/api/cast_streaming_rtp_stream.idl:98: [nocompile] static void startLogging(long streamId); On 2014/02/24 20:18:56, Alpha ...
6 years, 10 months ago (2014-02-24 21:28:25 UTC) #3
Alpha Left Google
https://codereview.chromium.org/170063006/diff/220001/chrome/renderer/extensions/cast_streaming_native_handler.cc File chrome/renderer/extensions/cast_streaming_native_handler.cc (right): https://codereview.chromium.org/170063006/diff/220001/chrome/renderer/extensions/cast_streaming_native_handler.cc#newcode230 chrome/renderer/extensions/cast_streaming_native_handler.cc:230: stream1->SetStreamId(stream1_id); stream id is a extensions API thing. It ...
6 years, 10 months ago (2014-02-24 23:25:51 UTC) #4
imcheng
https://codereview.chromium.org/170063006/diff/220001/chrome/renderer/extensions/cast_streaming_native_handler.cc File chrome/renderer/extensions/cast_streaming_native_handler.cc (right): https://codereview.chromium.org/170063006/diff/220001/chrome/renderer/extensions/cast_streaming_native_handler.cc#newcode230 chrome/renderer/extensions/cast_streaming_native_handler.cc:230: stream1->SetStreamId(stream1_id); On 2014/02/24 23:25:51, Alpha wrote: > stream id ...
6 years, 10 months ago (2014-02-25 08:10:17 UTC) #5
imcheng
+kalman for extensions code. +scherkus for chrome/renderer/media code.
6 years, 10 months ago (2014-02-25 19:31:47 UTC) #6
not at google - send to devlin
https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl File chrome/common/extensions/api/cast_streaming_rtp_stream.idl (right): https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl#newcode64 chrome/common/extensions/api/cast_streaming_rtp_stream.idl:64: // |rawEvents|: events encoded in protocol buffer format along ...
6 years, 10 months ago (2014-02-25 19:34:36 UTC) #7
not at google - send to devlin
also: reminder that when this API goes stable you'll need to have the API re-viewed ...
6 years, 10 months ago (2014-02-25 19:35:44 UTC) #8
scherkus (not reviewing)
lgtm FYI as of http://crrev.com/253213 hclam@ should be able to do OWNERS reviews for chrome/*/media/cast_* ...
6 years, 10 months ago (2014-02-25 19:40:11 UTC) #9
imcheng
https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl File chrome/common/extensions/api/cast_streaming_rtp_stream.idl (right): https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl#newcode64 chrome/common/extensions/api/cast_streaming_rtp_stream.idl:64: // |rawEvents|: events encoded in protocol buffer format along ...
6 years, 10 months ago (2014-02-25 21:00:50 UTC) #10
not at google - send to devlin
https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl File chrome/common/extensions/api/cast_streaming_rtp_stream.idl (right): https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl#newcode64 chrome/common/extensions/api/cast_streaming_rtp_stream.idl:64: // |rawEvents|: events encoded in protocol buffer format along ...
6 years, 10 months ago (2014-02-25 21:03:45 UTC) #11
imcheng
On 2014/02/25 21:03:45, kalman wrote: > https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl > File chrome/common/extensions/api/cast_streaming_rtp_stream.idl (right): > > https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl#newcode64 > ...
6 years, 10 months ago (2014-02-25 21:17:14 UTC) #12
not at google - send to devlin
On 2014/02/25 21:17:14, imcheng1 wrote: > On 2014/02/25 21:03:45, kalman wrote: > > > https://codereview.chromium.org/170063006/diff/260001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl ...
6 years, 10 months ago (2014-02-25 21:22:07 UTC) #13
imcheng
On 2014/02/25 21:22:07, kalman wrote: > On 2014/02/25 21:17:14, imcheng1 wrote: > > On 2014/02/25 ...
6 years, 10 months ago (2014-02-25 21:37:02 UTC) #14
not at google - send to devlin
> > The reason why we are deciding to offer a API to get the ...
6 years, 10 months ago (2014-02-25 21:51:11 UTC) #15
Alpha Left Google
https://codereview.chromium.org/170063006/diff/280001/chrome/renderer/media/cast_session.h File chrome/renderer/media/cast_session.h (right): https://codereview.chromium.org/170063006/diff/280001/chrome/renderer/media/cast_session.h#newcode64 chrome/renderer/media/cast_session.h:64: void ToggleLogging(bool enable, bool is_audio); nit: The order of ...
6 years, 10 months ago (2014-02-26 00:53:51 UTC) #16
imcheng
https://codereview.chromium.org/170063006/diff/280001/chrome/renderer/media/cast_session.h File chrome/renderer/media/cast_session.h (right): https://codereview.chromium.org/170063006/diff/280001/chrome/renderer/media/cast_session.h#newcode64 chrome/renderer/media/cast_session.h:64: void ToggleLogging(bool enable, bool is_audio); On 2014/02/26 00:53:52, Alpha ...
6 years, 10 months ago (2014-02-26 01:21:07 UTC) #17
imcheng
https://codereview.chromium.org/170063006/diff/280001/chrome/renderer/media/cast_session_delegate.cc File chrome/renderer/media/cast_session_delegate.cc (right): https://codereview.chromium.org/170063006/diff/280001/chrome/renderer/media/cast_session_delegate.cc#newcode154 chrome/renderer/media/cast_session_delegate.cc:154: DCHECK(subscriber); On 2014/02/26 01:21:07, imcheng1 wrote: > On 2014/02/26 ...
6 years, 10 months ago (2014-02-26 01:26:00 UTC) #18
Alpha Left Google
If serialization fails we should just return a string. https://codereview.chromium.org/170063006/diff/300001/chrome/renderer/media/cast_session_delegate.cc File chrome/renderer/media/cast_session_delegate.cc (right): https://codereview.chromium.org/170063006/diff/300001/chrome/renderer/media/cast_session_delegate.cc#newcode158 chrome/renderer/media/cast_session_delegate.cc:158: ...
6 years, 10 months ago (2014-02-26 01:32:42 UTC) #19
Alpha Left Google
What about writing an additional API test for the case that application is doing the ...
6 years, 10 months ago (2014-02-26 01:33:42 UTC) #20
imcheng
On 2014/02/26 01:33:42, Alpha wrote: > What about writing an additional API test for the ...
6 years, 10 months ago (2014-02-26 03:00:16 UTC) #21
imcheng
https://codereview.chromium.org/170063006/diff/300001/chrome/renderer/media/cast_session_delegate.cc File chrome/renderer/media/cast_session_delegate.cc (right): https://codereview.chromium.org/170063006/diff/300001/chrome/renderer/media/cast_session_delegate.cc#newcode158 chrome/renderer/media/cast_session_delegate.cc:158: if (!subscriber) On 2014/02/26 01:32:43, Alpha wrote: > We ...
6 years, 10 months ago (2014-02-26 03:00:27 UTC) #22
Alpha Left Google
https://codereview.chromium.org/170063006/diff/360001/chrome/renderer/media/cast_session_delegate.cc File chrome/renderer/media/cast_session_delegate.cc (right): https://codereview.chromium.org/170063006/diff/360001/chrome/renderer/media/cast_session_delegate.cc#newcode160 chrome/renderer/media/cast_session_delegate.cc:160: } Call the callback and then return. https://codereview.chromium.org/170063006/diff/360001/chrome/renderer/media/cast_session_delegate.cc#newcode175 chrome/renderer/media/cast_session_delegate.cc:175: ...
6 years, 10 months ago (2014-02-26 03:06:26 UTC) #23
imcheng
https://codereview.chromium.org/170063006/diff/360001/chrome/renderer/media/cast_session_delegate.cc File chrome/renderer/media/cast_session_delegate.cc (right): https://codereview.chromium.org/170063006/diff/360001/chrome/renderer/media/cast_session_delegate.cc#newcode160 chrome/renderer/media/cast_session_delegate.cc:160: } On 2014/02/26 03:06:26, Alpha wrote: > Call the ...
6 years, 10 months ago (2014-02-26 04:41:56 UTC) #24
Alpha Left Google
LGTM.
6 years, 10 months ago (2014-02-26 07:19:26 UTC) #25
imcheng
The CQ bit was checked by imcheng@chromium.org
6 years, 10 months ago (2014-02-26 19:55:05 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/imcheng@chromium.org/170063006/380001
6 years, 10 months ago (2014-02-26 19:56:31 UTC) #27
haibinlu
lgtm
6 years, 10 months ago (2014-02-26 19:59:08 UTC) #28
imcheng
The CQ bit was checked by imcheng@chromium.org
6 years, 10 months ago (2014-02-26 20:05:18 UTC) #29
commit-bot: I haz the power
Failed to trigger a try job on chromium_presubmit HTTP Error 400: Bad Request
6 years, 10 months ago (2014-02-26 20:20:19 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/imcheng@chromium.org/170063006/400001
6 years, 10 months ago (2014-02-26 20:20:41 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-26 21:06:25 UTC) #32
commit-bot: I haz the power
Retried try job too often on ios_dbg_simulator for step(s) base_unittests, compile, components_unittests, content_unittests, crypto_unittests, net_unittests, ...
6 years, 10 months ago (2014-02-26 21:06:26 UTC) #33
imcheng
The CQ bit was checked by imcheng@chromium.org
6 years, 10 months ago (2014-02-26 22:29:53 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/imcheng@chromium.org/170063006/400001
6 years, 10 months ago (2014-02-26 22:30:20 UTC) #35
commit-bot: I haz the power
6 years, 10 months ago (2014-02-27 02:21:52 UTC) #36
Message was sent while issue was closed.
Change committed as 253686

Powered by Google App Engine
This is Rietveld 408576698