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

Side by Side Diff: chromecast/renderer/media/audio_pipeline_proxy.h

Issue 2300993003: CmaRenderer is dead. Long live MojoRenderer. (Closed)
Patch Set: update OWNERS file Created 4 years, 3 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
« no previous file with comments | « chromecast/renderer/media/BUILD.gn ('k') | chromecast/renderer/media/audio_pipeline_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RENDERER_MEDIA_AUDIO_PIPELINE_PROXY_H_
6 #define CHROMECAST_RENDERER_MEDIA_AUDIO_PIPELINE_PROXY_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/threading/thread_checker.h"
14 #include "chromecast/common/media/cma_ipc_common.h"
15 #include "media/base/pipeline_status.h"
16
17 namespace base {
18 class SingleThreadTaskRunner;
19 class SharedMemory;
20 }
21
22 namespace media {
23 class AudioDecoderConfig;
24 }
25
26 namespace chromecast {
27 namespace media {
28 class AudioPipelineProxyInternal;
29 class AvStreamerProxy;
30 class CodedFrameProvider;
31 class MediaChannelProxy;
32 struct AvPipelineClient;
33
34 class AudioPipelineProxy {
35 public:
36 AudioPipelineProxy(scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
37 scoped_refptr<MediaChannelProxy> media_channel_proxy);
38 ~AudioPipelineProxy();
39
40 void Initialize(const ::media::AudioDecoderConfig& config,
41 std::unique_ptr<CodedFrameProvider> frame_provider,
42 const ::media::PipelineStatusCB& status_cb);
43 void StartFeeding();
44 void Flush(const base::Closure& done_cb);
45 void Stop();
46
47 void SetClient(const AvPipelineClient& client);
48 void SetVolume(float volume);
49
50 private:
51 base::ThreadChecker thread_checker_;
52
53 void OnAvPipeCreated(const ::media::AudioDecoderConfig& config,
54 const ::media::PipelineStatusCB& status_cb,
55 std::unique_ptr<base::SharedMemory> shared_memory);
56 void OnPipeWrite();
57 void OnPipeRead();
58
59 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
60
61 // |proxy_| main goal is to convert function calls to IPC messages.
62 std::unique_ptr<AudioPipelineProxyInternal> proxy_;
63
64 std::unique_ptr<AvStreamerProxy> audio_streamer_;
65
66 base::WeakPtr<AudioPipelineProxy> weak_this_;
67 base::WeakPtrFactory<AudioPipelineProxy> weak_factory_;
68
69 DISALLOW_COPY_AND_ASSIGN(AudioPipelineProxy);
70 };
71
72 } // namespace media
73 } // namespace chromecast
74
75 #endif // CHROMECAST_RENDERER_MEDIA_AUDIO_PIPELINE_PROXY_H_
OLDNEW
« no previous file with comments | « chromecast/renderer/media/BUILD.gn ('k') | chromecast/renderer/media/audio_pipeline_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698