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

Side by Side Diff: chromecast/media/cma/pipeline/video_pipeline_device_client_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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chromecast/media/cma/pipeline/video_pipeline_device_client_impl.h"
6
7 #include "base/bind.h"
8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h"
11 #include "chromecast/public/graphics_types.h"
12
13 namespace chromecast {
14 namespace media {
15
16 VideoPipelineDeviceClientImpl::VideoPipelineDeviceClientImpl(
17 const SizeChangeCB& size_change_cb)
18 : size_change_cb_(size_change_cb),
19 task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
20
21 VideoPipelineDeviceClientImpl::~VideoPipelineDeviceClientImpl() {}
22
23 void VideoPipelineDeviceClientImpl::OnNaturalSizeChanged(const Size& size) {
24 if (task_runner_->BelongsToCurrentThread()) {
25 if (!size_change_cb_.is_null())
26 size_change_cb_.Run(size);
27 } else {
28 task_runner_->PostTask(FROM_HERE, base::Bind(size_change_cb_, size));
29 }
30 }
31
32 } // namespace media
33 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698