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

Side by Side Diff: media/base/audio_renderer.h

Issue 11492003: Encrypted Media: Support Audio Decrypt-Only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: working and not hacky; need to update comments and tests Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/decryptor.h » ('j') | media/base/decryptor.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 MEDIA_BASE_AUDIO_RENDERER_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "media/base/decryptor.h"
13 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
14 #include "media/base/pipeline_status.h" 15 #include "media/base/pipeline_status.h"
15 16
16 namespace media { 17 namespace media {
17 18
18 class AudioDecoder; 19 class AudioDecoder;
19 class DemuxerStream; 20 class DemuxerStream;
20 21
21 class MEDIA_EXPORT AudioRenderer 22 class MEDIA_EXPORT AudioRenderer
22 : public base::RefCountedThreadSafe<AudioRenderer> { 23 : public base::RefCountedThreadSafe<AudioRenderer> {
(...skipping 16 matching lines...) Expand all
39 // 40 //
40 // |time_cb| is executed whenever time has advanced by way of audio rendering. 41 // |time_cb| is executed whenever time has advanced by way of audio rendering.
41 // 42 //
42 // |ended_cb| is executed when audio rendering has reached the end of stream. 43 // |ended_cb| is executed when audio rendering has reached the end of stream.
43 // 44 //
44 // |disabled_cb| is executed when audio rendering has been disabled due to 45 // |disabled_cb| is executed when audio rendering has been disabled due to
45 // external factors (i.e., device was removed). |time_cb| will no longer be 46 // external factors (i.e., device was removed). |time_cb| will no longer be
46 // executed. 47 // executed.
47 // 48 //
48 // |error_cb| is executed if an error was encountered. 49 // |error_cb| is executed if an error was encountered.
49 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, 50 virtual void Initialize(
50 const AudioDecoderList& decoders, 51 const scoped_refptr<DemuxerStream>& stream,
51 const PipelineStatusCB& init_cb, 52 const AudioDecoderList& decoders,
52 const StatisticsCB& statistics_cb, 53 const RequestDecryptorNotificationCB& request_decryptor_notification_cb,
53 const base::Closure& underflow_cb, 54 const PipelineStatusCB& init_cb,
54 const TimeCB& time_cb, 55 const StatisticsCB& statistics_cb,
55 const base::Closure& ended_cb, 56 const base::Closure& underflow_cb,
56 const base::Closure& disabled_cb, 57 const TimeCB& time_cb,
57 const PipelineStatusCB& error_cb) = 0; 58 const base::Closure& ended_cb,
59 const base::Closure& disabled_cb,
60 const PipelineStatusCB& error_cb) = 0;
58 61
59 // Start audio decoding and rendering at the current playback rate, executing 62 // Start audio decoding and rendering at the current playback rate, executing
60 // |callback| when playback is underway. 63 // |callback| when playback is underway.
61 virtual void Play(const base::Closure& callback) = 0; 64 virtual void Play(const base::Closure& callback) = 0;
62 65
63 // Temporarily suspend decoding and rendering audio, executing |callback| when 66 // Temporarily suspend decoding and rendering audio, executing |callback| when
64 // playback has been suspended. 67 // playback has been suspended.
65 virtual void Pause(const base::Closure& callback) = 0; 68 virtual void Pause(const base::Closure& callback) = 0;
66 69
67 // Discard any audio data, executing |callback| when completed. 70 // Discard any audio data, executing |callback| when completed.
(...skipping 28 matching lines...) Expand all
96 AudioRenderer(); 99 AudioRenderer();
97 virtual ~AudioRenderer(); 100 virtual ~AudioRenderer();
98 101
99 private: 102 private:
100 DISALLOW_COPY_AND_ASSIGN(AudioRenderer); 103 DISALLOW_COPY_AND_ASSIGN(AudioRenderer);
101 }; 104 };
102 105
103 } // namespace media 106 } // namespace media
104 107
105 #endif // MEDIA_BASE_AUDIO_RENDERER_H_ 108 #endif // MEDIA_BASE_AUDIO_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/decryptor.h » ('j') | media/base/decryptor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698