[Webkit-unassigned] [Bug 123301] Adding platform implementation of MediaStreamTrack

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 25 08:51:44 PDT 2013


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





--- Comment #4 from Eric Carlson <eric.carlson at apple.com>  2013-10-25 08:50:29 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > 
> > > Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp:109
> > >          m_audioStreamSources.append(audioSources[i]);
> > > +        m_audioTrackDescriptors.append(MediaStreamTrackPrivate::create(audioSources[i]));
> > 
> > Is m_audioStreamSources necessary, can't we use trackPrivate->source()?
> > 
> I think it is better to keep them, since we have methods to remote and add sources. It is better to iterate through them then in each track and use the source() method (remember that can be shared sources between tracks)
> 
  Ah, I forgot about MediaStream::removeRemoteSource!

> > m_audioTrackDescriptors isn't a great name not that the class name has changed.
> 
> oops, again remains of my old patch :(
> m_audioPrivateTracks?
> 
  Sure.

> > 
> > > Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:174
> > > +    if (source())
> > > +        source()->setEnabled(enabled);
> > 
> > This is not correct, we don't necessarily want to disable a shared source. We don't have enough infrastructure in place yet to fix this correctly, so why don't you just remove it an add a FIXME and we can follow up with a fix in another patch.
> 
> I shall pay more attention, this is again remains of my old patch, when trunk did not have my patch that lets a source to be shared.
> I think this should only set the enabled property of the track. Nothing should be done to the source. Didn't get what you mean that we can additionally do here.
>
  We need to inform the source that the track isn't using it so it can stop doing work. For example, we want a local source to stop using the camera or microphone as soon as there are no active tracks. 

  Now that I think about it, I think calling "source()->setEnabled(enabled)" here is the right thing to do. We just need to make sure MediaStreamSource:: setEnabled does something like MediaStreamSource:: stop does, and call a virtual source method when there are no active tracks. I will take care of this in the patch for bug 123316 I will post later today.

-- 
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