On Tue, Jul 24, 2012 at 4:23 AM, Ethan Hugg <[email protected]> wrote:

> 1.  We can't currently get the track ID and type directly from a
> MediaStream of nsDOMMediaStream.  We are right now using some content
> hints put into nsDOMMediaStream to let us know whether there is
> probably audio and/or video (alder branch), but we don't get track IDs
> and it all breaks when we want to support creating SDP for multiple
> audio or video sources.  I understand that the type is not known in
> every case, but it would be great to be able to get more accuracy
> about the SDP we should be generating.
>

Can we make SDP generation asynchronous? I.e., the JS API that triggers SDP
generation returns before SDP is actually generated? Then we could delay
SDP generation until some tracks have appeared in the input stream.

2. We are currently registering as a MediaStreamListener to get
> information about tracks that are added after pc->AddStream is called.
>   We are set up to look at every NotifyQueuedTrackChanges() to see if
> it is a track we haven't already seen and what its type is.   I think
> this might be a problem since NotifyQueuedTrackChanges gets called
> very often for each new chuck of data.  I think what we need instead
> is some way to be notified only when a track is added or removed, such
> as a new method on listener.  That would give us notification on track
> removal as well.
>

I don't think this is likely to be a problem. If your listener method
returns immediately when aTrackEvents is zero, then the cost of dispatching
those notifications when no track is added or removed is just the cost of a
single virtual function call, which should be negligible.

BTW MediaStreams is outside Chris' purview --- for now anyway :-).

Rob
-- 
“You have heard that it was said, ‘Love your neighbor and hate your enemy.’
But I tell you, love your enemies and pray for those who persecute you,
that you may be children of your Father in heaven. ... If you love those
who love you, what reward will you get? Are not even the tax collectors
doing that? And if you greet only your own people, what are you doing more
than others?" [Matthew 5:43-47]
_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media

Reply via email to