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