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

Side by Side Diff: media/blink/websourcebuffer_impl.cc

Issue 1716503002: Basic media tracks implementation for media stream parsers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added DISALLOW_COPY_AND_ASSIGN in MediaTracks Created 4 years, 10 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/websourcebuffer_impl.h" 5 #include "media/blink/websourcebuffer_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/callback_helpers.h" 14 #include "base/callback_helpers.h"
15 #include "media/base/media_tracks.h"
15 #include "media/base/timestamp_constants.h" 16 #include "media/base/timestamp_constants.h"
16 #include "media/filters/chunk_demuxer.h" 17 #include "media/filters/chunk_demuxer.h"
17 #include "third_party/WebKit/public/platform/WebSourceBufferClient.h" 18 #include "third_party/WebKit/public/platform/WebSourceBufferClient.h"
18 19
19 namespace media { 20 namespace media {
20 21
21 static base::TimeDelta DoubleToTimeDelta(double time) { 22 static base::TimeDelta DoubleToTimeDelta(double time) {
22 DCHECK(!std::isnan(time)); 23 DCHECK(!std::isnan(time));
23 DCHECK_NE(time, -std::numeric_limits<double>::infinity()); 24 DCHECK_NE(time, -std::numeric_limits<double>::infinity());
24 25
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 DCHECK_GE(end, 0); 152 DCHECK_GE(end, 0);
152 append_window_end_ = DoubleToTimeDelta(end); 153 append_window_end_ = DoubleToTimeDelta(end);
153 } 154 }
154 155
155 void WebSourceBufferImpl::removedFromMediaSource() { 156 void WebSourceBufferImpl::removedFromMediaSource() {
156 demuxer_->RemoveId(id_); 157 demuxer_->RemoveId(id_);
157 demuxer_ = NULL; 158 demuxer_ = NULL;
158 client_ = NULL; 159 client_ = NULL;
159 } 160 }
160 161
161 void WebSourceBufferImpl::InitSegmentReceived() { 162 void WebSourceBufferImpl::InitSegmentReceived(const MediaTracks& tracks) {
162 DVLOG(1) << __FUNCTION__; 163 DVLOG(1) << __FUNCTION__;
163 client_->initializationSegmentReceived(); 164 client_->initializationSegmentReceived();
wolenetz 2016/02/26 00:06:21 nit: if landing separately from the rest (as curre
servolk 2016/02/26 01:56:32 Done.
164 } 165 }
165 166
166 } // namespace media 167 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698