| Index: media/blink/webmediaplayer_impl.h
|
| diff --git a/content/renderer/media/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
|
| similarity index 87%
|
| rename from content/renderer/media/webmediaplayer_impl.h
|
| rename to media/blink/webmediaplayer_impl.h
|
| index f395df677132f1f1bd43080ea0302739a01724ac..2264e0824bab7b8a59bbaf78769c607692b65841 100644
|
| --- a/content/renderer/media/webmediaplayer_impl.h
|
| +++ b/media/blink/webmediaplayer_impl.h
|
| @@ -2,8 +2,8 @@
|
| // 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>
|
| @@ -13,15 +13,16 @@
|
| #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 +45,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,9 +55,9 @@ 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
|
| +class MEDIA_EXPORT WebMediaPlayerImpl
|
| : public blink::WebMediaPlayer,
|
| public base::SupportsWeakPtr<WebMediaPlayerImpl> {
|
| public:
|
| @@ -167,14 +163,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 +185,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,7 +206,7 @@ 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);
|
|
|
| // Called when the ContentDecryptionModule has been attached to the
|
| // pipeline/decoders.
|
| @@ -220,7 +216,7 @@ class WebMediaPlayerImpl
|
|
|
| // 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_;
|
|
|
| @@ -236,14 +232,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_;
|
| @@ -281,7 +277,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_;
|
| @@ -295,15 +291,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.
|
| @@ -319,6 +315,6 @@ class WebMediaPlayerImpl
|
| DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
|
| };
|
|
|
| -} // namespace content
|
| +} // namespace media
|
|
|
| -#endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
|
| +#endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
|
|
|