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

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: buildfix 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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 const blink::WebString web_label = 1073 const blink::WebString web_label =
1074 blink::WebString::fromUTF8(config.label()); 1074 blink::WebString::fromUTF8(config.label());
1075 const blink::WebString web_language = 1075 const blink::WebString web_language =
1076 blink::WebString::fromUTF8(config.language()); 1076 blink::WebString::fromUTF8(config.language());
1077 const blink::WebString web_id = 1077 const blink::WebString web_id =
1078 blink::WebString::fromUTF8(config.id()); 1078 blink::WebString::fromUTF8(config.id());
1079 1079
1080 scoped_ptr<WebInbandTextTrackImpl> web_inband_text_track( 1080 scoped_ptr<WebInbandTextTrackImpl> web_inband_text_track(
1081 new WebInbandTextTrackImpl(web_kind, web_label, web_language, web_id)); 1081 new WebInbandTextTrackImpl(web_kind, web_label, web_language, web_id));
1082 1082
1083 scoped_ptr<TextTrack> text_track(new TextTrackImpl( 1083 scoped_ptr<media::TextTrack> text_track(new TextTrackImpl(
1084 main_task_runner_, client_, std::move(web_inband_text_track))); 1084 main_task_runner_, client_, std::move(web_inband_text_track)));
1085 1085
1086 done_cb.Run(std::move(text_track)); 1086 done_cb.Run(std::move(text_track));
1087 } 1087 }
1088 1088
1089 void WebMediaPlayerImpl::OnHidden() { 1089 void WebMediaPlayerImpl::OnHidden() {
1090 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1090 DCHECK(main_task_runner_->BelongsToCurrentThread());
1091 if (!IsSuspendUponHiddenEnabled()) 1091 if (!IsSuspendUponHiddenEnabled())
1092 return; 1092 return;
1093 1093
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 bool WebMediaPlayerImpl::IsAutomaticResumeAllowed() { 1557 bool WebMediaPlayerImpl::IsAutomaticResumeAllowed() {
1558 #if defined(OS_ANDROID) 1558 #if defined(OS_ANDROID)
1559 return !hasVideo() || (delegate_ && !delegate_->IsHidden()); 1559 return !hasVideo() || (delegate_ && !delegate_->IsHidden());
1560 #else 1560 #else
1561 // On non-Android platforms Resume() is always allowed. 1561 // On non-Android platforms Resume() is always allowed.
1562 return true; 1562 return true;
1563 #endif 1563 #endif
1564 } 1564 }
1565 1565
1566 } // namespace media 1566 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/blink/websourcebuffer_impl.cc » ('j') | third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698