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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index ed596d00d9df66b3052914fec0e6c9c47b0352e2..63ecaf0f462ced727e52f0768f987d548f8c3d5e 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -2393,7 +2393,7 @@ AudioTrackList& HTMLMediaElement::audioTracks()
void HTMLMediaElement::audioTrackChanged(WebMediaPlayer::TrackId trackId, bool enabled)
{
- DVLOG(MEDIA_LOG_LEVEL) << "audioTrackChanged(" << (void*)this << ") trackId= " << trackId << " enabled=" << boolString(enabled);
+ DVLOG(MEDIA_LOG_LEVEL) << "audioTrackChanged(" << (void*)this << ") trackId= " << (String)trackId << " enabled=" << boolString(enabled);
DCHECK(RuntimeEnabledFeatures::audioVideoTracksEnabled());
audioTracks().scheduleChangeEvent();
@@ -2410,7 +2410,7 @@ void HTMLMediaElement::audioTracksTimerFired(Timer<HTMLMediaElement>*)
for (unsigned i = 0; i < audioTracks().length(); ++i) {
AudioTrack* track = audioTracks().anonymousIndexedGetter(i);
if (track->enabled())
- enabledTrackIds.append(track->trackId());
+ enabledTrackIds.append(track->id());
}
webMediaPlayer()->enabledAudioTracksChanged(enabledTrackIds);
@@ -2423,12 +2423,12 @@ WebMediaPlayer::TrackId HTMLMediaElement::addAudioTrack(const WebString& id, Web
<< "', '" << (String)label << "', '" << (String)language << "', " << boolString(enabled) << ")";
if (!RuntimeEnabledFeatures::audioVideoTracksEnabled())
- return 0;
+ return blink::WebMediaPlayer::TrackId();
AudioTrack* audioTrack = AudioTrack::create(id, kindString, label, language, enabled);
audioTracks().add(audioTrack);
- return audioTrack->trackId();
+ return audioTrack->id();
}
void HTMLMediaElement::removeAudioTrack(WebMediaPlayer::TrackId trackId)
@@ -2449,7 +2449,7 @@ VideoTrackList& HTMLMediaElement::videoTracks()
void HTMLMediaElement::selectedVideoTrackChanged(WebMediaPlayer::TrackId* selectedTrackId)
{
- DVLOG(MEDIA_LOG_LEVEL) << "selectedVideoTrackChanged(" << (void*)this << ") selectedTrackId=" << (selectedTrackId ? String::format("%u", *selectedTrackId) : "none");
+ DVLOG(MEDIA_LOG_LEVEL) << "selectedVideoTrackChanged(" << (void*)this << ") selectedTrackId=" << (selectedTrackId ? ((String)*selectedTrackId) : "none");
DCHECK(RuntimeEnabledFeatures::audioVideoTracksEnabled());
if (selectedTrackId)
@@ -2467,7 +2467,7 @@ WebMediaPlayer::TrackId HTMLMediaElement::addVideoTrack(const WebString& id, Web
<< "', '" << (String)label << "', '" << (String)language << "', " << boolString(selected) << ")";
if (!RuntimeEnabledFeatures::audioVideoTracksEnabled())
- return 0;
+ return blink::WebMediaPlayer::TrackId();
// If another track was selected (potentially by the user), leave it selected.
if (selected && videoTracks().selectedIndex() != -1)
@@ -2476,7 +2476,7 @@ WebMediaPlayer::TrackId HTMLMediaElement::addVideoTrack(const WebString& id, Web
VideoTrack* videoTrack = VideoTrack::create(id, kindString, label, language, selected);
videoTracks().add(videoTrack);
- return videoTrack->trackId();
+ return videoTrack->id();
}
void HTMLMediaElement::removeVideoTrack(WebMediaPlayer::TrackId trackId)
« no previous file with comments | « media/test/pipeline_integration_test_base.cc ('k') | third_party/WebKit/Source/core/html/track/AudioTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698