| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 // necessary. | 680 // necessary. |
| 681 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, | 681 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, |
| 682 premultiply_alpha); | 682 premultiply_alpha); |
| 683 | 683 |
| 684 // Application itself needs to take care of setting the right flip_y | 684 // Application itself needs to take care of setting the right flip_y |
| 685 // value down to get the expected result. | 685 // value down to get the expected result. |
| 686 // flip_y==true means to reverse the video orientation while | 686 // flip_y==true means to reverse the video orientation while |
| 687 // flip_y==false means to keep the intrinsic orientation. | 687 // flip_y==false means to keep the intrinsic orientation. |
| 688 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y); | 688 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y); |
| 689 web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, src_texture, texture, | 689 web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, src_texture, texture, |
| 690 0, internal_format, type); | 690 internal_format, type); |
| 691 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); | 691 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); |
| 692 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, | 692 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, |
| 693 false); | 693 false); |
| 694 | 694 |
| 695 web_graphics_context->deleteTexture(src_texture); | 695 web_graphics_context->deleteTexture(src_texture); |
| 696 web_graphics_context->flush(); | 696 web_graphics_context->flush(); |
| 697 | 697 |
| 698 SyncPointClientImpl client(web_graphics_context); | 698 SyncPointClientImpl client(web_graphics_context); |
| 699 video_frame->UpdateReleaseSyncPoint(&client); | 699 video_frame->UpdateReleaseSyncPoint(&client); |
| 700 return true; | 700 return true; |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 | 1857 |
| 1858 bool WebMediaPlayerAndroid::IsHLSStream() const { | 1858 bool WebMediaPlayerAndroid::IsHLSStream() const { |
| 1859 std::string mime; | 1859 std::string mime; |
| 1860 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; | 1860 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; |
| 1861 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) | 1861 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) |
| 1862 return false; | 1862 return false; |
| 1863 return !mime.compare("application/x-mpegurl"); | 1863 return !mime.compare("application/x-mpegurl"); |
| 1864 } | 1864 } |
| 1865 | 1865 |
| 1866 } // namespace content | 1866 } // namespace content |
| OLD | NEW |