15 class AudioTrackSourceBuffer final : public SourceBufferTrackBaseSupplement {
philipj_slow
2016/03/10 13:12:17
Can this be simplified even further? It ought to b
Can this be simplified even further? It ought to be possible to have
class AudioTrackSourceBuffer {
static SourceBuffer* sourceBuffer(AudioTrack&);
};
where the implementation cast AudioTrack& to TrackBase& and calls into a shared
"static SourceBuffer* TrackBase::sourceBuffer(TrackBase&)" that's used for both
audio and video tracks.
I tried to apply the patch locally to try it out myself first, but the CL
doesn't apply any longer. Can you rebase?
servolk
2016/03/11 02:00:57
Yep. In fact we don't even need the sourceBuffer m
On 2016/03/10 13:12:17, philipj_UTC7 wrote:
> Can this be simplified even further? It ought to be possible to have
>
> class AudioTrackSourceBuffer {
> static SourceBuffer* sourceBuffer(AudioTrack&);
> };
>
> where the implementation cast AudioTrack& to TrackBase& and calls into a
shared
> "static SourceBuffer* TrackBase::sourceBuffer(TrackBase&)" that's used for
both
> audio and video tracks.
>
> I tried to apply the patch locally to try it out myself first, but the CL
> doesn't apply any longer. Can you rebase?
Yep. In fact we don't even need the sourceBuffer method here, since it's exactly
the same for A and V cases. And we can remove the constructors that do the
implicit casting from A/V tracks to TrackBase. Then we are left with just two
empty classes that are descendants of SourceBufferTrackBaseSupplement, and we
can just get rid of these two classes completely and instead just use
ImplementedAs=SourceBufferTrackBaseSupplement in the .idl files.
Issue 1658033002: Add SourceBuffer implementations of Audio/VideoTracks
(Closed)
Created 4 years, 10 months ago by servolk
Modified 4 years, 8 months ago
Reviewers: philipj_slow, wolenetz
Base URL: https://chromium.googlesource.com/chromium/src.git@pass-media-tracks-to-blink
Comments: 50