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

Unified Diff: third_party/WebKit/Source/modules/mediasource/SourceBuffer.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: Added SourceBufferTrackBaseSupplement::fromIfExists Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
index 10285d6b18b449c24bf1ce5354e782528f68398b..d52465f58176c2d5691bc666e1b0357e6a221faf 100644
--- a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
+++ b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
@@ -48,6 +48,7 @@
#include "core/html/track/VideoTrackList.h"
#include "core/streams/Stream.h"
#include "modules/mediasource/MediaSource.h"
+#include "modules/mediasource/SourceBufferTrackBaseSupplement.h"
#include "platform/Logging.h"
#include "platform/TraceEvent.h"
#include "public/platform/WebSourceBuffer.h"
@@ -532,6 +533,7 @@ std::vector<WebMediaPlayer::TrackId> SourceBuffer::initializationSegmentReceived
AudioTrack* audioTrack = nullptr;
if (!m_firstInitializationSegmentReceived) {
audioTrack = AudioTrack::create(id, kind, label, language, false);
+ SourceBufferTrackBaseSupplement::setSourceBuffer(*audioTrack, this);
audioTracks().add(audioTrack);
m_source->mediaElement()->audioTracks().add(audioTrack);
} else {
@@ -544,6 +546,7 @@ std::vector<WebMediaPlayer::TrackId> SourceBuffer::initializationSegmentReceived
VideoTrack* videoTrack = nullptr;
if (!m_firstInitializationSegmentReceived) {
videoTrack = VideoTrack::create(id, kind, label, language, false);
+ SourceBufferTrackBaseSupplement::setSourceBuffer(*videoTrack, this);
videoTracks().add(videoTrack);
m_source->mediaElement()->videoTracks().add(videoTrack);
} else {

Powered by Google App Engine
This is Rietveld 408576698