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

Side by Side Diff: chromecast/media/audio/chromecast_device_audio_output_stream.h

Issue 1105803002: Exposes a shlib interface for media/audio path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor clean-up Created 5 years, 7 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 2015 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_AUDIO_CHROMECAST_DEVICE_AUDIO_OUTPUT_STREAM_H_
6 #define CHROMECAST_MEDIA_AUDIO_CHROMECAST_DEVICE_AUDIO_OUTPUT_STREAM_H_
7
8 #include "base/macros.h"
9 #include "chromecast/public/cast_audio_stream.h"
10 #include "media/audio/audio_io.h"
11 #include "media/audio/audio_manager.h"
12 #include "media/base/media_export.h"
13
14 namespace chromecast {
15
16 struct AudioParameters;
17
18 // An implementation of media::AudioOutputStream for any Chromecast device. This
19 // passes control requests and data to an instance of the platform-independent
20 // chromecast::CastAudioOutputStream interface.
21 class ChromecastDeviceAudioOutputStream
22 : public chromecast::CastAudioOutputStream::AudioSourceCallback,
gunsch 2015/04/27 16:09:11 style nit: don't fully-qualify chromecast-namespac
byungchul 2015/04/27 17:38:06 And, it doesn't have to be public.
slan 2015/04/28 00:11:38 Done.
slan 2015/04/28 00:11:38 Done.
23 public media::AudioOutputStream {
24 public:
25 ChromecastDeviceAudioOutputStream(
26 chromecast::CastAudioOutputStream* output_stream,
gunsch 2015/04/27 16:09:11 Describe the ownership model here, since you're pa
slan 2015/04/28 00:11:39 Documentation added clarifying the ownership model
27 const chromecast::AudioParameters& params);
28 ~ChromecastDeviceAudioOutputStream() override;
29
30 // media::AudioOutputStream implementation:
31 bool Open() override;
32 void Start(media::AudioOutputStream::AudioSourceCallback* callback) override;
33 void Stop() override;
34 void SetVolume(double volume) override;
35 void GetVolume(double* volume) override;
36 void Close() override;
37
38 // chromecast::AudioSourceCallback implementation:
39 int OnMoreData(void* dest,
40 uint32_t len,
41 int32_t frames,
42 uint32_t total_bytes_delay) override;
43 void OnError(chromecast::CastAudioOutputStream* stream) override;
44 void OnClose() override;
45
46 private:
47 // Calls to media::AudioOutputStream interface will be forwarded here.
48 chromecast::CastAudioOutputStream* output_stream_;
byungchul 2015/04/27 17:38:06 * const
slan 2015/04/28 00:11:38 Done.
49
50 // Calls to chromecast::AudioSourceCallback interface will be forwarded here.
51 media::AudioOutputStream::AudioSourceCallback* callback_;
52
53 // The parameters describing the stream.
54 chromecast::AudioParameters params_;
55
56 DISALLOW_COPY_AND_ASSIGN(ChromecastDeviceAudioOutputStream);
57 };
58
59 } // namespace chromecast
60
61 #endif // CHROMECAST_MEDIA_AUDIO_CHROMECAST_DEVICE_AUDIO_OUTPUT_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698