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

Unified Diff: chromecast/media/cma/pipeline/video_pipeline_impl.cc

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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: chromecast/media/cma/pipeline/video_pipeline_impl.cc
diff --git a/chromecast/media/cma/pipeline/video_pipeline_impl.cc b/chromecast/media/cma/pipeline/video_pipeline_impl.cc
index 5f79d55a48935258ba39d24daf9c8509da7dba71..89d82cfc9fb1868f622d1e49287140e2772dced8 100644
--- a/chromecast/media/cma/pipeline/video_pipeline_impl.cc
+++ b/chromecast/media/cma/pipeline/video_pipeline_impl.cc
@@ -5,13 +5,15 @@
#include "chromecast/media/cma/pipeline/video_pipeline_impl.h"
#include "base/bind.h"
-#include "chromecast/media/cma/backend/video_pipeline_device.h"
#include "chromecast/media/cma/base/buffering_defs.h"
#include "chromecast/media/cma/base/cma_logging.h"
#include "chromecast/media/cma/base/coded_frame_provider.h"
#include "chromecast/media/cma/base/decoder_config_adapter.h"
#include "chromecast/media/cma/pipeline/av_pipeline_impl.h"
+#include "chromecast/media/cma/pipeline/video_pipeline_device_client_impl.h"
+#include "chromecast/public/graphics_types.h"
#include "chromecast/public/media/decoder_config.h"
+#include "chromecast/public/media/video_pipeline_device.h"
#include "media/base/video_decoder_config.h"
namespace chromecast {
@@ -109,10 +111,8 @@ void VideoPipelineImpl::Initialize(
CMALOG(kLogControl) << __FUNCTION__ << " "
<< config.AsHumanReadableString();
}
- VideoPipelineDevice::VideoClient client;
- client.natural_size_changed_cb =
- base::Bind(&VideoPipelineImpl::OnNaturalSizeChanged, weak_this_);
- video_device_->SetVideoClient(client);
+ video_device_->SetVideoClient(new VideoPipelineDeviceClientImpl(
+ base::Bind(&VideoPipelineImpl::OnNaturalSizeChanged, weak_this_)));
if (frame_provider)
SetCodedFrameProvider(frame_provider.Pass());
@@ -159,12 +159,14 @@ void VideoPipelineImpl::OnUpdateConfig(
}
}
-void VideoPipelineImpl::OnNaturalSizeChanged(const gfx::Size& size) {
+void VideoPipelineImpl::OnNaturalSizeChanged(const Size& size) {
if (av_pipeline_impl_->GetState() != AvPipelineImpl::kPlaying)
return;
- if (!video_client_.natural_size_changed_cb.is_null())
- video_client_.natural_size_changed_cb.Run(size);
+ if (!video_client_.natural_size_changed_cb.is_null()) {
+ video_client_.natural_size_changed_cb.Run(
+ gfx::Size(size.width, size.height));
+ }
}
void VideoPipelineImpl::UpdateStatistics() {

Powered by Google App Engine
This is Rietveld 408576698