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 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "media/base/android/media_player_android.h" | 26 #include "media/base/android/media_player_android.h" |
27 #include "media/base/demuxer_stream.h" | 27 #include "media/base/demuxer_stream.h" |
28 #include "media/base/media_keys.h" | 28 #include "media/base/media_keys.h" |
29 #include "media/base/time_delta_interpolator.h" | 29 #include "media/base/time_delta_interpolator.h" |
30 #include "media/cdm/proxy_decryptor.h" | 30 #include "media/cdm/proxy_decryptor.h" |
31 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 31 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
32 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 32 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
33 #include "third_party/WebKit/public/platform/WebSize.h" | 33 #include "third_party/WebKit/public/platform/WebSize.h" |
34 #include "third_party/WebKit/public/platform/WebURL.h" | 34 #include "third_party/WebKit/public/platform/WebURL.h" |
35 #include "third_party/skia/include/core/SkBitmap.h" | 35 #include "third_party/skia/include/core/SkBitmap.h" |
36 #include "third_party/skia/include/gpu/GrContext.h" | |
37 #include "third_party/skia/include/gpu/SkGrPixelRef.h" | |
38 #include "ui/gfx/geometry/rect_f.h" | 36 #include "ui/gfx/geometry/rect_f.h" |
39 | 37 |
40 namespace base { | 38 namespace base { |
41 class SingleThreadTaskRunner; | 39 class SingleThreadTaskRunner; |
42 } | 40 } |
43 | 41 |
44 namespace blink { | 42 namespace blink { |
45 class WebContentDecryptionModule; | 43 class WebContentDecryptionModule; |
46 class WebContentDecryptionModuleResult; | 44 class WebContentDecryptionModuleResult; |
47 class WebFrame; | 45 class WebFrame; |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // If |decryptor_ready_cb| is null, the existing callback will be fired with | 308 // If |decryptor_ready_cb| is null, the existing callback will be fired with |
311 // NULL immediately and reset. | 309 // NULL immediately and reset. |
312 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); | 310 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); |
313 | 311 |
314 // Called when the ContentDecryptionModule has been attached to the | 312 // Called when the ContentDecryptionModule has been attached to the |
315 // pipeline/decoders. | 313 // pipeline/decoders. |
316 void ContentDecryptionModuleAttached( | 314 void ContentDecryptionModuleAttached( |
317 blink::WebContentDecryptionModuleResult result, | 315 blink::WebContentDecryptionModuleResult result, |
318 bool success); | 316 bool success); |
319 | 317 |
320 bool EnsureTextureBackedSkBitmap(GrContext* gr, SkBitmap& bitmap, | |
321 const blink::WebSize& size, | |
322 GrSurfaceOrigin origin, | |
323 GrPixelConfig config); | |
324 | |
325 bool IsHLSStream() const; | 318 bool IsHLSStream() const; |
326 | 319 |
327 blink::WebFrame* const frame_; | 320 blink::WebFrame* const frame_; |
328 | 321 |
329 blink::WebMediaPlayerClient* const client_; | 322 blink::WebMediaPlayerClient* const client_; |
330 | 323 |
331 // |delegate_| is used to notify the browser process of the player status, so | 324 // |delegate_| is used to notify the browser process of the player status, so |
332 // that the browser process can control screen locks. | 325 // that the browser process can control screen locks. |
333 // TODO(qinmin): Currently android mediaplayer takes care of the screen | 326 // TODO(qinmin): Currently android mediaplayer takes care of the screen |
334 // lock. So this is only used for media source. Will apply this to regular | 327 // lock. So this is only used for media source. Will apply this to regular |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 493 |
501 // NOTE: Weak pointers must be invalidated before all other member variables. | 494 // NOTE: Weak pointers must be invalidated before all other member variables. |
502 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 495 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
503 | 496 |
504 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 497 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
505 }; | 498 }; |
506 | 499 |
507 } // namespace content | 500 } // namespace content |
508 | 501 |
509 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 502 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |