Re: [rtcweb] Multiple videos in one MediaStream (Re: MediaStream Label and CNAME)

Magnus Westerlund <magnus.westerlund@ericsson.com> Wed, 14 September 2011 09:51 UTC

Return-Path: <magnus.westerlund@ericsson.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 21A8121F8B75 for <rtcweb@ietfa.amsl.com>; Wed, 14 Sep 2011 02:51:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.5
X-Spam-Level:
X-Spam-Status: No, score=-106.5 tagged_above=-999 required=5 tests=[AWL=0.099, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zc+Uu8TPhZzR for <rtcweb@ietfa.amsl.com>; Wed, 14 Sep 2011 02:51:51 -0700 (PDT)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by ietfa.amsl.com (Postfix) with ESMTP id 44CE021F8B6E for <rtcweb@ietf.org>; Wed, 14 Sep 2011 02:51:51 -0700 (PDT)
X-AuditID: c1b4fb3d-b7c47ae000000b17-98-4e7079b7061f
Received: from esessmw0191.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 7B.83.02839.7B9707E4; Wed, 14 Sep 2011 11:53:59 +0200 (CEST)
Received: from [127.0.0.1] (153.88.115.8) by esessmw0191.eemea.ericsson.se (153.88.115.85) with Microsoft SMTP Server id 8.3.137.0; Wed, 14 Sep 2011 11:53:58 +0200
Message-ID: <4E7079B5.2060803@ericsson.com>
Date: Wed, 14 Sep 2011 11:53:57 +0200
From: Magnus Westerlund <magnus.westerlund@ericsson.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2
MIME-Version: 1.0
To: Harald Alvestrand <harald@alvestrand.no>
References: <4E6F17AB.4000005@ericsson.com> <4E6F6963.9090702@alvestrand.no>
In-Reply-To: <4E6F6963.9090702@alvestrand.no>
X-Enigmail-Version: 1.3.1
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: 8bit
X-Brightmail-Tracker: AAAAAA==
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Multiple videos in one MediaStream (Re: MediaStream Label and CNAME)
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Sep 2011 09:51:52 -0000

On 2011-09-13 16:32, Harald Alvestrand wrote:
> On 09/13/11 10:43, Magnus Westerlund wrote:
>> WG,
>> (As an individual contributor)
>>
>>
>> There has been some discussion as result of the presentation of
>> terminology in the RTCWEB Interim meeting last Thursday. The biggest
>> question was why CNAME can't map to MediaStream label. Below we
>> clarify why we think CNAME and label are separate entities.
>>
>> One part in this reasoning has to do with the current definition of
>> ’media resource’
>> (<http://dev.w3.org/html5/spec/Overview.html#media-resource>) and media
>> elements of html5. The ‘media resource’ could be a file, or, more
>> relevant to this discussion, a MediaStream. In that usage only a single
>> video track can be played simultaneously and in sync with one or more
>> audio tracks.
>>
>> Thus unless we modify an existing semantics the only way of playing
>> multiple video tracks in sync with one or more audio tracks is to have
>> multiple MediaStream objects.

> Sorry, I think this can be handled with the existing API without any issue.
> Apologies to those who know JavaScript better than me, but this is a handler
> that can handle a new incoming video stream
> 
> NewStreamHandler(stream) {
>     myMultiVideoStream = stream
>     myFirstVideo = new MediaStream(myMultiVideoStream)
>     myFirstVideo.videoTracks.select(1)
>     oneVideoObject.setSource(myFirstVideo.getUrl())
>     mySecondVideo = new MediaStream(myMultiVideoStream)
>     mySecondVideo.videoTracks.select(2)
>     anotherVideoObject.setSource(mySecondVideo.getUrl())
> }
> 
> I think the API can be improved, but the improvements are unlikely to 
> lose this functionality.
> (Remember that the API objects are the control surfaces on the stream - 
> the video data will likely go straight from the incoming buffer, through 
> the codec for decoding, and blitted onto the screen; the "copying" from 
> one MediaStream to another MediaStream is purely conceptual.)
> 
> I don't think it makes sense to discuss the other points before getting 
> this one put to rest.

Harald,

If I read this correctly, what you are doing is to creating two media
streams based on a first media stream. Thus you have multiple
mediaStream objects that contains tracks that has a common
synchronziation context. So from my point of view you have very well
demonstrated why you need CNAME to be a property associated with the
tracks in the media stream and not be the label for the mediaStream.

Or how do you see the label for the media stream being handled when you
create two mediaStream objects from the incomming "stream" that has one
label?


Cheers

Magnus Westerlund

----------------------------------------------------------------------
Multimedia Technologies, Ericsson Research EAB/TVM
----------------------------------------------------------------------
Ericsson AB                | Phone  +46 10 7148287
Färögatan 6                | Mobile +46 73 0949079
SE-164 80 Stockholm, Sweden| mailto: magnus.westerlund@ericsson.com
----------------------------------------------------------------------