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

Unified Diff: media/blink/webmediaplayer_impl.cc

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
« no previous file with comments | « media/base/media_tracks.cc ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 12835699e8efdc29328e6d7341ae6cafe0b9977e..55f0bb4d99353073a1ff048adbf3a11e138aefe7 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -833,23 +833,17 @@ void WebMediaPlayerImpl::OnFFmpegMediaTracksUpdated(
// Report the media track information to blink.
for (const auto& track : tracks->tracks()) {
if (track->type() == MediaTrack::Audio) {
- auto track_id = client_->addAudioTrack(
- blink::WebString::fromUTF8(
- base::UintToString(track->bytestream_track_id())),
- blink::WebMediaPlayerClient::AudioTrackKindMain,
- blink::WebString::fromUTF8(track->label()),
- blink::WebString::fromUTF8(track->language()),
- /*enabled*/ true);
- (void)track_id;
+ client_->addAudioTrack(blink::WebString::fromUTF8(track->id()),
+ blink::WebMediaPlayerClient::AudioTrackKindMain,
+ blink::WebString::fromUTF8(track->label()),
+ blink::WebString::fromUTF8(track->language()),
+ /*enabled*/ true);
} else if (track->type() == MediaTrack::Video) {
- auto track_id = client_->addVideoTrack(
- blink::WebString::fromUTF8(
- base::UintToString(track->bytestream_track_id())),
- blink::WebMediaPlayerClient::VideoTrackKindMain,
- blink::WebString::fromUTF8(track->label()),
- blink::WebString::fromUTF8(track->language()),
- /*selected*/ true);
- (void)track_id;
+ client_->addVideoTrack(blink::WebString::fromUTF8(track->id()),
+ blink::WebMediaPlayerClient::VideoTrackKindMain,
+ blink::WebString::fromUTF8(track->label()),
+ blink::WebString::fromUTF8(track->language()),
+ /*selected*/ true);
} else {
// Text tracks are not supported through this code path yet.
NOTREACHED();
« no previous file with comments | « media/base/media_tracks.cc ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698