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

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 // Implementation of Initialization Segment Received, see 765 // Implementation of Initialization Segment Received, see
766 // https://w3c.github.io/media-source/#sourcebuffer-init-segment-received 766 // https://w3c.github.io/media-source/#sourcebuffer-init-segment-received
767 767
768 // Sort newTracks into audio and video tracks to facilitate implementation 768 // Sort newTracks into audio and video tracks to facilitate implementation
769 // of subsequent steps of this algorithm. 769 // of subsequent steps of this algorithm.
770 Vector<MediaTrackInfo> newAudioTracks; 770 Vector<MediaTrackInfo> newAudioTracks;
771 Vector<MediaTrackInfo> newVideoTracks; 771 Vector<MediaTrackInfo> newVideoTracks;
772 for (const MediaTrackInfo& trackInfo : newTracks) { 772 for (const MediaTrackInfo& trackInfo : newTracks) {
773 const TrackBase* track = nullptr; 773 const TrackBase* track = nullptr;
774 if (trackInfo.trackType == WebMediaPlayer::AudioTrack) { 774 if (trackInfo.trackType == WebMediaPlayer::AudioTrack) {
775 newAudioTracks.append(trackInfo); 775 newAudioTracks.push_back(trackInfo);
776 if (m_firstInitializationSegmentReceived) 776 if (m_firstInitializationSegmentReceived)
777 track = findExistingTrackById(audioTracks(), trackInfo.id); 777 track = findExistingTrackById(audioTracks(), trackInfo.id);
778 } else if (trackInfo.trackType == WebMediaPlayer::VideoTrack) { 778 } else if (trackInfo.trackType == WebMediaPlayer::VideoTrack) {
779 newVideoTracks.append(trackInfo); 779 newVideoTracks.push_back(trackInfo);
780 if (m_firstInitializationSegmentReceived) 780 if (m_firstInitializationSegmentReceived)
781 track = findExistingTrackById(videoTracks(), trackInfo.id); 781 track = findExistingTrackById(videoTracks(), trackInfo.id);
782 } else { 782 } else {
783 BLINK_SBLOG << __func__ << " this=" << this 783 BLINK_SBLOG << __func__ << " this=" << this
784 << " failed: unsupported track type " << trackInfo.trackType; 784 << " failed: unsupported track type " << trackInfo.trackType;
785 // TODO(servolk): Add handling of text tracks. 785 // TODO(servolk): Add handling of text tracks.
786 NOTREACHED(); 786 NOTREACHED();
787 } 787 }
788 if (m_firstInitializationSegmentReceived && !track) { 788 if (m_firstInitializationSegmentReceived && !track) {
789 BLINK_SBLOG << __func__ << " this=" << this 789 BLINK_SBLOG << __func__ << " this=" << this
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 visitor->trace(m_asyncEventQueue); 1299 visitor->trace(m_asyncEventQueue);
1300 visitor->trace(m_appendBufferAsyncPartRunner); 1300 visitor->trace(m_appendBufferAsyncPartRunner);
1301 visitor->trace(m_removeAsyncPartRunner); 1301 visitor->trace(m_removeAsyncPartRunner);
1302 visitor->trace(m_audioTracks); 1302 visitor->trace(m_audioTracks);
1303 visitor->trace(m_videoTracks); 1303 visitor->trace(m_videoTracks);
1304 EventTargetWithInlineData::trace(visitor); 1304 EventTargetWithInlineData::trace(visitor);
1305 SuspendableObject::trace(visitor); 1305 SuspendableObject::trace(visitor);
1306 } 1306 }
1307 1307
1308 } // namespace blink 1308 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698