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

Side by Side Diff: chromecast/media/cma/pipeline/media_pipeline.h

Issue 1372393007: [Chromecast] Upgrade to new CMA backend API (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Address alokp@ comments Created 5 years, 2 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 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 <vector>
9
10 #include "base/basictypes.h"
11 #include "base/macros.h"
12 #include "base/time/time.h"
13 #include "media/base/pipeline_status.h"
14
15 namespace media {
16 class AudioDecoderConfig;
17 class BrowserCdm;
18 class VideoDecoderConfig;
19 }
20
21 namespace chromecast {
22 namespace media {
23 class AudioPipeline;
24 class CodedFrameProvider;
25 struct MediaPipelineClient;
26 class VideoPipeline;
27
28 class MediaPipeline {
29 public:
30 MediaPipeline() {}
31 virtual ~MediaPipeline() {}
32
33 // Set the media pipeline client.
34 virtual void SetClient(const MediaPipelineClient& client) = 0;
35
36 // Set the CDM to use for decryption.
37 // The CDM is refered by its id.
38 virtual void SetCdm(int cdm_id) = 0;
39
40 // Return the audio/video pipeline owned by the MediaPipeline.
41 virtual AudioPipeline* GetAudioPipeline() const = 0;
42 virtual VideoPipeline* GetVideoPipeline() const = 0;
43
44 // Create an audio/video pipeline.
45 // MediaPipeline owns the resulting audio/video pipeline.
46 // Only one audio and one video pipeline can be created.
47 virtual void InitializeAudio(
48 const ::media::AudioDecoderConfig& config,
49 scoped_ptr<CodedFrameProvider> frame_provider,
50 const ::media::PipelineStatusCB& status_cb) = 0;
51 virtual void InitializeVideo(
52 const std::vector<::media::VideoDecoderConfig>& configs,
53 scoped_ptr<CodedFrameProvider> frame_provider,
54 const ::media::PipelineStatusCB& status_cb) = 0;
55
56 // Control the media pipeline state machine.
57 virtual void StartPlayingFrom(base::TimeDelta time) = 0;
58 virtual void Flush(const ::media::PipelineStatusCB& status_cb) = 0;
59 virtual void Stop() = 0;
60
61 // Set the playback rate.
62 virtual void SetPlaybackRate(double playback_rate) = 0;
63
64 private:
65 DISALLOW_COPY_AND_ASSIGN(MediaPipeline);
66 };
67
68 } // namespace media
69 } // namespace chromecast
70
71 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698