Chromium Code Reviews| 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 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1273 base::AutoLock auto_lock(current_frame_lock_); | 1273 base::AutoLock auto_lock(current_frame_lock_); |
| 1274 current_frame_ = video_frame; | 1274 current_frame_ = video_frame; |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 bool WebMediaPlayerAndroid::UpdateCurrentFrame(base::TimeTicks deadline_min, | 1277 bool WebMediaPlayerAndroid::UpdateCurrentFrame(base::TimeTicks deadline_min, |
| 1278 base::TimeTicks deadline_max) { | 1278 base::TimeTicks deadline_max) { |
| 1279 NOTIMPLEMENTED(); | 1279 NOTIMPLEMENTED(); |
| 1280 return false; | 1280 return false; |
| 1281 } | 1281 } |
| 1282 | 1282 |
| 1283 bool WebMediaPlayerAndroid::HasCurrentFrame() const { | |
| 1284 return current_frame_; | |
|
danakj
2015/05/18 18:15:45
you need to lock current_frame_lock_ no?
hendrikw
2015/05/18 18:33:59
Yeah, I was unsure about this. We have a lock in
danakj
2015/05/18 18:44:57
I /think/ in VFC the lock_ is locking access to th
| |
| 1285 } | |
| 1286 | |
| 1283 scoped_refptr<media::VideoFrame> WebMediaPlayerAndroid::GetCurrentFrame() { | 1287 scoped_refptr<media::VideoFrame> WebMediaPlayerAndroid::GetCurrentFrame() { |
| 1284 scoped_refptr<VideoFrame> video_frame; | 1288 scoped_refptr<VideoFrame> video_frame; |
| 1285 { | 1289 { |
| 1286 base::AutoLock auto_lock(current_frame_lock_); | 1290 base::AutoLock auto_lock(current_frame_lock_); |
| 1287 video_frame = current_frame_; | 1291 video_frame = current_frame_; |
| 1288 } | 1292 } |
| 1289 | 1293 |
| 1290 return video_frame; | 1294 return video_frame; |
| 1291 } | 1295 } |
| 1292 | 1296 |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1857 | 1861 |
| 1858 bool WebMediaPlayerAndroid::IsHLSStream() const { | 1862 bool WebMediaPlayerAndroid::IsHLSStream() const { |
| 1859 std::string mime; | 1863 std::string mime; |
| 1860 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; | 1864 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; |
| 1861 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) | 1865 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) |
| 1862 return false; | 1866 return false; |
| 1863 return !mime.compare("application/x-mpegurl"); | 1867 return !mime.compare("application/x-mpegurl"); |
| 1864 } | 1868 } |
| 1865 | 1869 |
| 1866 } // namespace content | 1870 } // namespace content |
| OLD | NEW |