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

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

Issue 2113173002: Use trackInfo.id instead of bytestream id for blink tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 // 5.2.4 Let audio label be a label specified in the initialization segment for this track or an empty string if no label info is present. 739 // 5.2.4 Let audio label be a label specified in the initialization segment for this track or an empty string if no label info is present.
740 WebString label = trackInfo.label; 740 WebString label = trackInfo.label;
741 // 5.3.5 If audio label equals an empty string, then run the default track label algorithm with byteStreamTrackID set to audio byte stream track ID and 741 // 5.3.5 If audio label equals an empty string, then run the default track label algorithm with byteStreamTrackID set to audio byte stream track ID and
742 // type set to "audio" and assign the value returned by the algorith m to audio label. 742 // type set to "audio" and assign the value returned by the algorith m to audio label.
743 if (label.isEmpty()) 743 if (label.isEmpty())
744 label = defaultTrackLabel(TrackDefault::audioKeyword(), byteStre amTrackID); 744 label = defaultTrackLabel(TrackDefault::audioKeyword(), byteStre amTrackID);
745 // 5.2.6 Let audio kinds be an array of kind strings specified in th e initialization segment for this track or an empty array if no kind information is provided. 745 // 5.2.6 Let audio kinds be an array of kind strings specified in th e initialization segment for this track or an empty array if no kind information is provided.
746 const auto& kind = trackInfo.kind; 746 const auto& kind = trackInfo.kind;
747 // 5.2.7 TODO(servolk): Implement track kind processing. 747 // 5.2.7 TODO(servolk): Implement track kind processing.
748 // 5.2.8.2 Let new audio track be a new AudioTrack object. 748 // 5.2.8.2 Let new audio track be a new AudioTrack object.
749 AudioTrack* audioTrack = AudioTrack::create(byteStreamTrackID, kind, label, language, false); 749 AudioTrack* audioTrack = AudioTrack::create(trackInfo.id, kind, labe l, language, false);
750 SourceBufferTrackBaseSupplement::setSourceBuffer(*audioTrack, this); 750 SourceBufferTrackBaseSupplement::setSourceBuffer(*audioTrack, this);
751 // 5.2.8.7 If audioTracks.length equals 0, then run the following st eps: 751 // 5.2.8.7 If audioTracks.length equals 0, then run the following st eps:
752 if (audioTracks().length() == 0) { 752 if (audioTracks().length() == 0) {
753 // 5.2.8.7.1 Set the enabled property on new audio track to true . 753 // 5.2.8.7.1 Set the enabled property on new audio track to true .
754 audioTrack->setEnabled(true); 754 audioTrack->setEnabled(true);
755 // 5.2.8.7.2 Set active track flag to true. 755 // 5.2.8.7.2 Set active track flag to true.
756 m_activeTrack = true; 756 m_activeTrack = true;
757 } 757 }
758 // 5.2.8.8 Add new audio track to the audioTracks attribute on this SourceBuffer object. 758 // 5.2.8.8 Add new audio track to the audioTracks attribute on this SourceBuffer object.
759 // 5.2.8.9 Queue a task to fire a trusted event named addtrack, that does not bubble and is not cancelable, and that uses the TrackEvent interface, at the AudioTrackList object referenced by the audioTracks attribute on this Sou rceBuffer object. 759 // 5.2.8.9 Queue a task to fire a trusted event named addtrack, that does not bubble and is not cancelable, and that uses the TrackEvent interface, at the AudioTrackList object referenced by the audioTracks attribute on this Sou rceBuffer object.
(...skipping 16 matching lines...) Expand all
776 // 5.3.4 Let video label be a label specified in the initialization segment for this track or an empty string if no label info is present. 776 // 5.3.4 Let video label be a label specified in the initialization segment for this track or an empty string if no label info is present.
777 WebString label = trackInfo.label; 777 WebString label = trackInfo.label;
778 // 5.3.5 If video label equals an empty string, then run the default track label algorithm with byteStreamTrackID set to video byte stream track ID and 778 // 5.3.5 If video label equals an empty string, then run the default track label algorithm with byteStreamTrackID set to video byte stream track ID and
779 // type set to "video" and assign the value returned by the algorith m to video label. 779 // type set to "video" and assign the value returned by the algorith m to video label.
780 if (label.isEmpty()) 780 if (label.isEmpty())
781 label = defaultTrackLabel(TrackDefault::videoKeyword(), byteStre amTrackID); 781 label = defaultTrackLabel(TrackDefault::videoKeyword(), byteStre amTrackID);
782 // 5.3.6 Let video kinds be an array of kind strings specified in th e initialization segment for this track or an empty array if no kind information is provided. 782 // 5.3.6 Let video kinds be an array of kind strings specified in th e initialization segment for this track or an empty array if no kind information is provided.
783 const auto& kind = trackInfo.kind; 783 const auto& kind = trackInfo.kind;
784 // 5.3.7 TODO(servolk): Implement track kind processing. 784 // 5.3.7 TODO(servolk): Implement track kind processing.
785 // 5.3.8.2 Let new video track be a new VideoTrack object. 785 // 5.3.8.2 Let new video track be a new VideoTrack object.
786 VideoTrack* videoTrack = VideoTrack::create(byteStreamTrackID, kind, label, language, false); 786 VideoTrack* videoTrack = VideoTrack::create(trackInfo.id, kind, labe l, language, false);
787 SourceBufferTrackBaseSupplement::setSourceBuffer(*videoTrack, this); 787 SourceBufferTrackBaseSupplement::setSourceBuffer(*videoTrack, this);
788 // 5.3.8.7 If videoTracks.length equals 0, then run the following st eps: 788 // 5.3.8.7 If videoTracks.length equals 0, then run the following st eps:
789 if (videoTracks().length() == 0) { 789 if (videoTracks().length() == 0) {
790 // 5.3.8.7.1 Set the selected property on new audio track to tru e. 790 // 5.3.8.7.1 Set the selected property on new audio track to tru e.
791 videoTrack->setSelected(true); 791 videoTrack->setSelected(true);
792 // 5.3.8.7.2 Set active track flag to true. 792 // 5.3.8.7.2 Set active track flag to true.
793 m_activeTrack = true; 793 m_activeTrack = true;
794 } 794 }
795 // 5.3.8.8 Add new video track to the videoTracks attribute on this SourceBuffer object. 795 // 5.3.8.8 Add new video track to the videoTracks attribute on this SourceBuffer object.
796 // 5.3.8.9 Queue a task to fire a trusted event named addtrack, that does not bubble and is not cancelable, and that uses the TrackEvent interface, at the VideoTrackList object referenced by the videoTracks attribute on this Sou rceBuffer object. 796 // 5.3.8.9 Queue a task to fire a trusted event named addtrack, that does not bubble and is not cancelable, and that uses the TrackEvent interface, at the VideoTrackList object referenced by the videoTracks attribute on this Sou rceBuffer object.
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 visitor->trace(m_removeAsyncPartRunner); 1215 visitor->trace(m_removeAsyncPartRunner);
1216 visitor->trace(m_appendStreamAsyncPartRunner); 1216 visitor->trace(m_appendStreamAsyncPartRunner);
1217 visitor->trace(m_stream); 1217 visitor->trace(m_stream);
1218 visitor->trace(m_audioTracks); 1218 visitor->trace(m_audioTracks);
1219 visitor->trace(m_videoTracks); 1219 visitor->trace(m_videoTracks);
1220 EventTargetWithInlineData::trace(visitor); 1220 EventTargetWithInlineData::trace(visitor);
1221 ActiveDOMObject::trace(visitor); 1221 ActiveDOMObject::trace(visitor);
1222 } 1222 }
1223 1223
1224 } // namespace blink 1224 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698