Chromium Code Reviews| Index: chromecast/media/cma/pipeline/av_pipeline_impl.h |
| diff --git a/chromecast/media/cma/pipeline/av_pipeline_impl.h b/chromecast/media/cma/pipeline/av_pipeline_impl.h |
| index 2aa9d51c9b0c6bcb13296007e66ff4e1c44d4672..c1a9d15005296239a130fe362ccf1917edb94148 100644 |
| --- a/chromecast/media/cma/pipeline/av_pipeline_impl.h |
| +++ b/chromecast/media/cma/pipeline/av_pipeline_impl.h |
| @@ -12,8 +12,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/threading/thread_checker.h" |
| -#include "chromecast/media/cma/pipeline/av_pipeline_client.h" |
| -#include "chromecast/public/media/media_component_device.h" |
| +#include "chromecast/public/media/media_pipeline_backend.h" |
| #include "chromecast/public/media/stream_id.h" |
| namespace media { |
| @@ -28,7 +27,6 @@ class BufferingFrameProvider; |
| class BufferingState; |
| class CodedFrameProvider; |
| class DecoderBufferBase; |
| -class MediaComponentDevice; |
| class AvPipelineImpl { |
| public: |
| @@ -47,9 +45,8 @@ class AvPipelineImpl { |
| const ::media::AudioDecoderConfig&, |
| const ::media::VideoDecoderConfig&)> UpdateConfigCB; |
| - AvPipelineImpl( |
| - MediaComponentDevice* media_component_device, |
| - const UpdateConfigCB& update_config_cb); |
| + AvPipelineImpl(MediaPipelineBackend::Decoder* decoder, |
| + const UpdateConfigCB& update_config_cb); |
| ~AvPipelineImpl(); |
| // Setting the frame provider or the client must be done in the |
| @@ -57,10 +54,6 @@ class AvPipelineImpl { |
| void SetCodedFrameProvider(scoped_ptr<CodedFrameProvider> frame_provider, |
| size_t max_buffer_size, |
| size_t max_frame_size); |
| - void SetClient(const AvPipelineClient& client); |
| - |
| - // Initialize the pipeline. |
| - bool Initialize(); |
| // Setup the pipeline and ensure samples are available for the given media |
| // time, then start rendering samples. |
| @@ -79,13 +72,14 @@ class AvPipelineImpl { |
| void SetCdm(BrowserCdmCast* media_keys); |
| + void OnBufferPushed(MediaPipelineBackend::BufferStatus status); |
| + |
| private: |
| // Callback invoked when the CDM state has changed in a way that might |
| // impact media playback. |
| void OnCdmStateChange(); |
| // Callback invoked when playback has reached the end of stream. |
|
slan
2015/10/07 20:56:16
nit: rm
kmackay
2015/10/09 20:35:40
Done.
|
| - void OnEos(); |
| // Feed the pipeline, getting the frames from |frame_provider_|. |
| void FetchBufferIfNeeded(); |
| @@ -98,8 +92,6 @@ class AvPipelineImpl { |
| // Process a pending buffer. |
| void ProcessPendingBuffer(); |
| - void OnFramePushed(MediaComponentDevice::FrameStatus status); |
| - |
| // Callbacks: |
| // - when BrowserCdm updated its state. |
| // - when BrowserCdm has been destroyed. |
| @@ -116,10 +108,8 @@ class AvPipelineImpl { |
| UpdateConfigCB update_config_cb_; |
| - AvPipelineClient client_; |
| - |
| // Backends. |
| - MediaComponentDevice* media_component_device_; |
| + MediaPipelineBackend::Decoder* decoder_; |
| // AV pipeline state. |
| State state_; |
| @@ -147,11 +137,11 @@ class AvPipelineImpl { |
| // Indicate whether there is a pending buffer read. |
| bool pending_read_; |
| - // Pending buffer. |
| + // Pending buffer (not pushed to device yet) |
| scoped_refptr<DecoderBufferBase> pending_buffer_; |
| - // Indicate if there is a frame being pushed to the audio device. |
| - bool pending_push_; |
| + // Buffer that has been pushed to the device but not processed yet. |
| + scoped_ptr<CastDecoderBuffer> pushed_buffer_; |
| // The media time is retrieved at regular intervals. |
| // Indicate whether time update is enabled. |