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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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 #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_H_
6 #define CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_H_
7
8 #include "base/basictypes.h"
9 #include "base/macros.h"
10 #include "base/time/time.h"
11 #include "media/base/pipeline_status.h"
12
13 namespace media {
14 class AudioDecoderConfig;
15 class BrowserCdm;
16 class VideoDecoderConfig;
17 }
18
19 namespace chromecast {
20 namespace media {
21 class AudioPipeline;
22 class CodedFrameProvider;
23 struct MediaPipelineClient;
24 class VideoPipeline;
25
26 class MediaPipeline {
27 public:
28 MediaPipeline() {}
29 virtual ~MediaPipeline() {}
30
31 // Set the media pipeline client.
32 virtual void SetClient(const MediaPipelineClient& client) = 0;
33
34 // Set the CDM to use for decryption.
35 // The CDM is refered by its id.
36 virtual void SetCdm(int cdm_id) = 0;
37
38 // Return the audio/video pipeline owned by the MediaPipeline.
39 virtual AudioPipeline* GetAudioPipeline() const = 0;
40 virtual VideoPipeline* GetVideoPipeline() const = 0;
41
42 // Create an audio/video pipeline.
43 // MediaPipeline owns the resulting audio/video pipeline.
44 // Only one audio and one video pipeline can be created.
45 virtual void InitializeAudio(
46 const ::media::AudioDecoderConfig& config,
47 scoped_ptr<CodedFrameProvider> frame_provider,
48 const ::media::PipelineStatusCB& status_cb) = 0;
49 virtual void InitializeVideo(
50 const ::media::VideoDecoderConfig& config,
51 scoped_ptr<CodedFrameProvider> frame_provider,
52 const ::media::PipelineStatusCB& status_cb) = 0;
53
54 // Control the media pipeline state machine.
55 virtual void StartPlayingFrom(base::TimeDelta time) = 0;
56 virtual void Flush(const ::media::PipelineStatusCB& status_cb) = 0;
57 virtual void Stop() = 0;
58
59 // Set the playback rate.
60 virtual void SetPlaybackRate(float playback_rate) = 0;
61
62 private:
63 DISALLOW_COPY_AND_ASSIGN(MediaPipeline);
64 };
65
66 } // namespace media
67 } // namespace chromecast
68
69 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_H_
OLDNEW
« 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