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

Side by Side Diff: media/filters/audio_renderer_base.h

Issue 6142009: Upating the app, ceee, chrome, ipc, media, and net directories to use the correct lock.h file. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Unified patch updating all references to the new base/synchronization/lock.h Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/filters/audio_renderer_base.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // AudioRendererBase takes care of the tricky queuing work and provides simple 5 // AudioRendererBase takes care of the tricky queuing work and provides simple
6 // methods for subclasses to peek and poke at audio data. In addition to 6 // methods for subclasses to peek and poke at audio data. In addition to
7 // AudioRenderer interface methods this classes doesn't implement, subclasses 7 // AudioRenderer interface methods this classes doesn't implement, subclasses
8 // must also implement the following methods: 8 // must also implement the following methods:
9 // OnInitialized 9 // OnInitialized
10 // OnStop 10 // OnStop
11 // 11 //
12 // The general assumption is that subclasses start a callback-based audio thread 12 // The general assumption is that subclasses start a callback-based audio thread
13 // which needs to be filled with decoded audio data. AudioDecoderBase provides 13 // which needs to be filled with decoded audio data. AudioDecoderBase provides
14 // FillBuffer which handles filling the provided buffer, dequeuing items, 14 // FillBuffer which handles filling the provided buffer, dequeuing items,
15 // scheduling additional reads and updating the clock. In a sense, 15 // scheduling additional reads and updating the clock. In a sense,
16 // AudioRendererBase is the producer and the subclass is the consumer. 16 // AudioRendererBase is the producer and the subclass is the consumer.
17 17
18 #ifndef MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_ 18 #ifndef MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_
19 #define MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_ 19 #define MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_
20 20
21 #include <deque> 21 #include <deque>
22 22
23 #include "base/lock.h" 23 #include "base/synchronization/lock.h"
24 #include "media/base/buffers.h" 24 #include "media/base/buffers.h"
25 #include "media/base/filters.h" 25 #include "media/base/filters.h"
26 #include "media/filters/audio_renderer_algorithm_base.h" 26 #include "media/filters/audio_renderer_algorithm_base.h"
27 27
28 namespace media { 28 namespace media {
29 29
30 class AudioRendererBase : public AudioRenderer { 30 class AudioRendererBase : public AudioRenderer {
31 public: 31 public:
32 AudioRendererBase(); 32 AudioRendererBase();
33 virtual ~AudioRendererBase(); 33 virtual ~AudioRendererBase();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // 95 //
96 // Safe to call from any thread. 96 // Safe to call from any thread.
97 void ScheduleRead_Locked(); 97 void ScheduleRead_Locked();
98 98
99 // Audio decoder. 99 // Audio decoder.
100 scoped_refptr<AudioDecoder> decoder_; 100 scoped_refptr<AudioDecoder> decoder_;
101 101
102 // Algorithm for scaling audio. 102 // Algorithm for scaling audio.
103 scoped_ptr<AudioRendererAlgorithmBase> algorithm_; 103 scoped_ptr<AudioRendererAlgorithmBase> algorithm_;
104 104
105 Lock lock_; 105 base::Lock lock_;
106 106
107 // Simple state tracking variable. 107 // Simple state tracking variable.
108 enum State { 108 enum State {
109 kUninitialized, 109 kUninitialized,
110 kPaused, 110 kPaused,
111 kSeeking, 111 kSeeking,
112 kPlaying, 112 kPlaying,
113 kStopped, 113 kStopped,
114 kError, 114 kError,
115 }; 115 };
(...skipping 19 matching lines...) Expand all
135 scoped_ptr<FilterCallback> seek_callback_; 135 scoped_ptr<FilterCallback> seek_callback_;
136 136
137 base::TimeDelta seek_timestamp_; 137 base::TimeDelta seek_timestamp_;
138 138
139 DISALLOW_COPY_AND_ASSIGN(AudioRendererBase); 139 DISALLOW_COPY_AND_ASSIGN(AudioRendererBase);
140 }; 140 };
141 141
142 } // namespace media 142 } // namespace media
143 143
144 #endif // MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_ 144 #endif // MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/filters/audio_renderer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698