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/core/html/track/VideoTrackList.cpp

Issue 2050043002: Generate and assign media track ids in demuxers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-streamparser-trackid
Patch Set: rebase to ToT Created 4 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "core/html/track/VideoTrackList.h" 5 #include "core/html/track/VideoTrackList.h"
6 6
7 #include "core/html/HTMLMediaElement.h" 7 #include "core/html/HTMLMediaElement.h"
8 #include "core/html/track/VideoTrack.h" 8 #include "core/html/track/VideoTrack.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 28 matching lines...) Expand all
39 39
40 return -1; 40 return -1;
41 } 41 }
42 42
43 void VideoTrackList::trackSelected(WebMediaPlayer::TrackId selectedTrackId) 43 void VideoTrackList::trackSelected(WebMediaPlayer::TrackId selectedTrackId)
44 { 44 {
45 // Clear the selected flag on the previously selected track, if any. 45 // Clear the selected flag on the previously selected track, if any.
46 for (unsigned i = 0; i < length(); ++i) { 46 for (unsigned i = 0; i < length(); ++i) {
47 VideoTrack* track = anonymousIndexedGetter(i); 47 VideoTrack* track = anonymousIndexedGetter(i);
48 48
49 if (track->trackId() != selectedTrackId) 49 if (track->id() != selectedTrackId)
50 track->clearSelected(); 50 track->clearSelected();
51 else 51 else
52 DCHECK(track->selected()); 52 DCHECK(track->selected());
53 } 53 }
54 54
55 scheduleChangeEvent(); 55 scheduleChangeEvent();
56 } 56 }
57 57
58 } // namespace blink 58 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698