| Index: media/blink/webmediaplayer_impl.h
|
| diff --git a/content/renderer/media/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
|
| similarity index 86%
|
| rename from content/renderer/media/webmediaplayer_impl.h
|
| rename to media/blink/webmediaplayer_impl.h
|
| index 7c2892b8c855be3a189606cfef62a4f38f49b9af..bbdf0802697939ba40ddf50067a1588a1373b128 100644
|
| --- a/content/renderer/media/webmediaplayer_impl.h
|
| +++ b/media/blink/webmediaplayer_impl.h
|
| @@ -2,26 +2,28 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
|
| -#define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
|
| +#ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
|
| +#define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
|
|
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/threading/thread.h"
|
| -#include "content/renderer/media/buffered_data_source_host_impl.h"
|
| -#include "content/renderer/media/video_frame_compositor.h"
|
| #include "media/base/audio_renderer_sink.h"
|
| +#include "media/base/media_export.h"
|
| // TODO(xhwang): Remove when we remove prefixed EME implementation.
|
| #include "media/base/media_keys.h"
|
| #include "media/base/pipeline.h"
|
| #include "media/base/text_track.h"
|
| +#include "media/blink/buffered_data_source.h"
|
| +#include "media/blink/buffered_data_source_host_impl.h"
|
| +#include "media/blink/video_frame_compositor.h"
|
| #include "media/filters/skcanvas_video_renderer.h"
|
| -#include "skia/ext/platform_canvas.h"
|
| #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h"
|
| #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
|
| #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
|
| @@ -44,14 +46,9 @@ class WebLayerImpl;
|
| namespace media {
|
| class AudioHardwareConfig;
|
| class ChunkDemuxer;
|
| +class EncryptedMediaPlayerSupport;
|
| class GpuVideoAcceleratorFactories;
|
| class MediaLog;
|
| -}
|
| -
|
| -
|
| -namespace content {
|
| -class BufferedDataSource;
|
| -class EncryptedMediaPlayerSupport;
|
| class VideoFrameCompositor;
|
| class WebAudioSourceProviderImpl;
|
| class WebMediaPlayerDelegate;
|
| @@ -59,10 +56,10 @@ class WebMediaPlayerParams;
|
| class WebTextTrackImpl;
|
|
|
| // The canonical implementation of blink::WebMediaPlayer that's backed by
|
| -// media::Pipeline. Handles normal resource loading, Media Source, and
|
| +// Pipeline. Handles normal resource loading, Media Source, and
|
| // Encrypted Media.
|
| -class WebMediaPlayerImpl
|
| - : public blink::WebMediaPlayer,
|
| +class MEDIA_EXPORT WebMediaPlayerImpl
|
| + : public NON_EXPORTED_BASE(blink::WebMediaPlayer),
|
| public base::SupportsWeakPtr<WebMediaPlayerImpl> {
|
| public:
|
| // Constructs a WebMediaPlayer implementation using Chromium's media stack.
|
| @@ -167,14 +164,14 @@ class WebMediaPlayerImpl
|
| virtual void setContentDecryptionModuleSync(
|
| blink::WebContentDecryptionModule* cdm);
|
|
|
| - void OnPipelineSeeked(bool time_changed, media::PipelineStatus status);
|
| + void OnPipelineSeeked(bool time_changed, PipelineStatus status);
|
| void OnPipelineEnded();
|
| - void OnPipelineError(media::PipelineStatus error);
|
| - void OnPipelineMetadata(media::PipelineMetadata metadata);
|
| - void OnPipelineBufferingStateChanged(media::BufferingState buffering_state);
|
| + void OnPipelineError(PipelineStatus error);
|
| + void OnPipelineMetadata(PipelineMetadata metadata);
|
| + void OnPipelineBufferingStateChanged(BufferingState buffering_state);
|
| void OnDemuxerOpened();
|
| - void OnAddTextTrack(const media::TextTrackConfig& config,
|
| - const media::AddTextTrackDoneCB& done_cb);
|
| + void OnAddTextTrack(const TextTrackConfig& config,
|
| + const AddTextTrackDoneCB& done_cb);
|
|
|
| private:
|
| // Called after |defer_load_cb_| has decided to allow the load. If
|
| @@ -189,8 +186,8 @@ class WebMediaPlayerImpl
|
| // Called when the data source is downloading or paused.
|
| void NotifyDownloading(bool is_downloading);
|
|
|
| - // Creates a media::Renderer that will be used by the |pipeline_|.
|
| - scoped_ptr<media::Renderer> CreateRenderer();
|
| + // Creates a Renderer that will be used by the |pipeline_|.
|
| + scoped_ptr<Renderer> CreateRenderer();
|
|
|
| // Finishes starting the pipeline due to a call to load().
|
| void StartPipeline();
|
| @@ -210,11 +207,11 @@ class WebMediaPlayerImpl
|
|
|
| // Called by VideoRendererImpl on its internal thread with the new frame to be
|
| // painted.
|
| - void FrameReady(const scoped_refptr<media::VideoFrame>& frame);
|
| + void FrameReady(const scoped_refptr<VideoFrame>& frame);
|
|
|
| // Returns the current video frame from |compositor_|. Blocks until the
|
| // compositor can return the frame.
|
| - scoped_refptr<media::VideoFrame> GetCurrentFrameFromCompositor();
|
| + scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor();
|
|
|
| blink::WebLocalFrame* frame_;
|
|
|
| @@ -230,14 +227,14 @@ class WebMediaPlayerImpl
|
| const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
|
|
|
| scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
|
| - scoped_refptr<media::MediaLog> media_log_;
|
| - media::Pipeline pipeline_;
|
| + scoped_refptr<MediaLog> media_log_;
|
| + Pipeline pipeline_;
|
|
|
| // The LoadType passed in the |load_type| parameter of the load() call.
|
| LoadType load_type_;
|
|
|
| // Cache of metadata for answering hasAudio(), hasVideo(), and naturalSize().
|
| - media::PipelineMetadata pipeline_metadata_;
|
| + PipelineMetadata pipeline_metadata_;
|
|
|
| // Whether the video is known to be opaque or not.
|
| bool opaque_;
|
| @@ -279,7 +276,7 @@ class WebMediaPlayerImpl
|
| base::Callback<void(const base::Closure&)> defer_load_cb_;
|
|
|
| // Factories for supporting video accelerators. May be null.
|
| - scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_;
|
| + scoped_refptr<GpuVideoAcceleratorFactories> gpu_factories_;
|
|
|
| // Routes audio playback to either AudioRendererSink or WebAudio.
|
| scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_;
|
| @@ -293,15 +290,15 @@ class WebMediaPlayerImpl
|
| // |demuxer_| will contain the appropriate demuxer based on which resource
|
| // load strategy we're using.
|
| scoped_ptr<BufferedDataSource> data_source_;
|
| - scoped_ptr<media::Demuxer> demuxer_;
|
| - media::ChunkDemuxer* chunk_demuxer_;
|
| + scoped_ptr<Demuxer> demuxer_;
|
| + ChunkDemuxer* chunk_demuxer_;
|
|
|
| BufferedDataSourceHostImpl buffered_data_source_host_;
|
|
|
| // Video rendering members.
|
| scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
|
| VideoFrameCompositor* compositor_; // Deleted on |compositor_task_runner_|.
|
| - media::SkCanvasVideoRenderer skcanvas_video_renderer_;
|
| + SkCanvasVideoRenderer skcanvas_video_renderer_;
|
|
|
| // The compositor layer for displaying the video content when using composited
|
| // playback.
|
| @@ -312,11 +309,11 @@ class WebMediaPlayerImpl
|
|
|
| scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support_;
|
|
|
| - const media::AudioHardwareConfig& audio_hardware_config_;
|
| + const AudioHardwareConfig& audio_hardware_config_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
|
| };
|
|
|
| -} // namespace content
|
| +} // namespace media
|
|
|
| -#endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
|
| +#endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
|
|
|