Index: chromecast/media/cma/test/media_component_device_feeder_for_test.cc |
diff --git a/chromecast/media/cma/test/media_component_device_feeder_for_test.cc b/chromecast/media/cma/test/media_component_device_feeder_for_test.cc |
index 84cc3da2b0762928ae1d54d5c052ea709b00deed..1603c5b1d8f18f3bca9b1d4f630ff6c4457e23c0 100644 |
--- a/chromecast/media/cma/test/media_component_device_feeder_for_test.cc |
+++ b/chromecast/media/cma/test/media_component_device_feeder_for_test.cc |
@@ -17,13 +17,14 @@ |
#include "base/thread_task_runner_handle.h" |
#include "base/time/time.h" |
#include "chromecast/media/base/decrypt_context.h" |
-#include "chromecast/media/cma/backend/audio_pipeline_device.h" |
-#include "chromecast/media/cma/backend/media_clock_device.h" |
-#include "chromecast/media/cma/backend/media_pipeline_device.h" |
-#include "chromecast/media/cma/backend/video_pipeline_device.h" |
+#include "chromecast/media/cma/base/backend_client_callbacks.h" |
#include "chromecast/media/cma/base/decoder_buffer_adapter.h" |
-#include "chromecast/media/cma/base/decoder_buffer_base.h" |
+#include "chromecast/media/cma/base/decoder_buffer_impl.h" |
#include "chromecast/media/cma/test/frame_segmenter_for_test.h" |
+#include "chromecast/public/media/audio_pipeline_device.h" |
+#include "chromecast/public/media/decoder_buffer.h" |
+#include "chromecast/public/media/media_clock_device.h" |
+#include "chromecast/public/media/video_pipeline_device.h" |
#include "media/base/audio_decoder_config.h" |
#include "media/base/buffers.h" |
#include "media/base/decoder_buffer.h" |
@@ -50,16 +51,14 @@ void MediaComponentDeviceFeederForTest::Initialize( |
const base::Closure& eos_cb) { |
eos_cb_ = eos_cb; |
- MediaComponentDevice::Client client; |
- client.eos_cb = |
- base::Bind(&MediaComponentDeviceFeederForTest::OnEos, |
- base::Unretained(this)); |
- media_component_device_->SetClient(client); |
+ media_component_device_->SetClient( |
+ new MediaComponentDeviceClientImpl(base::Bind( |
+ &MediaComponentDeviceFeederForTest::OnEos, base::Unretained(this)))); |
bool success = |
media_component_device_->SetState(MediaComponentDevice::kStateIdle); |
ASSERT_TRUE(success); |
- success = media_component_device_->SetStartPts(base::TimeDelta()); |
+ success = media_component_device_->SetStartPts(TimeDelta()); |
ASSERT_TRUE(success); |
success = |
media_component_device_->SetState(MediaComponentDevice::kStatePaused); |
@@ -78,12 +77,11 @@ void MediaComponentDeviceFeederForTest::Feed() { |
DCHECK(!frames_.empty()); |
scoped_refptr<DecoderBufferBase> buffer = frames_.front(); |
- MediaComponentDevice::FrameStatus status = |
- media_component_device_->PushFrame( |
- scoped_refptr<DecryptContext>(), |
- buffer, |
+ MediaComponentDevice::FrameStatus status = media_component_device_->PushFrame( |
+ KEY_SYSTEM_NONE, new DecoderBufferImpl(buffer), |
+ new FrameStatusCBImpl( |
base::Bind(&MediaComponentDeviceFeederForTest::OnFramePushed, |
- base::Unretained(this))); |
+ base::Unretained(this)))); |
EXPECT_NE(status, MediaComponentDevice::kFrameFailed); |
frames_.pop_front(); |