[webkit-dev] Making MockMediaPlayerMediaSource and other MediaPlayerPrivateInterface subclasses work together

Enrique Ocaña González eocanha at igalia.com
Mon Nov 28 09:55:03 PST 2016

El lunes, 28 de noviembre de 2016 9:21:04 (CET) Jer Noble escribió:

> It’s a bit of a hack, the way this works in macOS.  When a LayoutTest asks
> to install the mock MSE player in Internals::initializeMockMediaSource(),
> we uninstall all the AVFoundation-based MediaPlayerPrivates, including
> MediaPlayerPrivateAVFoundationObjC, MediaPlayerPrivateMediaSourceAVFObjC,
> and MediaPlayerPrivateMediaStreamAVFObjC.  This leaves the
> MockMediaPlayerMediaSource player as the only remaining installed player.

The explanation is really appreciated. Now everything makes sense to me. :-)

> I’m very open to ideas about how to clean this area up, since, as you noted,
> we don’t even get a MIME type until long after the MediaPlayerPrivate is
> created.  But for now, you can add some calls to disable the standard GTK
> MediaPlayerPrivates in Internals::initializeMockMediaSource(), which should
> allow you to run tests correctly.

The mock player private is the outsider here. I think the hack, targeted to a 
very restricted environment as it is, makes sense and is a good way to avoid 
cluttering a design which works well for the real world.

Thanks a lot.

Enrique Ocaña González

More information about the webkit-dev mailing list