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

Unified Diff: chrome/common/extensions/api/cast_streaming_receiver_session.idl

Issue 938903003: Cast: Javascript bindings for cast receiver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cast_receiver_session
Patch Set: merged Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/cast_streaming_receiver_session.idl
diff --git a/chrome/common/extensions/api/cast_streaming_receiver_session.idl b/chrome/common/extensions/api/cast_streaming_receiver_session.idl
new file mode 100644
index 0000000000000000000000000000000000000000..005c0323236c3813bff81cddb428b120a9bf728b
--- /dev/null
+++ b/chrome/common/extensions/api/cast_streaming_receiver_session.idl
@@ -0,0 +1,80 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The <code>chrome.cast.streaming.receiverSession</code> API creates a Cast
+// receiver session and returns a WebMediaStream.
Alpha Left Google 2015/02/25 20:37:27 The term WebMediaStraem is an implementation detai
hubbe 2015/02/28 00:17:11 Rewrote the comment since it's not accurate anymor
+namespace cast.streaming.receiverSession {
+ // The UDP socket address and port.
+ dictionary IPEndPoint {
+ DOMString address;
+ long port;
+ };
+
+ // Params for audio and video codec.
+ dictionary CodecSpecificParams {
+ DOMString key;
+ DOMString value;
+ };
+
+ // RTP receiver parameters.
+ dictionary RtpReceiverParams {
+ long payloadType;
+
+ // Maximum latency in milliseconds. This parameter controls the logic
+ // of flow control. Implementation can adjust latency adaptively and
+ // tries to keep it under this threshold. A larger value allows smoother
+ // playback at the cost of higher latency.
+ long maxLatency;
+
+ DOMString codecName;
+
+ // Synchronization source identifier.
+ long ssrc;
+
+ long feedbackSsrc;
+
+ long? clockRate;
miu 2015/02/26 06:23:34 Do we want clockRate at all? For audio, IMO, it m
hubbe 2015/02/28 00:17:11 I think clockRate should always be 48000 or 90000,
+
+ // The number of channels.
+ long? channels;
miu 2015/02/26 06:23:34 ditto (same issue as clockRate)
hubbe 2015/02/28 00:17:11 Hardcoding to 2.
+
+ // 32 bytes hex-encoded AES key.
+ DOMString? aesKey;
+
+ // 32 bytes hex-encoded AES IV (Initialization vector) mask.
+ DOMString? aesIvMask;
+
+ // A list of codec specific params.
+ CodecSpecificParams[] codecSpecificParams;
Alpha Left Google 2015/02/25 20:37:27 Since this is in the receiver there is no codec pa
hubbe 2015/02/28 00:17:11 Removed.
+ };
+
+ interface Functions {
+ // Creates a Cast receiver session using the provided audio and video track as
+ // source. The tracks must be of type MediaStreamTrack. This will
+ // create two RTP streams and a UDP transport that builds the session.
+ // Either |audioTrack| or |videoTrack| can be null but not both. This
+ // means creating a session with only audio or video. If a given
+ // track is null then the created stream ID will be null.
+ //
+ // |audioParams| : the video stream parameters
+ // |videoParams| : the video stream parameters
+ // |localEndpoint| : Set this to bind() to a local UDP port.
Alpha Left Google 2015/02/25 20:37:27 I'm not sure how these two parameters are used. I
hubbe 2015/02/28 00:17:11 It can bind to a random port, but there is current
Alpha Left Google 2015/03/03 21:53:45 If this mode is not compatible with sender and we
hubbe 2015/03/03 22:36:16 Done.
+ // |remoteEndpoint| : Set this to connect() to a remote UDP port.
+ // |height| : Video height
Alpha Left Google 2015/02/25 20:37:27 Shouldn't these come from the video frames?
hubbe 2015/02/28 00:17:11 I need it construct the media stream.
+ // |width| : Video width
+ // |maxFrameRate| : Max video frame rate.
Alpha Left Google 2015/02/25 20:37:27 This seems unnecessary. Since this is the max valu
hubbe 2015/02/28 00:17:11 60 might be ok, I use it construct the media strea
+ // |mediaStreamURL| : URL of MediaStream to add the audio & video to.
+ // |options| : Optional settings.
Alpha Left Google 2015/02/25 20:37:27 What are these options? Can you put them in RtpRec
hubbe 2015/02/28 00:17:11 They are transport options, renamed.
+ [nocompile] static void create(
Alpha Left Google 2015/02/25 20:37:27 Should there be a callback when create is done? So
hubbe 2015/02/28 00:17:11 A callback is not needed if everything is successf
+ RtpReceiverParams audioParams,
+ RtpReceiverParams videoParams,
+ IPEndPoint localEndpoint,
+ IPEndPoint remoteEndpoint,
+ long height,
+ long width,
+ double maxFrameRate,
+ DOMString mediaStreamURL,
+ optional object options);
+ };
Alpha Left Google 2015/03/03 21:53:45 Is a destroy method needed? Or the receiver will b
hubbe 2015/03/03 22:36:16 Yes, the receiver goes away with the mediastream.
+};

Powered by Google App Engine
This is Rietveld 408576698