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

Side by Side Diff: chromecast/media/audio/cast_audio_output_stream.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
« no previous file with comments | « chromecast/media/audio/BUILD.gn ('k') | chromecast/media/audio/cast_audio_output_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_OUTPUT_STREAM_H_ 5 #ifndef CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_OUTPUT_STREAM_H_
6 #define CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_OUTPUT_STREAM_H_ 6 #define CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_OUTPUT_STREAM_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 21 matching lines...) Expand all
32 void Close() override; 32 void Close() override;
33 void Start(AudioSourceCallback* source_callback) override; 33 void Start(AudioSourceCallback* source_callback) override;
34 void Stop() override; 34 void Stop() override;
35 void SetVolume(double volume) override; 35 void SetVolume(double volume) override;
36 void GetVolume(double* volume) override; 36 void GetVolume(double* volume) override;
37 37
38 private: 38 private:
39 class Backend; 39 class Backend;
40 40
41 void OnClosed(); 41 void OnClosed();
42 void PushFrame(); 42 void PushBuffer();
43 void OnPushFrameComplete(bool success); 43 void OnPushBufferComplete(bool success);
44 44
45 const ::media::AudioParameters audio_params_; 45 const ::media::AudioParameters audio_params_;
46 CastAudioManager* const audio_manager_; 46 CastAudioManager* const audio_manager_;
47 47
48 double volume_; 48 double volume_;
49 AudioSourceCallback* source_callback_; 49 AudioSourceCallback* source_callback_;
50 scoped_ptr<::media::AudioBus> audio_bus_; 50 scoped_ptr<::media::AudioBus> audio_bus_;
51 scoped_refptr<media::DecoderBufferBase> decoder_buffer_; 51 scoped_refptr<media::DecoderBufferBase> decoder_buffer_;
52 scoped_ptr<Backend> backend_; 52 scoped_ptr<Backend> backend_;
53 const base::TimeDelta buffer_duration_; 53 const base::TimeDelta buffer_duration_;
54 bool push_in_progress_; 54 bool push_in_progress_;
55 base::TimeTicks next_push_time_; 55 base::TimeTicks next_push_time_;
56 56
57 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; 57 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_;
58 scoped_refptr<base::SingleThreadTaskRunner> backend_task_runner_; 58 scoped_refptr<base::SingleThreadTaskRunner> backend_task_runner_;
59 59
60 base::WeakPtrFactory<CastAudioOutputStream> weak_factory_; 60 base::WeakPtrFactory<CastAudioOutputStream> weak_factory_;
61 DISALLOW_COPY_AND_ASSIGN(CastAudioOutputStream); 61 DISALLOW_COPY_AND_ASSIGN(CastAudioOutputStream);
62 }; 62 };
63 63
64 } // namespace media 64 } // namespace media
65 } // namespace chromecast 65 } // namespace chromecast
66 66
67 #endif // CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_OUTPUT_STREAM_H_ 67 #endif // CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_OUTPUT_STREAM_H_
OLDNEW
« no previous file with comments | « chromecast/media/audio/BUILD.gn ('k') | chromecast/media/audio/cast_audio_output_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698