The said folder WebKit/Source/modules/mediastream [1] contains
(at least) two disjoint things: MediaStreams related files and
PeerConnection stuff. The latter is prefixed RTC* and doesn't
use the former group except in a handful of anecdotal cases
(and these cases should use the public/ version of MSTrack and
MediaStream).
The origin of this mix is historical: MediaStreams were
introduced for PeerConnection usage, so they were bundled
together. Currently there are many more sources and sinks of
MediaStream (see diagram in [2]), so it's a good idea to
split this super folder to improve cohesion and reduce
coupling.
So: Consider splitting this folder :)
(forgot to mention this should be pretty simple)
[1] https://cs.chromium.org/search/?sq=package:chromium&type=cs&q=third_party/WebKit/Source/modules/mediastream
[2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/WYTiG9h8Xbs/9NswWQQ9BQAJ
I had the same idea when thinking about srcObject, where one option was to move MediaStream into core/ and leaving the PeerConnection bits in modules/. Another solution was used, but it would still make sense to split.
Comment 1 by mcasas@chromium.org
, Jun 20 2016