[Webkit-unassigned] [Bug 68460] Add WebCore platform interfaces needed by updated MediaStream and PeerConnection design

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 29 07:21:57 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=68460





--- Comment #23 from Adam Bergkvist <adam.bergkvist at ericsson.com>  2011-09-29 07:21:56 PST ---
(In reply to comment #22)
> Are you planning to revise your patch along the lines described in Comment #16? In particular, it seems important to understand the interface between the DOM-layer code and the Platform-layer code.

To do that, I think it's important to define the border between the DOM-layer code and the Platform-layer code. The PeerConnection spec has a natural separation between the concerns of the API and the needs of the platform in the form of an "ICE Agent" (which hides ICE processing, RTP and other low-level stuff from PeerConnection). Could you please give your view on this? We think that this separation makes sense.

The function names in PeerHandler, which are of course up for discussion, are derived from the spec text. Please have a look below at the current PeerHandler API, annotated with relevant sentences from the PeerConnection spec. We're confident that this API can be implemented with a high-level library like the one that Tommy is using.

// ========== Calls from the DOM-layer to the Platform-layer ==========

// "If connection's ICE started flag is still false, start the PeerConnection ICE Agent and send the initial offer."
// "The initial offer must include a media description for [...] all the streams in localStreams"
void produceInitialOffer(const MediaStreamDescriptorVector& pendingAddStreams);

// "Start the PeerConnection ICE Agent and pass it sdp as the initial offer from the other peer;"
// "the ICE Agent will then (asynchronously) construct the initial answer and transmit it as described above."
void handleInitialOffer(const String& sdp);

// "If connection's ICE started flag is true, then pass sdp to the PeerConnection ICE Agent as a subsequent offer
// or answer, to be interpreted as appropriate given the current state of the ICE Agent"
void processSDP(const String& sdp);

// "Have the PeerConnection's PeerConnection ICE Agent add [or remove] a media stream for stream the next time the user
// agent provides a stable state. Any other pending stream additions and removals must be processed at the same time."
void processPendingStreams(const MediaStreamDescriptorVector& pendingAddStreams, const MediaStreamDescriptorVector& pendingRemoveStreams);

// "Let data be message encoded as UTF-8."
// "Transmit a data packet to a peer using the PeerConnection's PeerConnection data UDP media stream with data as the message."
void sendDataStreamMessage(const char* data, unsigned length);

// "Destroy the PeerConnection ICE Agent, abruptly ending any active ICE processing and any active streaming,
// and releasing any relevant resources (e.g. TURN permissions)."
void stop();

// ========== Calls from the Platform-layer to the DOM-layer ==========

// "When a PeerConnection ICE Agent completes ICE processing (even if there are no active streams), the user
// agent must queue a task that sets the PeerConnection object's [...]"
void iceProcessingCompleted();

// "When a PeerConnection ICE Agent is required to send SDP offers or answers, the user agent must follow these steps:"
// "Let sdp be the SDP offer or answer to be sent."
void sdpGenerated(const String& sdp);

// "When a packet that is part of a data UDP media stream is received, the user agent must run the following steps:"
void dataStreamMessageReceived(const char* data, unsigned length);

// "When a user agent starts receiving media for a component and a candidate was provided for that component
// by a PeerConnection ICE Agent, the user agent must follow these steps:"
void remoteStreamAdded(PassRefPtr<MediaStreamDescriptor>);

// "When a PeerConnection ICE Agent finds that a stream from the remote peer has been removed (its port has been
// set to zero in a media description sent on the signaling channel), the user agent must follow these steps:"
void remoteStreamRemoved(MediaStreamDescriptor*);

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list