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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 bitmap->setInfo(info); | 118 bitmap->setInfo(info); |
119 bitmap->setPixelRef(pixel_ref)->unref(); | 119 bitmap->setPixelRef(pixel_ref)->unref(); |
120 return true; | 120 return true; |
121 } | 121 } |
122 | 122 |
123 class SyncPointClientImpl : public media::VideoFrame::SyncPointClient { | 123 class SyncPointClientImpl : public media::VideoFrame::SyncPointClient { |
124 public: | 124 public: |
125 explicit SyncPointClientImpl( | 125 explicit SyncPointClientImpl( |
126 blink::WebGraphicsContext3D* web_graphics_context) | 126 blink::WebGraphicsContext3D* web_graphics_context) |
127 : web_graphics_context_(web_graphics_context) {} | 127 : web_graphics_context_(web_graphics_context) {} |
128 virtual ~SyncPointClientImpl() {} | 128 ~SyncPointClientImpl() override {} |
129 virtual uint32 InsertSyncPoint() override { | 129 uint32 InsertSyncPoint() override { |
130 return web_graphics_context_->insertSyncPoint(); | 130 return web_graphics_context_->insertSyncPoint(); |
131 } | 131 } |
132 virtual void WaitSyncPoint(uint32 sync_point) override { | 132 void WaitSyncPoint(uint32 sync_point) override { |
133 web_graphics_context_->waitSyncPoint(sync_point); | 133 web_graphics_context_->waitSyncPoint(sync_point); |
134 } | 134 } |
135 | 135 |
136 private: | 136 private: |
137 blink::WebGraphicsContext3D* web_graphics_context_; | 137 blink::WebGraphicsContext3D* web_graphics_context_; |
138 }; | 138 }; |
139 | 139 |
140 } // namespace | 140 } // namespace |
141 | 141 |
142 namespace content { | 142 namespace content { |
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 | 1822 |
1823 bool WebMediaPlayerAndroid::IsHLSStream() const { | 1823 bool WebMediaPlayerAndroid::IsHLSStream() const { |
1824 std::string mime; | 1824 std::string mime; |
1825 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; | 1825 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; |
1826 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) | 1826 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) |
1827 return false; | 1827 return false; |
1828 return !mime.compare("application/x-mpegurl"); | 1828 return !mime.compare("application/x-mpegurl"); |
1829 } | 1829 } |
1830 | 1830 |
1831 } // namespace content | 1831 } // namespace content |
OLD | NEW |