Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/SourceBufferTrackBaseSupplement.cpp

Issue 1658033002: Add SourceBuffer implementations of Audio/VideoTracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-media-tracks-to-blink
Patch Set: Make A/V track lists plain members in SourceBuffer Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "modules/mediasource/SourceBufferTrackBaseSupplement.h"
6
7 #include "core/html/track/TrackBase.h"
8 #include "modules/mediasource/SourceBuffer.h"
9
10 namespace blink {
11
12 const char* SourceBufferTrackBaseSupplement::SupplementName = "SourceBufferTrack BaseSupplement";
13
14 SourceBufferTrackBaseSupplement::SourceBufferTrackBaseSupplement(TrackBase& trac kBase, SourceBuffer* sourceBuffer)
15 : m_sourceBuffer(sourceBuffer)
16 {
17 provideTo(trackBase, SupplementName, this);
18 }
19
20 // static
21 SourceBuffer* SourceBufferTrackBaseSupplement::sourceBuffer(TrackBase& track)
22 {
23 SourceBufferTrackBaseSupplement* supplement = static_cast<SourceBufferTrackB aseSupplement*>(HeapSupplement<TrackBase>::from(track, SupplementName));
24 if (supplement)
25 return supplement->m_sourceBuffer;
26 return nullptr;
27 }
28
29
30 DEFINE_TRACE(SourceBufferTrackBaseSupplement)
31 {
32 visitor->trace(m_sourceBuffer);
33 HeapSupplement<TrackBase>::trace(visitor);
34 }
35
36 } // namespace blink
37
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698