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

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

Issue 1812543003: Allow muting/unmuting audio through media track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-sb-tracks6
Patch Set: rebase 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 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>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 trackInfoVector.push_back( 182 trackInfoVector.push_back(
183 std::make_tuple(mediaTrackTypeToBlink(track->type()), 183 std::make_tuple(mediaTrackTypeToBlink(track->type()),
184 blink::WebString::fromUTF8(track->id()), 184 blink::WebString::fromUTF8(track->id()),
185 blink::WebString::fromUTF8(track->kind()), 185 blink::WebString::fromUTF8(track->kind()),
186 blink::WebString::fromUTF8(track->label()), 186 blink::WebString::fromUTF8(track->label()),
187 blink::WebString::fromUTF8(track->language()))); 187 blink::WebString::fromUTF8(track->language())));
188 } 188 }
189 189
190 std::vector<blink::WebMediaPlayer::TrackId> blinkTrackIds = 190 std::vector<blink::WebMediaPlayer::TrackId> blinkTrackIds =
191 client_->initializationSegmentReceived(trackInfoVector); 191 client_->initializationSegmentReceived(trackInfoVector);
192
193 DCHECK_EQ(blinkTrackIds.size(), tracks->tracks().size());
194 for (size_t i = 0; i < blinkTrackIds.size(); ++i) {
195 demuxer_->OnTrackIdAssigned(blinkTrackIds[i], tracks->tracks()[i].get());
196 }
192 } 197 }
193 198
194 } // namespace media 199 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698