Index: media/blink/websourcebuffer_impl.cc |
diff --git a/media/blink/websourcebuffer_impl.cc b/media/blink/websourcebuffer_impl.cc |
index ffb62c5c5397918a608726aad42fa17be555eb1e..6b08b1319634b55179767637f8fcb2d0f5df12cd 100644 |
--- a/media/blink/websourcebuffer_impl.cc |
+++ b/media/blink/websourcebuffer_impl.cc |
@@ -12,6 +12,7 @@ |
#include "base/bind.h" |
#include "base/callback.h" |
#include "base/callback_helpers.h" |
+#include "media/base/media_tracks.h" |
#include "media/base/timestamp_constants.h" |
#include "media/filters/chunk_demuxer.h" |
#include "third_party/WebKit/public/platform/WebSourceBufferClient.h" |
@@ -45,6 +46,9 @@ WebSourceBufferImpl::WebSourceBufferImpl( |
client_(NULL), |
append_window_end_(kInfiniteDuration()) { |
DCHECK(demuxer_); |
+ demuxer_->SetTracksWatcher( |
+ id, base::Bind(&WebSourceBufferImpl::InitSegmentReceived, |
+ base::Unretained(this))); |
} |
WebSourceBufferImpl::~WebSourceBufferImpl() { |
@@ -98,11 +102,8 @@ void WebSourceBufferImpl::append( |
unsigned length, |
double* timestamp_offset) { |
base::TimeDelta old_offset = timestamp_offset_; |
- demuxer_->AppendData(id_, data, length, |
- append_window_start_, append_window_end_, |
- ×tamp_offset_, |
- base::Bind(&WebSourceBufferImpl::InitSegmentReceived, |
- base::Unretained(this))); |
+ demuxer_->AppendData(id_, data, length, append_window_start_, |
+ append_window_end_, ×tamp_offset_); |
// Coded frame processing may update the timestamp offset. If the caller |
// provides a non-NULL |timestamp_offset| and frame processing changes the |
@@ -158,8 +159,10 @@ void WebSourceBufferImpl::removedFromMediaSource() { |
client_ = NULL; |
} |
-void WebSourceBufferImpl::InitSegmentReceived() { |
+void WebSourceBufferImpl::InitSegmentReceived(scoped_ptr<MediaTracks> tracks) { |
DVLOG(1) << __FUNCTION__; |
+ // TODO(servolk): Implement passing MediaTrack info to blink level. |
+ // https://crbug.com/249428 |
client_->initializationSegmentReceived(); |
} |