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

Side by Side Diff: third_party/WebKit/Source/core/html/track/TextTrackList.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 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 TextTrack* TextTrackList::getTrackById(const AtomicString& id) 129 TextTrack* TextTrackList::getTrackById(const AtomicString& id)
130 { 130 {
131 // 4.8.10.12.5 Text track API 131 // 4.8.10.12.5 Text track API
132 // The getTrackById(id) method must return the first TextTrack in the 132 // The getTrackById(id) method must return the first TextTrack in the
133 // TextTrackList object whose id IDL attribute would return a value equal 133 // TextTrackList object whose id IDL attribute would return a value equal
134 // to the value of the id argument. 134 // to the value of the id argument.
135 for (unsigned i = 0; i < length(); ++i) { 135 for (unsigned i = 0; i < length(); ++i) {
136 TextTrack* track = anonymousIndexedGetter(i); 136 TextTrack* track = anonymousIndexedGetter(i);
137 if (track->id() == id) 137 if (String(track->id()) == id)
138 return track; 138 return track;
139 } 139 }
140 140
141 // When no tracks match the given argument, the method must return null. 141 // When no tracks match the given argument, the method must return null.
142 return 0; 142 return 0;
143 } 143 }
144 144
145 void TextTrackList::invalidateTrackIndexesAfterTrack(TextTrack* track) 145 void TextTrackList::invalidateTrackIndexesAfterTrack(TextTrack* track)
146 { 146 {
147 HeapVector<Member<TextTrack>>* tracks = nullptr; 147 HeapVector<Member<TextTrack>>* tracks = nullptr;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 DEFINE_TRACE_WRAPPERS(TextTrackList) 324 DEFINE_TRACE_WRAPPERS(TextTrackList)
325 { 325 {
326 for (auto track : m_addTrackTracks) 326 for (auto track : m_addTrackTracks)
327 visitor->traceWrappers(track); 327 visitor->traceWrappers(track);
328 for (auto track : m_elementTracks) 328 for (auto track : m_elementTracks)
329 visitor->traceWrappers(track); 329 visitor->traceWrappers(track);
330 for (auto track : m_inbandTracks) 330 for (auto track : m_inbandTracks)
331 visitor->traceWrappers(track); 331 visitor->traceWrappers(track);
332 } 332 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/track/AudioTrack.cpp ('k') | third_party/WebKit/Source/core/html/track/TrackBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698