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

Unified Diff: chromecast/browser/media/cma_media_pipeline_client.h

Issue 1306843003: CmaMediaPipelineClient to watch media pipeline status (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CmaMediaPipelineClient 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/browser/media/cma_media_pipeline_client.h
diff --git a/chromecast/browser/media/cma_media_pipeline_client.h b/chromecast/browser/media/cma_media_pipeline_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..6fb7ac391d9ab503ac9dde180fb457bb19293c23
--- /dev/null
+++ b/chromecast/browser/media/cma_media_pipeline_client.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_BROWSER_MEDIA_CMA_MEDIA_PIPELINE_CLIENT_H_
+#define CHROMECAST_BROWSER_MEDIA_CMA_MEDIA_PIPELINE_CLIENT_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "chromecast/public/media/media_pipeline_backend.h"
+
+namespace chromecast {
+namespace media {
+
+// Class to provide media backend and watch media pipeline status
+class CmaMediaPipelineClient : public base::RefCounted<CmaMediaPipelineClient> {
+ public:
+ CmaMediaPipelineClient();
+
+ virtual scoped_ptr<MediaPipelineBackend> CreateMediaPipelineBackend(
+ const media::MediaPipelineDeviceParams& params);
+
+ virtual void OnMediaPipelineBackendCreated();
+ virtual void OnMediaPipelineBackendDestroyed();
+
+ protected:
+ virtual ~CmaMediaPipelineClient();
+
+ // TODO(yucliu): Compiler will complain either:
+ // 1. RefCounted::Release access private/protected destructor
+ // 2. Destructor should be private/protected in subclass of RefCounted
+ // Need to figure out why and remove this line.
+ friend class base::RefCounted<CmaMediaPipelineClient>;
gunsch 2015/08/31 15:56:52 did you try adding DISALLOW_COPY_AND_ASSIGN in thi
yucliu1 2015/08/31 17:47:40 Just reviewed ref_counted.h: https://code.google.c
+};
+}
+}
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698