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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 1659653002: Pass MSE media track info from ChunkDemuxer to blink::SourceBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-media-tracks-in-media
Patch Set: nit Created 4 years, 8 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 const blink::WebString web_label = 1068 const blink::WebString web_label =
1069 blink::WebString::fromUTF8(config.label()); 1069 blink::WebString::fromUTF8(config.label());
1070 const blink::WebString web_language = 1070 const blink::WebString web_language =
1071 blink::WebString::fromUTF8(config.language()); 1071 blink::WebString::fromUTF8(config.language());
1072 const blink::WebString web_id = 1072 const blink::WebString web_id =
1073 blink::WebString::fromUTF8(config.id()); 1073 blink::WebString::fromUTF8(config.id());
1074 1074
1075 scoped_ptr<WebInbandTextTrackImpl> web_inband_text_track( 1075 scoped_ptr<WebInbandTextTrackImpl> web_inband_text_track(
1076 new WebInbandTextTrackImpl(web_kind, web_label, web_language, web_id)); 1076 new WebInbandTextTrackImpl(web_kind, web_label, web_language, web_id));
1077 1077
1078 scoped_ptr<TextTrack> text_track(new TextTrackImpl( 1078 scoped_ptr<media::TextTrack> text_track(new TextTrackImpl(
1079 main_task_runner_, client_, std::move(web_inband_text_track))); 1079 main_task_runner_, client_, std::move(web_inband_text_track)));
1080 1080
1081 done_cb.Run(std::move(text_track)); 1081 done_cb.Run(std::move(text_track));
1082 } 1082 }
1083 1083
1084 void WebMediaPlayerImpl::OnHidden() { 1084 void WebMediaPlayerImpl::OnHidden() {
1085 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1085 DCHECK(main_task_runner_->BelongsToCurrentThread());
1086 if (!IsSuspendUponHiddenEnabled()) 1086 if (!IsSuspendUponHiddenEnabled())
1087 return; 1087 return;
1088 1088
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 bool WebMediaPlayerImpl::IsAutomaticResumeAllowed() { 1552 bool WebMediaPlayerImpl::IsAutomaticResumeAllowed() {
1553 #if defined(OS_ANDROID) 1553 #if defined(OS_ANDROID)
1554 return !hasVideo() || (delegate_ && !delegate_->IsHidden()); 1554 return !hasVideo() || (delegate_ && !delegate_->IsHidden());
1555 #else 1555 #else
1556 // On non-Android platforms Resume() is always allowed. 1556 // On non-Android platforms Resume() is always allowed.
1557 return true; 1557 return true;
1558 #endif 1558 #endif
1559 } 1559 }
1560 1560
1561 } // namespace media 1561 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/blink/websourcebuffer_impl.cc » ('j') | third_party/WebKit/public/platform/WebSourceBufferClient.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698