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

Unified Diff: chromecast/media/cma/pipeline/frame_status_cb_impl.h

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/frame_status_cb_impl.h
diff --git a/chromecast/media/cma/pipeline/frame_status_cb_impl.h b/chromecast/media/cma/pipeline/frame_status_cb_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..9cd3de765a6c7d4a48b3232a28c5ecbd3df561d6
--- /dev/null
+++ b/chromecast/media/cma/pipeline/frame_status_cb_impl.h
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_MEDIA_CMA_PIPELINE_FRAME_STATUS_CB_IMPL_H_
+#define CHROMECAST_MEDIA_CMA_PIPELINE_FRAME_STATUS_CB_IMPL_H_
+
+#include "base/callback.h"
+#include "base/memory/ref_counted.h"
+#include "chromecast/public/media/media_component_device.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+}
+
+namespace chromecast {
+namespace media {
+
+// Helper for implementing MediaComponentDevice::FrameStatusCB with
+// a base::Callback.
+class FrameStatusCBImpl : public MediaComponentDevice::FrameStatusCB {
+ public:
+ typedef base::Callback<void(MediaComponentDevice::FrameStatus)> CallbackType;
+
+ FrameStatusCBImpl(const CallbackType& cb);
+ ~FrameStatusCBImpl() override;
+
+ void Run(MediaComponentDevice::FrameStatus status) override;
+
+ private:
+ CallbackType cb_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_PIPELINE_FRAME_STATUS_CB_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698