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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 1094553002: Revert "Speculative revert by sheriff" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 "content/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 video_frame_provider_client_ = client; 1265 video_frame_provider_client_ = client;
1266 } 1266 }
1267 1267
1268 void WebMediaPlayerAndroid::SetCurrentFrameInternal( 1268 void WebMediaPlayerAndroid::SetCurrentFrameInternal(
1269 scoped_refptr<media::VideoFrame>& video_frame) { 1269 scoped_refptr<media::VideoFrame>& video_frame) {
1270 DCHECK(main_thread_checker_.CalledOnValidThread()); 1270 DCHECK(main_thread_checker_.CalledOnValidThread());
1271 base::AutoLock auto_lock(current_frame_lock_); 1271 base::AutoLock auto_lock(current_frame_lock_);
1272 current_frame_ = video_frame; 1272 current_frame_ = video_frame;
1273 } 1273 }
1274 1274
1275 bool WebMediaPlayerAndroid::UpdateCurrentFrame(base::TimeTicks deadline_min,
1276 base::TimeTicks deadline_max) {
1277 NOTIMPLEMENTED();
1278 return false;
1279 }
1280
1275 scoped_refptr<media::VideoFrame> WebMediaPlayerAndroid::GetCurrentFrame() { 1281 scoped_refptr<media::VideoFrame> WebMediaPlayerAndroid::GetCurrentFrame() {
1276 scoped_refptr<VideoFrame> video_frame; 1282 scoped_refptr<VideoFrame> video_frame;
1277 { 1283 {
1278 base::AutoLock auto_lock(current_frame_lock_); 1284 base::AutoLock auto_lock(current_frame_lock_);
1279 video_frame = current_frame_; 1285 video_frame = current_frame_;
1280 } 1286 }
1281 1287
1282 return video_frame; 1288 return video_frame;
1283 } 1289 }
1284 1290
1285 void WebMediaPlayerAndroid::PutCurrentFrame( 1291 void WebMediaPlayerAndroid::PutCurrentFrame() {
1286 const scoped_refptr<media::VideoFrame>& frame) {
1287 } 1292 }
1288 1293
1289 void WebMediaPlayerAndroid::ResetStreamTextureProxy() { 1294 void WebMediaPlayerAndroid::ResetStreamTextureProxy() {
1290 DCHECK(main_thread_checker_.CalledOnValidThread()); 1295 DCHECK(main_thread_checker_.CalledOnValidThread());
1291 1296
1292 if (stream_id_) { 1297 if (stream_id_) {
1293 GLES2Interface* gl = stream_texture_factory_->ContextGL(); 1298 GLES2Interface* gl = stream_texture_factory_->ContextGL();
1294 gl->DeleteTextures(1, &texture_id_); 1299 gl->DeleteTextures(1, &texture_id_);
1295 texture_id_ = 0; 1300 texture_id_ = 0;
1296 texture_mailbox_ = gpu::Mailbox(); 1301 texture_mailbox_ = gpu::Mailbox();
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 1854
1850 bool WebMediaPlayerAndroid::IsHLSStream() const { 1855 bool WebMediaPlayerAndroid::IsHLSStream() const {
1851 std::string mime; 1856 std::string mime;
1852 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; 1857 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
1853 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) 1858 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
1854 return false; 1859 return false;
1855 return !mime.compare("application/x-mpegurl"); 1860 return !mime.compare("application/x-mpegurl");
1856 } 1861 }
1857 1862
1858 } // namespace content 1863 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698