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

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

Issue 787343003: Remove the index of in-band tracks on the Chromium side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « media/blink/webmediaplayer_impl.h ('k') | 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 // 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 <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 client_(client), 163 client_(client),
164 delegate_(delegate), 164 delegate_(delegate),
165 defer_load_cb_(params.defer_load_cb()), 165 defer_load_cb_(params.defer_load_cb()),
166 gpu_factories_(params.gpu_factories()), 166 gpu_factories_(params.gpu_factories()),
167 supports_save_(true), 167 supports_save_(true),
168 chunk_demuxer_(NULL), 168 chunk_demuxer_(NULL),
169 compositor_task_runner_(params.compositor_task_runner()), 169 compositor_task_runner_(params.compositor_task_runner()),
170 compositor_(new VideoFrameCompositor( 170 compositor_(new VideoFrameCompositor(
171 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNaturalSizeChanged), 171 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNaturalSizeChanged),
172 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnOpacityChanged))), 172 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnOpacityChanged))),
173 text_track_index_(0),
174 encrypted_media_support_( 173 encrypted_media_support_(
175 cdm_factory.Pass(), 174 cdm_factory.Pass(),
176 client, 175 client,
177 base::Bind(&WebMediaPlayerImpl::SetCdm, AsWeakPtr())), 176 base::Bind(&WebMediaPlayerImpl::SetCdm, AsWeakPtr())),
178 audio_hardware_config_(params.audio_hardware_config()), 177 audio_hardware_config_(params.audio_hardware_config()),
179 renderer_(renderer.Pass()) { 178 renderer_(renderer.Pass()) {
180 // Threaded compositing isn't enabled universally yet. 179 // Threaded compositing isn't enabled universally yet.
181 if (!compositor_task_runner_.get()) 180 if (!compositor_task_runner_.get())
182 compositor_task_runner_ = base::MessageLoopProxy::current(); 181 compositor_task_runner_ = base::MessageLoopProxy::current();
183 182
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 const WebInbandTextTrackImpl::Kind web_kind = 851 const WebInbandTextTrackImpl::Kind web_kind =
853 static_cast<WebInbandTextTrackImpl::Kind>(config.kind()); 852 static_cast<WebInbandTextTrackImpl::Kind>(config.kind());
854 const blink::WebString web_label = 853 const blink::WebString web_label =
855 blink::WebString::fromUTF8(config.label()); 854 blink::WebString::fromUTF8(config.label());
856 const blink::WebString web_language = 855 const blink::WebString web_language =
857 blink::WebString::fromUTF8(config.language()); 856 blink::WebString::fromUTF8(config.language());
858 const blink::WebString web_id = 857 const blink::WebString web_id =
859 blink::WebString::fromUTF8(config.id()); 858 blink::WebString::fromUTF8(config.id());
860 859
861 scoped_ptr<WebInbandTextTrackImpl> web_inband_text_track( 860 scoped_ptr<WebInbandTextTrackImpl> web_inband_text_track(
862 new WebInbandTextTrackImpl(web_kind, web_label, web_language, web_id, 861 new WebInbandTextTrackImpl(web_kind, web_label, web_language, web_id));
863 text_track_index_++));
864 862
865 scoped_ptr<TextTrack> text_track(new TextTrackImpl( 863 scoped_ptr<TextTrack> text_track(new TextTrackImpl(
866 main_task_runner_, client_, web_inband_text_track.Pass())); 864 main_task_runner_, client_, web_inband_text_track.Pass()));
867 865
868 done_cb.Run(text_track.Pass()); 866 done_cb.Run(text_track.Pass());
869 } 867 }
870 868
871 void WebMediaPlayerImpl::DataSourceInitialized(bool success) { 869 void WebMediaPlayerImpl::DataSourceInitialized(bool success) {
872 DCHECK(main_task_runner_->BelongsToCurrentThread()); 870 DCHECK(main_task_runner_->BelongsToCurrentThread());
873 871
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 compositor_task_runner_->PostTask(FROM_HERE, 1067 compositor_task_runner_->PostTask(FROM_HERE,
1070 base::Bind(&GetCurrentFrameAndSignal, 1068 base::Bind(&GetCurrentFrameAndSignal,
1071 base::Unretained(compositor_), 1069 base::Unretained(compositor_),
1072 &video_frame, 1070 &video_frame,
1073 &event)); 1071 &event));
1074 event.Wait(); 1072 event.Wait();
1075 return video_frame; 1073 return video_frame;
1076 } 1074 }
1077 1075
1078 } // namespace media 1076 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698