OLD | NEW |
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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 video_frame_provider_client_ = client; | 1264 video_frame_provider_client_ = client; |
1265 } | 1265 } |
1266 | 1266 |
1267 void WebMediaPlayerAndroid::SetCurrentFrameInternal( | 1267 void WebMediaPlayerAndroid::SetCurrentFrameInternal( |
1268 scoped_refptr<media::VideoFrame>& video_frame) { | 1268 scoped_refptr<media::VideoFrame>& video_frame) { |
1269 DCHECK(main_thread_checker_.CalledOnValidThread()); | 1269 DCHECK(main_thread_checker_.CalledOnValidThread()); |
1270 base::AutoLock auto_lock(current_frame_lock_); | 1270 base::AutoLock auto_lock(current_frame_lock_); |
1271 current_frame_ = video_frame; | 1271 current_frame_ = video_frame; |
1272 } | 1272 } |
1273 | 1273 |
| 1274 bool WebMediaPlayerAndroid::Render(base::TimeTicks deadline_min, |
| 1275 base::TimeTicks deadline_max) { |
| 1276 NOTIMPLEMENTED(); |
| 1277 return false; |
| 1278 } |
| 1279 |
1274 scoped_refptr<media::VideoFrame> WebMediaPlayerAndroid::GetCurrentFrame() { | 1280 scoped_refptr<media::VideoFrame> WebMediaPlayerAndroid::GetCurrentFrame() { |
1275 scoped_refptr<VideoFrame> video_frame; | 1281 scoped_refptr<VideoFrame> video_frame; |
1276 { | 1282 { |
1277 base::AutoLock auto_lock(current_frame_lock_); | 1283 base::AutoLock auto_lock(current_frame_lock_); |
1278 video_frame = current_frame_; | 1284 video_frame = current_frame_; |
1279 } | 1285 } |
1280 | 1286 |
1281 return video_frame; | 1287 return video_frame; |
1282 } | 1288 } |
1283 | 1289 |
1284 void WebMediaPlayerAndroid::PutCurrentFrame( | 1290 void WebMediaPlayerAndroid::PutCurrentFrame() { |
1285 const scoped_refptr<media::VideoFrame>& frame) { | 1291 } |
| 1292 |
| 1293 void WebMediaPlayerAndroid::SetVisible(bool visible) { |
1286 } | 1294 } |
1287 | 1295 |
1288 void WebMediaPlayerAndroid::ResetStreamTextureProxy() { | 1296 void WebMediaPlayerAndroid::ResetStreamTextureProxy() { |
1289 DCHECK(main_thread_checker_.CalledOnValidThread()); | 1297 DCHECK(main_thread_checker_.CalledOnValidThread()); |
1290 | 1298 |
1291 if (stream_id_) { | 1299 if (stream_id_) { |
1292 GLES2Interface* gl = stream_texture_factory_->ContextGL(); | 1300 GLES2Interface* gl = stream_texture_factory_->ContextGL(); |
1293 gl->DeleteTextures(1, &texture_id_); | 1301 gl->DeleteTextures(1, &texture_id_); |
1294 texture_id_ = 0; | 1302 texture_id_ = 0; |
1295 texture_mailbox_ = gpu::Mailbox(); | 1303 texture_mailbox_ = gpu::Mailbox(); |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1850 | 1858 |
1851 bool WebMediaPlayerAndroid::IsHLSStream() const { | 1859 bool WebMediaPlayerAndroid::IsHLSStream() const { |
1852 std::string mime; | 1860 std::string mime; |
1853 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; | 1861 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; |
1854 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) | 1862 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) |
1855 return false; | 1863 return false; |
1856 return !mime.compare("application/x-mpegurl"); | 1864 return !mime.compare("application/x-mpegurl"); |
1857 } | 1865 } |
1858 | 1866 |
1859 } // namespace content | 1867 } // namespace content |
OLD | NEW |