Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: webkit/media/android/webmediaplayer_android.h

Issue 14247018: Implement WebRTC in Chrome for TV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: refactored according to Ami's suggestion Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/media/android/webmediaplayer_android.h
diff --git a/webkit/media/android/webmediaplayer_android.h b/webkit/media/android/webmediaplayer_android.h
index a00c07d878c1cb0edc6ebd1c03d6e9aa3fc8ec24..96a59cea91a548e55c1a72071bbe9cab370f7cb3 100644
--- a/webkit/media/android/webmediaplayer_android.h
+++ b/webkit/media/android/webmediaplayer_android.h
@@ -12,10 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/time.h"
-#if defined(GOOGLE_TV)
-#include "media/base/demuxer_stream.h"
-#endif
#include "cc/layers/video_frame_provider.h"
+#include "media/base/android/media_player_bridge.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
@@ -23,7 +21,12 @@
#include "ui/gfx/rect_f.h"
#include "webkit/media/android/stream_texture_factory_android.h"
+#if defined(GOOGLE_TV)
+#include "webkit/media/android/media_source_delegate.h"
+#endif
+
namespace media {
+class Demuxer;
class MediaLog;
}
@@ -38,8 +41,9 @@ class WebLayerImpl;
namespace webkit_media {
#if defined(GOOGLE_TV)
-class MediaSourceDelegate;
+class MediaStreamAudioRenderer;
#endif
+class MediaStreamClient;
class WebMediaPlayerManagerAndroid;
class WebMediaPlayerProxyAndroid;
@@ -202,8 +206,13 @@ class WebMediaPlayerAndroid
const WebKit::WebString& key_system,
const WebKit::WebString& session_id) OVERRIDE;
- // Called when DemuxerStreamPlayer needs to read data from ChunkDemuxer.
- void OnReadFromDemuxer(media::DemuxerStream::Type type, bool seek_done);
+ // Called when DemuxerStreamPlayer needs to read data from ChunkDemuxer.
+ void OnReadFromDemuxer(media::DemuxerStream::Type type, bool seek_done);
+
+ bool InjectMediaStream(
+ MediaStreamClient* media_stream_client,
+ media::Demuxer* demuxer,
+ const base::Closure& destroy_demuxer_cb);
#endif
protected:
@@ -221,6 +230,10 @@ class WebMediaPlayerAndroid
// Requesting whether the surface texture peer needs to be reestablished.
void SetNeedsEstablishPeer(bool needs_establish_peer);
+ void InitializeMediaPlayer(
+ const WebKit::WebURL& url,
+ media::MediaPlayerAndroid::MediaSourceType media_source_type);
+
#if defined(GOOGLE_TV)
// Request external surface for out-of-band composition.
void RequestExternalSurface();
@@ -306,7 +319,10 @@ class WebMediaPlayerAndroid
// time.
gfx::RectF last_computed_rect_;
+ // Media Source / Media Stream related fields.
scoped_ptr<MediaSourceDelegate> media_source_delegate_;
+ media::Demuxer* demuxer_;
+ base::Closure destroy_demuxer_cb_;
#endif
// Proxy object that delegates method calls on Render Thread.
@@ -320,6 +336,7 @@ class WebMediaPlayerAndroid
float current_time_;
media::MediaLog* media_log_;
+ MediaStreamClient* media_stream_client_;
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698