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

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

Issue 741863002: Chromecast: adds a media pipeline feeding data to CMA device backends. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cma-cdm
Patch Set: address nits, merge Pause/Flush Created 6 years, 1 month 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
« no previous file with comments | « chromecast/media/cma/pipeline/load_type.h ('k') | chromecast/media/cma/pipeline/media_pipeline_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/pipeline/media_pipeline.h
diff --git a/chromecast/media/cma/pipeline/media_pipeline.h b/chromecast/media/cma/pipeline/media_pipeline.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b82c4f165eab1ca9927917485aea5a2bec89f9c
--- /dev/null
+++ b/chromecast/media/cma/pipeline/media_pipeline.h
@@ -0,0 +1,69 @@
+// Copyright 2014 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_MEDIA_PIPELINE_H_
+#define CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_H_
+
+#include "base/basictypes.h"
+#include "base/macros.h"
+#include "base/time/time.h"
+#include "media/base/pipeline_status.h"
+
+namespace media {
+class AudioDecoderConfig;
+class BrowserCdm;
+class VideoDecoderConfig;
+}
+
+namespace chromecast {
+namespace media {
+class AudioPipeline;
+class CodedFrameProvider;
+struct MediaPipelineClient;
+class VideoPipeline;
+
+class MediaPipeline {
+ public:
+ MediaPipeline() {}
+ virtual ~MediaPipeline() {}
+
+ // Set the media pipeline client.
+ virtual void SetClient(const MediaPipelineClient& client) = 0;
+
+ // Set the CDM to use for decryption.
+ // The CDM is refered by its id.
+ virtual void SetCdm(int cdm_id) = 0;
+
+ // Return the audio/video pipeline owned by the MediaPipeline.
+ virtual AudioPipeline* GetAudioPipeline() const = 0;
+ virtual VideoPipeline* GetVideoPipeline() const = 0;
+
+ // Create an audio/video pipeline.
+ // MediaPipeline owns the resulting audio/video pipeline.
+ // Only one audio and one video pipeline can be created.
+ virtual void InitializeAudio(
+ const ::media::AudioDecoderConfig& config,
+ scoped_ptr<CodedFrameProvider> frame_provider,
+ const ::media::PipelineStatusCB& status_cb) = 0;
+ virtual void InitializeVideo(
+ const ::media::VideoDecoderConfig& config,
+ scoped_ptr<CodedFrameProvider> frame_provider,
+ const ::media::PipelineStatusCB& status_cb) = 0;
+
+ // Control the media pipeline state machine.
+ virtual void StartPlayingFrom(base::TimeDelta time) = 0;
+ virtual void Flush(const ::media::PipelineStatusCB& status_cb) = 0;
+ virtual void Stop() = 0;
+
+ // Set the playback rate.
+ virtual void SetPlaybackRate(float playback_rate) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MediaPipeline);
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_H_
« no previous file with comments | « chromecast/media/cma/pipeline/load_type.h ('k') | chromecast/media/cma/pipeline/media_pipeline_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698